tobler.dasymetric.masked_area_interpolate¶
-
tobler.dasymetric.
masked_area_interpolate
(source_df, target_df, raster='nlcd_2011', codes=None, force_crs_match=True, extensive_variables=None, intensive_variables=None, allocate_total=True, tables=None)[source]¶ Interpolate data between two polygonal datasets using an auxiliary raster to mask out uninhabited land.
- Parameters
- source_df
geopandas.GeoDataFrame
source data to be converted to another geometric representation.
- target_df
geopandas.GeoDataFrame
target geometries that will form the new representation of the input data
- raster
str
path to raster file that contains ancillary data. alternatively a user can pass ncld_2001 or nlcd_2011 to use built-in data from the National Land Cover Database
- codes
list
ofints
list of pixel values that should be considered part of the mask (the default is None). If no codes are passed, this defaults to [21, 22, 23, 24] which are the developed land use codes from the NLCD data
- force_crs_matchbool
whether to force the input and target data to share the same CRS (the default is True).
- extensive_variables
list
Columns of the input dataframe containing extensive variables to interpolate
- intensive_variables
list
Columns of the input dataframe containing intensive variables to interpolate
- allocate_totalbool
whether to allocate the total from the source geometries (the default is True).
- tables
tuple
oftwo
numpy.array
(optional) As generated from tobler.area_weighted.area_tables_raster (the default is None).
- source_df
- Returns
geopandas.GeoDataFrame
GeoDataFrame with geometries matching the target_df and extensive and intensive variables as the columns