This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
``` r | |
library(readxl) | |
library(tidyverse) | |
library(purrr) | |
read_pendler <- function(x, sheet) { | |
readxl::read_xlsx(x, sheet = sheet, skip = 8, col_names = FALSE, col_types = "text") %>% | |
mutate(Jahr = str_extract(x, "(\\d{4})"), | |
Jahr = as.Date(paste(Jahr, '06-30', sep = '-'))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Source: https://daten.berlin.de/datensaetze/wasser-marsch-friedrichshain-kreuzberg | |
library(sf) | |
x <- read_sf("https://www.gis-broker.de/gb/wfs/data/fk/s_wama?service=wfs&version=2.0.0&request=GetFeature&TYPENAMES=s_wama&outputFormat=application/json") | |
x <- sf::st_transform(x, crs = 4326) | |
write_sf(x, "wassermarsch.geojson", delete_dsn=TRUE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Remove existing R installation. | |
# | |
sudo apt-get purge -y r-base-core | |
# Add keys. | |
# | |
# sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5 | |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 51716619E084DAB9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# see blog post: https://datawookie.netlify.com/blog/2017/09/building-a-local-osrm-instance/ | |
sudo apt update | |
sudo apt install -y git \ | |
cmake \ | |
build-essential \ | |
jq \ | |
liblua5.2-dev \ | |
libboost-all-dev \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://daten.berlin.de/datensaetze Erweiterte Suche | Veröffentlichende Stelle: | |
library(rvest) | |
read_html("https://daten.berlin.de/datensaetze") %>% | |
html_nodes(xpath = "//*[@id='edit-field-publisher-tid']/option") %>% | |
html_text() %>% | |
data.frame() %>% | |
readr::write_csv("ODB-field-publisher.csv") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://de-de.facebook.com/groups/dataninja/permalink/1978799319092483/ | |
# https://www.metoffice.gov.uk/pub/data/weather/uk/climate/datasets/Tmin/ranked/UK.txt | |
library(readr) | |
library(dplyr) | |
library(tidyr) | |
library(purrr) | |
v <- read_table(file = "https://www.metoffice.gov.uk/pub/data/weather/uk/climate/datasets/Tmin/ranked/UK.txt", | |
skip = 8, col_names = FALSE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(dplyr) | |
library(purrr) | |
library(glue) | |
library(tidyr) | |
lk <- data.frame(stringsAsFactors=FALSE, | |
gemziffer = c(12051, 12052, 12053, 12054, 12060, 12061, 12062, 12063, | |
12064, 12065, 12066, 12067, 12068, 12069, 12070, 12071, | |
12072, 12073), | |
Gebietsname = c("Brandenburg a.d. Havel", "Cottbus", "Frankfurt (Oder)", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Source: | |
# - https://fbinter.stadt-berlin.de/fb/index.jsp?loginkey=zoomStart&mapId=wmsk_06_06ewdichte2017@senstadt | |
# - https://fbinter.stadt-berlin.de/fb/berlin/service.jsp?id=s06_06ewdichte2017@senstadt&type=WFS | |
library(glue) | |
library(sf) | |
sf_fisbroker <- function(x) { | |
u1 <- glue("http://fbinter.stadt-berlin.de/fb/wfs/data/senstadt/{x}") | |
u2 <- glue("?service=wfs&version=2.0.0&request=GetFeature&TYPENAMES={x}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ID | TITLE | PRODUCT | COUNTRY | DATE | |
---|---|---|---|---|---|
ABC123 | EVENT A | PRODUCT A, PRODUCT B | COUNTRY A, COUNTRY B | GG-MM.YYYY | |
ABC124 | EVENT A | PRODUCT C, PRODUCT D, PRODUCT E | COUNTRY C, COUNTRY D, COUNTRY E | GG-MM.YYYY | |
ABC125 | EVENT A | PRODUCT F, PRODUCT G | COUNTRY F, COUNTRY G, COUNTRY H | GG-MM.YYYY |