sebastianbarfort / mapDK

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

long-lat wrong for rural and (still) zip #29

Open RaSieb opened 5 years ago

RaSieb commented 5 years ago

See #13: The map is far longer south-west than with the other detail-options.

RaSieb commented 5 years ago

Here's a reproducible example:

dk_reg <- mapDK::region
dk_reg2 <- mapDK::rural
ggplot(mapping = aes(long, lat)) +
  geom_map(data = dk_reg, map=dk_reg, aes(map_id=id), fill="green") +
  geom_map(data = dk_reg2, map=dk_reg2, aes(map_id=id), fill="blue")

Which produces this plot: screen shot 2018-09-03 at 13 11 05

hoegsbro commented 3 years ago

Hi RaSieb. Did you find a solution to this problem? I know it is a while since you posted, but I have the same problem now... I have made an approximate transformation based on the data in the municipality-object which is good enough (except for Bornholm :-)) for plotting approximate town-names e.g., but not good enough for more detailed work, so I would appreciate if you had solved this issue. approximate_trans.pdf

RaSieb commented 3 years ago

Hi @hoegsbro , I don't think the issue is fixed. I ended up downloading the data from eurostat:


library(sf)
library(eurostat)
geodata <- get_eurostat_geospatial(output_class = "sf", resolution = "1", nuts_level = 3)
geodataDK <- geodata[geodata$CNTR_CODE=="DK",]
ggplot() + geom_sf(data=geodataDK)
hoegsbro commented 3 years ago

Thanks a lot - I wasn't aware of the eurostat package. But as far as I can see there are no details for the zip-codes in these data, so it is still not possible to overlay the map with zip codes with the full DK-map?