Biodiversity & Protected Areas¶
| Class | Key params | Returns | Data source | Description |
|---|---|---|---|---|
KeyBiodiversityAreas |
country_code_iso3=None, worldpop_version=1 |
raster | S3 WRI cities-indicators KBA GeoJSONs, rasterized | Binary mask of pixels inside a Key Biodiversity Area. |
ProtectedAreas |
status=[...], status_year=2024, iucn_cat=[...] |
vector | GEE WCMC/WDPA/current/polygons |
Officially protected area polygons (WDPA), filtered by status/IUCN category. |
SpeciesRichness |
taxon=GBIFTaxonClass.BIRDS, start_year=2019, end_year=2024, mask_layer=None |
vector (1-row) | GBIF occurrence API (research-grade) | Estimated species richness via species-accumulation curve extrapolation. |
API¶
city_metrix.layers.key_biodiversity_areas.KeyBiodiversityAreas ¶
KeyBiodiversityAreas(country_code_iso3=None, worldpop_version=1, **kwargs)
Bases: Layer
MINOR_NAMING_ATTS
class-attribute
instance-attribute
¶
MINOR_NAMING_ATTS = ['worldpop_version']
Attributes: country_code_iso3 must be one of the countries currently supported in Cities Data (plus USA for testing)
get_data ¶
get_data(bbox: GeoExtent, spatial_resolution=None, resampling_method=None, force_data_refresh=False)
city_metrix.layers.protected_areas.ProtectedAreas ¶
ProtectedAreas(status=['Inscribed', 'Adopted', 'Designated', 'Established'], status_year=2024, iucn_cat=['Ia', 'Ib', 'II', 'III', 'IV', 'V', 'VI', 'Not Applicable', 'Not Assigned', 'Not Reported'], **kwargs)
Bases: Layer
MINOR_NAMING_ATTS
class-attribute
instance-attribute
¶
MINOR_NAMING_ATTS = ['status_year', 'status', 'iucn_cat']
Attributes: status: Proposed, Inscribed, Adopted, Designated, or Established status_year: integer, year when status was set iucn_cat: IUCN management category, one of: Ia (strict nature reserve), Ib (wilderness area), II (national park), III (natural monument or feature), IV (habitat/species management area), V (protected landscape/seascape), VI (PA with sustainable use of natural resources), Not Applicable, Not Assigned, or Not Reported.
get_data ¶
get_data(bbox: GeoExtent, spatial_resolution=None, resampling_method=None, force_data_refresh=False)
city_metrix.layers.species_richness.GBIFTaxonClass ¶
city_metrix.layers.species_richness.SpeciesRichness ¶
SpeciesRichness(taxon=GBIFTaxonClass.BIRDS, start_year=2019, end_year=2024, mask_layer=None, **kwargs)
Bases: Layer
Layer for estimating species richness using GBIF/iNaturalist data.
Attributes: taxon: Enum value from GBIFTaxonClass start_year, end_year: years used for data retrieval mask_layer: Optional mask to filter valid regions