popexposure: An open-source Python package to find the number of people residing near environmental hazards quickly and efficiently - McBrien, Heather; Casey, Joan A; Chillrud, Lawrence G; Flores, Nina M; Wilner, Lauren B (medRxiv : the preprint server for health sciences, 2025)
Environmental scientists often assess exposure to hazards using residential proximity (i.e., they consider an individual living near a hazard to be exposed). Such assessment requires large, fine-scale spatial datasets that describe locations of environmental hazards and residential populations. Manipulating such datasets is technically demanding, slow, memory-intensive, and difficult to optimize for speed and memory use. Currently, individual research teams each write their own algorithms for this task. This may lead to inconsistencies in assumptions, methods, and results. We developed an open-source Python package, popexposure , which quickly, efficiently, and consistently estimates the number of people living near environmental hazards. Given a set of distinct hazard geometries and corresponding buffer distances, popexposure can estimate the number of people living within the buffered area of each hazard using a gridded population dataset. popexposure can also estimate the number of people living within the buffer distance of each hazard by additional administrative geographies. For example, users can calculate the number of people exposed to hazards in each census tract or zip code tabulation area (ZCTA). popexposure addresses common issues encountered in this calculation: whether or not to double-count people exposed to more than one hazard, proper pixel apportionment, choosing appropriate map projections for data covering large areas, and optimizing speed and memory. In this paper, we describe popexposure 's functionality and provide an example use case, calculating the proportion of people exposed to any wildfire burn zone disaster in California in 2018 in each ZCTA.Environmental scientists often assess exposure to hazards using residential proximity (i.e., they consider an individual living near a hazard to be exposed). Such assessment requires large, fine-scale spatial datasets that describe locations of environmental hazards and residential populations. Manipulating such datasets is technically demanding, slow, memory-intensive, and difficult to optimize for speed and memory use. Currently, individual research teams each write their own algorithms for this task. This may lead to inconsistencies in assumptions, methods, and results. We developed an open-source Python package, popexposure , which quickly, efficiently, and consistently estimates the number of people living near environmental hazards. Given a set of distinct hazard geometries and corresponding buffer distances, popexposure can estimate the number of people living within the buffered area of each hazard using a gridded population dataset. popexposure can also estimate the number of people living within the buffer distance of each hazard by additional administrative geographies. For example, users can calculate the number of people exposed to hazards in each census tract or zip code tabulation area (ZCTA). popexposure addresses common issues encountered in this calculation: whether or not to double-count people exposed to more than one hazard, proper pixel apportionment, choosing appropriate map projections for data covering large areas, and optimizing speed and memory. In this paper, we describe popexposure 's functionality and provide an example use case, calculating the proportion of people exposed to any wildfire burn zone disaster in California in 2018 in each ZCTA.Environmental epidemiologists often assess exposure to hazards using residential proximity (i.e., they consider an individual exposed if they live near a hazard). This computation presents technical difficulties, and different research teams each apply their own solution, since no software currently exists to do this task. We developed an open-source Python package, popexposure , which quickly, efficiently, and consistently estimates the number of people living near environmental hazards. Here, we describe the package and provide an example use case, applying popexposure to compute the proportion of people exposed to any wildfire burn zone disaster in California in 2018 in each ZCTA.What this study addsEnvironmental epidemiologists often assess exposure to hazards using residential proximity (i.e., they consider an individual exposed if they live near a hazard). This computation presents technical difficulties, and different research teams each apply their own solution, since no software currently exists to do this task. We developed an open-source Python package, popexposure , which quickly, efficiently, and consistently estimates the number of people living near environmental hazards. Here, we describe the package and provide an example use case, applying popexposure to compute the proportion of people exposed to any wildfire burn zone disaster in California in 2018 in each ZCTA.