sebastianbarfort / mapDK

R package for making maps of Denmark
50 stars 5 forks source link

Christiansoe #27

Open RobertKlemmensen opened 7 years ago

RobertKlemmensen commented 7 years ago
  1. In the current version it seems as if christiansoe is included as a municipality. But christianoe is not an independent municipality any more.

  2. Would it be possible to use the municipal code from DK statistics instead of their names as IDs? I guess that would decrease the number of errors for the user given that you have to spell the municipality name in a specific way to successfully use the packages.

Anyways, thank for a really really useful package!

epetrovski commented 6 years ago

Duplicate of #10.

epetrovski commented 6 years ago

Agreed!

The easiest way to do this would likely be to replace the contents of the id column in municipality.rda, region.rda and parish.rda with numerical identifiers from Statistics Denmark and remove Christinasø in the same go.

With some extra effort, the names could be stored in an id_name column and the user could perhaps provide mapDK() with an indication of whether to use shapedata$id or shapedate$id_name.

@sebastianbarfort, any thoughts on this?

sebastianbarfort commented 6 years ago

Many thoughts indeed ;)

As is probably clear by now I'm not devoting many resources to this package at the moment. I think a better long term solution is to build directly from the shapefiles using the sf framework. sf is difficult to maintain and install, but once you're there it's impossible to go back.

I've already laid the groundwork for a mapDK2 package, but haven't had time to release it yet (and probably won't for the foreseeable future).

So to sum up; I think the proposed solution is fine but won't implement it myself. But as always I'm very open to pull requests.

S

epetrovski commented 6 years ago

Don't know much about sf but I'm an avid user of mapDK and often need to use numerical identifiers – so I'll consider having another look at the code and issue a pull request for a basic fix to the issue.

sebastianbarfort commented 6 years ago

Glad to hear it's useful. I'm happy to help on the pull request, just let me know.