Skip to content

v1.2.0

Choose a tag to compare

@ngozzi ngozzi released this 12 May 13:03
· 5 commits to main since this release
2b38fc0

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_Name naming convention (e.g., United_States__Alabama__Autauga_County).
  • locations.csv new columns: level (0=country, 1=state/province/region, 2=US county) and iso_code (ISO 3166-1 alpha-2 for countries, ISO 3166-2 for states, 5-digit FIPS for counties).
  • get_available_locations() level filter: optional parameter to filter by geographic level. Backward-compatible with data_version="v1.1.0".
  • Numba JIT compilation for the multinomial probability computation (_multinomial_probs in utils.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_version bumped from "v1.1.0" to "v1.2.0" across load_epydemix_population(), get_available_locations(), and all EpiModel methods.
  • validate_population_name() error message now includes naming convention guidance and points users to get_available_locations().
  • Optimized compute_spontaneous_transition_rate() and compute_mediated_transition_rate() in epimodel.py to avoid unnecessary deepcopy on 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