Skip to content

Instantly share code, notes, and snippets.

@patperu
Created October 29, 2019 10:18
Show Gist options
  • Save patperu/b86c06a9cc7070e9b9a05a332fc4c56a to your computer and use it in GitHub Desktop.
Save patperu/b86c06a9cc7070e9b9a05a332fc4c56a to your computer and use it in GitHub Desktop.
PLZ-Berlin / FIS-Brocker Berlin
# https://daten.berlin.de/datensaetze/postleitzahlen-wfs-2
library(httr)
library(glue)
library(sf)
wfs_source <- "s_plz"
u_data <- glue("https://fbinter.stadt-berlin.de/fb/wfs/data/senstadt/{wfs_source}")
z <-
httr::VERB(verb = "GET",
url = u_data,
query = list(service = "wfs",
version = "2.0.0",
request = "GetFeature",
TYPENAMES = wfs_source,
outputFormat = "application/json"))
status_code(z)
s <- sf::read_sf(z)
s
saveRDS(s, 'plz_Berlin_2019_10_1.rds')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment