Python script - census population estimation for wastewater-based epidemiology
Description
A simple python script to automate estimating the census population size from census area units for wastewater treatment plants using cadastral data. Datasets required: 1) A wastewater catchment polygon, 2) census area unit shapefile with asscociated population data (e.g., meshblocks, statistical areas etc) and 3) cadastral features as shapefiles (this could be street addresses, property parcels, building footprints). This script works by counting the total number of cadastral features that are within each census area unit and the number of these cadastal features which also reside within the wastewwater catchment for that census area unit. This script will create two fields in the attribute table of the census area unit shapefile: 1) 'Prop_tot': a count of the total number of cadastal features within each specific census area unit and 2) 'Prop-sub': a count of the total number of cadastral features in that census area unit which resides within the wastewater catchment. If a census area unit is fully within the wastewater catchment, these two fields will have the same count. For each census area unit, multiply the population count by the proportion of castasdal features (Prop_sub/Prop_tot) which reside within the wastewater catchment. Sum these resultant population counts to calculate the population connected to the wastewater treatment plant.