Build population
Rules for building the population data by region
build_population(data_path=None)
Build the population data by region
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data_path
|
PathLike
|
the path to the pop csv. Defaults to None. |
None
|
Source code in workflow/scripts/build_population.py
load_pop_csv(csv_path)
Load the national bureau of statistics of China population (Yearbook - Population, table 2.5 pop at year end by Region)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
csv_path
|
Pathlike
|
the csv path |
required |
Returns:
Type | Description |
---|---|
DataFrame
|
pd.DataFrame: the population for constants.POP_YEAR by province |
Raises: ValueError: if the province names are not as expected