
Read gridded HYDE urban population onto WHEP's grid.
Source:R/hyde_population.R
read_hyde_population.RdReads the HYDE baseline-scenario urban population count (urbc, native
5-arcmin ESRI ASCII grid, total people per native cell) for one or more
calendar years and aggregates it to WHEP's 0.5-degree grid by summing the
6x6 fine cells inside each 0.5-degree block, since population count is an
extensive quantity. Each requested year is read from its own
"{year}AD_pop.zip" archive.
Arguments
- hyde_dir
Path to the directory holding the HYDE
"{year}AD_pop.zip"archives. Defaults toSys.getenv("WHEP_HYDE_DIR").- years
Integer vector of calendar years to read (
AD, so>= 1). Required: each year is a real unzip-and-parse of a ~150MB archive, so there is no default range.- example
If
TRUE, return a small fixture instead of reading data. Defaults toFALSE.