svraka/teroszt

Replace OSM maps

Opened this issue · 0 comments

Data downloaded from OpenStreetMap is outdated. It looks like they are still using the original 2013 version and district boundaries were redrawn several times. The whole point of including OSM data was to have district level maps, so this needs to be fixed.

A better approach would be to use Eurostat's regularly updated GISCO data. Download settlement maps and and (using giscoR) and aggragate it to district level using sf. As a proof of concept, something like this could be bundled into a function:

lau_hu <- gisco_get_lau(country = "hu")

sf_use_s2(TRUE)
jaras_sf <- lau_hu %>%
  left_join(select(tsz_2018, torzsszam, jaras, jaras_nev),
            by = c("LAU_CODE" = "torzsszam")) %>%
  group_by(jaras, jaras_nev) %>%
  summarise()

Although this needs some further cleaning, as there are some strange districts, e.g. Kaszaper (in the Mezőkovácsháza District) has a borough called Pusztaszőlős, which is an exclave in the Orosháza District.

This would also fix R CMD check notes about package size.