13.9 Exercises
We have used
raster::rasterFromXYZ()
to convert ainput_tidy
into a raster brick.Try to achieve the same with the help of thesp::gridded()
function.Download the csv file containing inhabitant information for a 100-m cell resolution (https://www.zensus2011.de/SharedDocs/Downloads/DE/Pressemitteilung/DemografischeGrunddaten/csv_Bevoelkerung_100m_Gitter.zip?__blob=publicationFile&v=3).Please note that the unzipped file has a size of 1.23 GB.To read it into R, you can use
readr::read_csv
.This takes 30 seconds on my machine (16 GB RAM)data.table::fread()
might be even faster, and returns an object of classdata.table()
.Useas.tibble()
to convert it into a tibble.Build an inhabitant raster, aggregate it to a cell resolution of 1 km, and compare the difference with the inhabitant raster (inh
) we have created using class mean values.Suppose our bike shop predominantly sold electric bikes to older people.Change the age raster accordingly, repeat the remaining analyses and compare the changes with our original result.
References
Tomintz, Melanie N M.N., Graham P Clarke, and Janette E J.E. Rigby. 2008. “The Geography of Smoking in Leeds: Estimating Individual Smoking Rates and the Implications for the Location of Stop Smoking Services.” Area 40 (3): 341–53.
Muenchow, Jannes, Petra Dieker, Jürgen Kluge, Michael Kessler, and Henrik von Wehrden. 2018. “A Review of Ecological Gradient Research in the Tropics: Identifying Research Gaps, Future Directions, and Conservation Priorities.” Biodiversity and Conservation 27 (2): 273–85. https://doi.org/10.1007/s10531-017-1465-y.
Longley, Paul. 2015. Geographic Information Science & Systems. Fourth edition. Hoboken, NJ: Wiley.
Huff, David L. 1963. “A Probabilistic Analysis of Shopping Center Trade Areas.” Land Economics 39 (1): 81–90. https://doi.org/10.2307/3144521.
Wieland, Thomas. 2017. “Market Area Analysis for Retail and Service Locations with MCI.” The R Journal 9 (1): 298–323.