── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr 1.1.4 ✔ readr 2.1.5
✔ forcats 1.0.0 ✔ stringr 1.5.1
✔ ggplot2 3.5.1 ✔ tibble 3.2.1
✔ lubridate 1.9.3 ✔ tidyr 1.3.1
✔ purrr 1.0.2
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag() masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(geojsonio)
Registered S3 method overwritten by 'geojsonsf':
method from
print.geojson geojson
Attaching package: 'geojsonio'
The following object is masked from 'package:base':
pretty
library(sf)
Linking to GEOS 3.10.2, GDAL 3.4.1, PROJ 8.2.1; sf_use_s2() is TRUE
library(paletteer)library(ggthemes)
# https://github.com/linusha/wahlkreise-25-geometry/if(!file.exists("germany-25-wahlkreise.geojson"))download.file("https://raw.githubusercontent.com/linusha/wahlkreise-25-geometry/refs/heads/main/germany-25-wahlkreise.geojson", "germany-25-wahlkreise.geojson")wahlkreise_map <-geojson_read("germany-25-wahlkreise.geojson", what ="sp")wahlkreise_sf <-st_as_sf(wahlkreise_map)
ℹ Using "','" as decimal and "'.'" as grouping mark. Use `read_delim()` for more control.
Rows: 15617 Columns: 19
── Column specification ────────────────────────────────────────────────────────
Delimiter: ";"
chr (9): Wahlart, Gebietsart, Gebietsnummer, Gebietsname, UegGebietsart, Ueg...
dbl (8): Gruppenreihenfolge, Stimme, Anzahl, Prozent, VorpAnzahl, VorpProzen...
num (1): Wahltag
lgl (1): Bemerkung
ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.