The goal of gesundheitsaemter
is to provide data sets for the analysis
of German Health Authorities (Gesundheitsaemter). The package includes
five different data sets collected from three different sources.
Data set name | Content | data source URL |
---|---|---|
health_departments | General overview of German Health Authorities (Gesundheitsaemter) | link |
authority_zip_range | All possible zip codes that are assigned to the health authority | link |
communities | All possible community names, be reminded that one community can have several zip codes and vice versa | link |
population_zip | Population and area assigned to every German zip code | link |
metadata_rki | Contact information and further information about the health authority | link |
metadata_google | Geo location in the health department data set is generated using the google maps api with the R package ggmap, this file includes or meta data of this interface | link |
You can install the released version of gesundheitsaemter
from
Github with:
devtools::install_github("gstephan30/gesundheitsaemter")
For users not wanting to install the data, direct download links are:
Every data set has an individual identifier for merging, this can be seen here:
<style> .aligncenter { text-align: center; } </style>The primary data set with an overview of all German Health Authorities
is health_departments
:
library(gesundheitsaemter)
health_departments
#> # A tibble: 399 x 8
#> authority_id name department street postalcode place long lat
#> <chr> <chr> <chr> <chr> <chr> <chr> <dbl> <dbl>
#> 1 1 Stadt Fl~ Fachbereich 2 ~ Norderst~ 24939 Flen~ 9.43 54.8
#> 2 2 Landesha~ Amt für Gesund~ Fleethör~ 24103 Kiel 10.1 54.3
#> 3 3 Hansesta~ Gesundheitsamt Sophiens~ 23560 Lübe~ 10.7 53.9
#> 4 4 Stadt Ne~ Gesundheitsamt Meßtorff~ 24534 Neum~ 9.99 54.1
#> 5 5 Kreis Di~ Fachdienst Ges~ Esmarchs~ 25746 Heide 9.08 54.2
#> 6 6 Kreis No~ Fachdienst Ges~ Damm 8 25813 Husum 9.05 54.5
#> 7 7 Kreis Os~ Fachdienst Ges~ Holstens~ 23701 Eutin 10.6 54.1
#> 8 8 Kreisver~ Fachdienst Ges~ Kurt-Wag~ 25337 Elms~ 9.70 53.7
#> 9 9 Kreis Re~ Fachdienst 4.3~ Kaiserst~ 24768 Rend~ 9.67 54.3
#> 10 10 Kreis Sc~ Fachdienst Ges~ Moltkest~ 24837 Schl~ 9.56 54.5
#> # ... with 389 more rows
With merging you can inspect the population covered by each health authority. For demonstration purposes we are just interested in health authorities of assigned to the city of Berlin.
library(dplyr)
berlin_departments <- health_departments %>%
filter(place == "Berlin") %>%
select(authority_id, name, long, lat) %>%
left_join(
authority_zip_range
) %>%
left_join(
population_zip
) %>%
group_by(authority_id, name, long, lat) %>%
summarise(total_population = sum(population, na.rm = TRUE)) %>%
arrange(desc(total_population))
berlin_departments %>%
knitr::kable("html") %>%
kableExtra::kable_styling("striped")
authority_id |
name |
long |
lat |
total_population |
---|---|---|---|---|
191 |
Bezirksamt Pankow von Berlin |
13.40958 |
52.56722 |
427902 |
189 |
Bezirksamt Mitte von Berlin |
13.32961 |
52.56222 |
386250 |
195 |
Bezirksamt Tempelhof-Schöneberg von Berlin |
13.37914 |
52.44589 |
360322 |
192 |
Bezirksamt Charlottenburg-Wilmersdorf von Berlin |
13.31146 |
52.48909 |
338414 |
196 |
Bezirksamt Neukölln von Berlin |
13.44643 |
52.45255 |
314923 |
194 |
Bezirksamt Steglitz-Zehlendorf von Berlin |
13.32567 |
52.45743 |
305501 |
190 |
Bezirksamt Friedrichshain-Kreuzberg von Berlin |
13.40984 |
52.49247 |
256021 |
200 |
Bezirksamt Reinickendorf von Berlin |
13.34767 |
52.57113 |
254399 |
199 |
Bezirksamt Lichtenberg von Berlin |
13.52422 |
52.50767 |
252169 |
198 |
Bezirksamt Marzahn-Hellersdorf von Berlin |
13.60615 |
52.53863 |
243939 |
197 |
Bezirksamt Treptow-Köpenick von Berlin |
13.53302 |
52.43471 |
238613 |
193 |
Bezirksamt Spandau von Berlin |
13.20109 |
52.53530 |
215305 |
399 |
Zentrum für tuberkulosekranke und -gefährdete Menschen, Berlin |
13.47689 |
52.51557 |
0 |
Plotting in relation to the covered population:
library(leaflet)
berlin_departments %>%
leaflet() %>%
addTiles() %>%
addCircleMarkers(
lng = ~long,
lat = ~lat,
fill = ~total_population,
radius = ~total_population/10000,
label = ~paste0(name, ", Population: ", total_population))