| Title: | Generate Density Rasters from Polygon and Census Data |
|---|---|
| Description: | Creates continuous density raster surfaces by joining vector spatial layers with tabular data frameworks, normalizing values by ellipsoidal polygon area calculations. Reconciles discrete boundary-constrained census or survey counts with uniform grids. Accepts spatial objects in-memory or via file paths. Methods are based on spatial rasterization workflows implemented in the 'terra' package Hijmans (2025) <https://rspatial.github.io/terra/>. |
| Authors: | Sahal Paladan [aut, cre] |
| Maintainer: | Sahal Paladan <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.2.0 |
| Built: | 2026-10-22 08:12:18 UTC |
| Source: | https://github.com/sahalpaladan/geodensityr |
Creates a continuous density raster surface by joining vector spatial layers with tabular data frameworks, normalizing values by ellipsoidal polygon area calculations.
generate_density_raster( spatial_target, attribute_table, join_spatial, join_attribute, value_col, resolution = 0.1, output = NULL )generate_density_raster( spatial_target, attribute_table, join_spatial, join_attribute, value_col, resolution = 0.1, output = NULL )
spatial_target |
A |
attribute_table |
A |
join_spatial |
Character. The indexing key column found within the spatial vector object. |
join_attribute |
Character. The indexing key column found within the attribute table. |
value_col |
Character. Numeric column containing values to evaluate for density calculation. |
resolution |
Numeric. The cell size resolution for the generated target output raster template. |
output |
Optional character. A target filepath string (.tif or .asc) to write the raster to disk. |
A terra::SpatRaster object representing computed density surfaces.
## Not run: # Example using in-memory data frames and vectors result <- generate_density_raster( spatial_target = standard_polygon_object, attribute_table = census_dataframe, join_spatial = "District_ID", join_attribute = "ID", value_col = "Population", resolution = 0.05 ) ## End(Not run)## Not run: # Example using in-memory data frames and vectors result <- generate_density_raster( spatial_target = standard_polygon_object, attribute_table = census_dataframe, join_spatial = "District_ID", join_attribute = "ID", value_col = "Population", resolution = 0.05 ) ## End(Not run)