v1.2.0
What's Changed
Added
- US county-level geographies (~3,144 locations) from epydemix-data v1.2.0. Counties are stored using the
Country__State__County_Namenaming convention (e.g.,United_States__Alabama__Autauga_County). locations.csvnew columns:level(0=country, 1=state/province/region, 2=US county) andiso_code(ISO 3166-1 alpha-2 for countries, ISO 3166-2 for states, 5-digit FIPS for counties).get_available_locations()levelfilter: optional parameter to filter by geographic level. Backward-compatible withdata_version="v1.1.0".- Numba JIT compilation for the multinomial probability computation (
_multinomial_probsinutils.py), eliminating interpreter overhead on the hot simulation path.
Changed
- Location names now use
_for spaces within a name and__as a hierarchy separator (e.g.,United_States__Alabama__Autauga_County). Existing country and state names have been renamed consistently. - Default
data_versionbumped from"v1.1.0"to"v1.2.0"acrossload_epydemix_population(),get_available_locations(), and allEpiModelmethods. validate_population_name()error message now includes naming convention guidance and points users toget_available_locations().- Optimized
compute_spontaneous_transition_rate()andcompute_mediated_transition_rate()inepimodel.pyto avoid unnecessarydeepcopyon the hot simulation path.
Quick start
from epydemix.population import get_available_locations, load_epydemix_population
# Browse all 3,600+ geographies
get_available_locations() # all levels
get_available_locations(level=0) # countries only
get_available_locations(level=1) # states / provinces
get_available_locations(level=2) # US counties
# Load a US county
pop = load_epydemix_population("United_States__New_York__New_York_County")Full changelog: https://github.com/epistorm/epydemix/blob/main/CHANGELOG.md