Data used in the geomarketing chapter in Geocomputation with R. See https://r.geocompx.org/location.html for details.
census_de
metro_names
shopsA data.frame with census variables
A data.frame with metropolitan area information
An sf data.frame with POINT geometry
An object of class data.frame with 10 rows and 3 columns.
An object of class sf (inherits from data.frame) with 180035 rows and 3 columns.
A data.frame with German census data at 1km resolution. Contains columns: x, y (EPSG:3035 coordinates), pop (population count, 2022), women (percentage of women, 2011), mean_age (mean age in years, 2022), hh_size (average household size, 2022). Missing values are coded as -1.
A data.frame with metropolitan area names derived from Census 2022 population data. Contains columns: city, town, state. Generated by aggregating 1km population grid to 20km resolution, filtering cells with >500,000 inhabitants, and reverse geocoding centroids.
An sf data.frame of shop locations from OpenStreetMap for the identified metropolitan areas. Contains columns: osm_id, shop, geometry.
data("census_de", package = "spDataLarge")
head(census_de)
#> # A tibble: 6 × 6
#> x y pop women mean_age hh_size
#> <int> <int> <int> <dbl> <dbl> <dbl>
#> 1 4337500 2689500 4 -9 36.8 NA
#> 2 4341500 2689500 11 42.9 39.8 NA
#> 3 4341500 2690500 4 0 37.6 NA
#> 4 4340500 2691500 3 0 48.6 NA
#> 5 4341500 2691500 22 50 38.4 2.44
#> 6 4341500 2692500 21 55 51.3 2.22
data("metro_names", package = "spDataLarge")
metro_names
#> city town state
#> 1 Hamburg <NA> <NA>
#> 2 Berlin <NA> <NA>
#> 3 Langenhagen Langenhagen Niedersachsen
#> 4 Wülfrath Wülfrath Nordrhein-Westfalen
#> 5 Leipzig <NA> Sachsen
#> 6 Dresden <NA> Sachsen
#> 7 Frankfurt am Main <NA> Hessen
#> 8 Nürnberg <NA> Bayern
#> 9 Stuttgart <NA> Baden-Württemberg
#> 10 München <NA> Bayern
data("shops", package = "spDataLarge")
head(shops)
#> osm_id shop geometry
#> 10773945 10773945 <NA> 9.885622, 53.442166
#> 10773959 10773959 <NA> 9.885487, 53.442316
#> 25503823 25503823 <NA> 10.11822, 53.60602
#> 25503824 25503824 <NA> 10.11904, 53.60573
#> 25503825 25503825 <NA> 10.11619, 53.60462
#> 25503826 25503826 <NA> 10.1169, 53.6043