Code Monkey home page Code Monkey logo

lockdown-maps-r's People

Contributors

milena-git avatar mtennekes avatar rlesur avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lockdown-maps-r's Issues

Is {targets} the target or not?

For now, there are two means to (re)produce the dataviz: using the targets package or the FranceMNO.R script. I suspect that can be confusing for an external reader. Moreover, the dataviz generation process is not (yet) documented.

Do you want to keep both methods or just one (which one in that case)?

License

Hi @milena-git and @mtennekes,

@MelineeTS and me are preparing the open sourcing of this project on behalf of the Insee.

I open this issue to discuss about the FOSS license.

@mtennekes: in 🇫🇷 , the FOSS licenses that we can use are limited by the law.
We can use one of the following licenses.

For the code, the permissive ones are:

  • MIT
  • Apache-2.0
  • BSD-2-Clause
  • BSD-3-Clause
  • CECILL-B

For the code, the ones with a copyleft are:

  • CECILL-2.1
  • CECILL-C
  • GPL-3.0-or-later
  • LGPL-3.0-or-later
  • AGPL-3.0-or-later
  • MPL-2.0

For the datasets and the publications, we can use:

  • ODbL-1.0
  • etalab-2.0 (this is a 🇫🇷 governmental permissive license)

Even if the EUPL-1.2 is not listed here, we can consider it for the code.

The Insee encourages the use of the MIT licence but any of the above mentioned licenses would be correct.

@mtennekes , would you agree to release this conjoint code under the MIT license?

departement_centroids() fails on Windows when loaded with source()

Got the following error on Windows:

Error in if (any(abs(object@deg) > 360)) return("abs(degree) > 360") else if (any(object@WS &  : 
  valeur manquante là où TRUE / FALSE est requis

How to reproduce?

library(tidyverse)
source("R/maps_utils.R")
departement_centroids()

The origin of this bug comes from the use of source() and these lines:

dep$lon <- as.numeric(sp::char2dms(dep$lon, chd = "°", chm="'", chs="\""))
dep$lat <- as.numeric(sp::char2dms(dep$lat, chd = "°", chm="'", chs="\""))

The problem with source() is that the default value for the encoding parameter is getOption("encoding") which is "native.enc" on Windows.
Here, the files are encoded in UTF-8 and the ° character is used. When parsed as CP-1252, this character is wrong.

There are two options to solve this bug:

  • always use the encoding value for source() calls: source(..., encoding = "UTF-8")
  • replace "°" with "\ub0"

@milena-git, I can do the PR if you want.

How to cite this work?

Finding how to cite these dataviz is not yet straightforward.
We could add an entry in the README file ("Cite this work") and/or a CITATION file.

Produce HTML files with GHA

For now, the HTML files are commited in the html directory. These files are huge.
Moreover, commiting artifacts is not a best practice.
I suggest to produce these files with GHA and make them available as artifacts.

Lost of sync between maps

The html outputs of the targets (locally and build in github actions artefacts) are not synchronized anymore. Seems also the case for the last version of FranceMNO.R
@mtennekes any idea?

donutmaps

I created a new and public R package: https://github.com/mtennekes/donutmaps

  • It (only) contains the function back_donuts.
  • One change w.r.t. the old function (that is also included in this repo): I've added the parameter var, which contains the variable name of flow values. In the old case (and in your case), it should be "flow"

@milena-git The old private repo donut_maps still exists, but I'll have to remove bake_donuts there as well, and probably rename this repo.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.