polaris.analyze.population.Population#
- class polaris.analyze.population.Population(households, persons, vehicles)#
Bases:
Population- __init__()#
Methods
__init__()combine_with(other, hh_id_offset)count(value, /)Return number of occurrences of value.
exclude_hh_ids(hh_ids_to_exclude[, reason])from_dir(polaris_dir[, demand_db_pattern])from_hdf5(file_path)from_sqlite(dir_or_demand)index(value[, start, stop])Return first index of value.
to_hdf5(file_path[, mode, complevel, complib])to_sqlite(path[, mode])mode is one of:
Attributes
Alias for field number 0
Alias for field number 1
Alias for field number 2
- to_hdf5(file_path: Path, mode='w', complevel=5, complib='blosc:zstd')#
- classmethod from_hdf5(file_path: Path) Population#
- classmethod from_dir(polaris_dir: Path, demand_db_pattern='*Demand.sqlite') Population#
- classmethod from_sqlite(dir_or_demand: Path) Population#
- to_sqlite(path: Path, mode='clean')#
- mode is one of:
clean - delete ALL existing data overwrite - replace existing data strict - raise error if data exists}
- exclude_hh_ids(hh_ids_to_exclude: set[int], reason='') Population#
- combine_with(other: Population, hh_id_offset: int) Population#
- count(value, /)#
Return number of occurrences of value.
- households#
Alias for field number 0
- index(value, start=0, stop=9223372036854775807, /)#
Return first index of value.
Raises ValueError if the value is not present.
- persons#
Alias for field number 1
- vehicles#
Alias for field number 2