API reference

Area Weighted

Area weighted approaches use the area of overlap between the source and target geometries to weight the variables being assigned to the target

area_interpolate(source_df, target_df[, ...])

Area interpolation for extensive, intensive and categorical variables.

area_join(source_df, target_df, variables)

Join variables from source_df based on the largest intersection.

Dasymetric

Dasymetric approaches use auxiliary data in addition to use the area of overlap between the source and target geometries to weight the variables being assigned to the target

extract_raster_features(gdf, raster_path[, ...])

Generate a geodataframe from raster data by polygonizing contiguous pixels with the same value using rasterio's features module.

masked_area_interpolate(source_df, ...[, ...])

Interpolate data between two polygonal datasets using an auxiliary raster to mask out uninhabited land.

masked_dot_density(source_df, raster, ...[, ...])

Simulate a point pattern process within each source polygon while using raster data to mask out uninhabited areas of the each geometry.

Model

Model based approaches use additional spatial data, such as a land cover raster, to estimate the relationships between population and the auxiliary data. It then uses that model to predict population levels at different scales

glm([source_df, target_df, raster, ...])

Train a generalized linear model to predict polygon attributes based on the collection of pixel values they contain.

Pycnophylactic

Pycnophylactic interpolation is based on Tobler’s technique for generating smooth, volume-preserving contour maps

pycno_interpolate(source_df, target_df, ...)

Pycnophylactic Inerpolation.

Util

Utility Functions

h3fy(source[, resolution, clip, buffer, ...])

Generate a hexgrid geodataframe that covers the face of a source geodataframe.

dot_density(gdf, columns[, scale, method, ...])

Draw a sample of points inside each polygon/multipolygon row of a geodataframe, where sample size is one or more columns on the dataframe, optionally scaled by a constant.