get_phhs_single {pseudohouseholds} | R Documentation |
Get Pseudo-Households (PHH) for a single region
Description
Get Pseudo-Households (PHH) for a single region
Usage
get_phhs_single(
region,
region_idcol,
roads,
region_popcol = NA,
roads_idcol = NA,
phh_density = 0.005,
min_phh_pop = 5,
min_phhs_per_region = 1,
min_phh_distance = 25,
road_buffer_m = 5,
delta_distance_m = 5,
skip_unpopulated_regions = TRUE,
track_warnings = FALSE
)
Arguments
region |
simple feature object, one-row sf tibble |
region_idcol |
character, name of column with unique region id |
roads |
simple feature object, lines or polylines with road network |
region_popcol |
character, name of column with region population |
roads_idcol |
character, name of column containing road unique identifiers |
phh_density |
numeric, parameter given to sf::st_line_sample() |
min_phh_pop |
numeric, minimum population per phh |
min_phhs_per_region |
numeric, minimum phhs per region (it will try its best) |
min_phh_distance |
numeric, minimum distance between phhs in meters |
road_buffer_m |
numeric, buffer in meters for intersections |
delta_distance_m |
numeric, buffer in meters for intersections |
skip_unpopulated_regions |
boolean, should we skip regions with no population? |
track_warnings |
boolean, internal parameter used when this function is called by get_phhs_parallel() to ensure warnings are only shown once. |
Value
a simple feature object with one row per phh in the region
Examples
phhs <- get_phhs_single(region = region_shp, region_idcol = "region_id",
region_popcol = "population", roads = road_shp, roads_idcol = "road_id")