2

I'm searching for a map of Germany which is divided into the different postal codes and could be coloured in R. Possible would be a map like this on wikipedia:

https://upload.wikimedia.org/wikipedia/commons/c/cd/Karte_Paketzentren_Deutsche_Post_AG.png

Is there any package which is supporting this?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
T. Beige
  • 177
  • 12
  • Search packages such as `maps` or `maptools` that can maybe provide you a map of Germany. Another way would be to search for a shapefile for your map to draw it with `ggplot2` and `rgdal` packages. – Mbr Mbr Aug 18 '17 at 08:06
  • 1
    This blog article could also help: https://www.r-bloggers.com/case-study-mapping-german-zip-codes-in-r/ – JSN Aug 18 '17 at 08:52

1 Answers1

2

You can download the Geojson (I advise this format) from https://public.opendatasoft.com/explore/dataset/georef-germany-postleitzahl/export/

You can then read the Geojson with the sf package. You will find support for this on stackoverflow. Through the sf package you will have graphing possibilities with various other packages. You can also download shapefiles for "Landkreis" and other administrative areas in Germany on this site.

esel
  • 901
  • 9
  • 20