Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sebhoerl committed Feb 14, 2024
1 parent d86634f commit a623143
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 9 deletions.
23 changes: 23 additions & 0 deletions docs/population.md
Original file line number Diff line number Diff line change
Expand Up @@ -290,3 +290,26 @@ config:
```
Running the pipeline again will add the `mode` colum to the `trips.csv` file and its spatial equivalent.

### Population projections

The pipeline allows to make use of population projections from INSEE up to 2021. The same methodology can also be used to scale down the population. The process takes into account the marginal distribution of sex, age, their combination, and the total number of persons. The census data for the base year (see above) is reweighted according to those marginals using *Iterative Proportional Updating*.

- To make use of the scaling, [download the projection data from INSEE](https://www.insee.fr/fr/statistiques/5894093?sommaire=5760764). There are various scenarios in Excel format that you can choose from. The default is the *Scénario centrale*, the central scenario.
- Put the downloaded file into `data/projection_2021`, so you will have the file `data/projection_2021/00_central.xlsx`

Then, activate the projection procedure by defining the projection year in the configuration:

```yaml
config:
# [...]
projection_year: 2030
```

You may choose any year (past or future) that is contained in the projection scenario Excel file. In case you want to use a different scenario, download the corresponding file, put it into the folder mentioned above, and choose the scenario name via configuration:

```yaml
config:
# [...]
projection_scenario: 00_central
```
18 changes: 9 additions & 9 deletions tests/test_determinism.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,17 @@ def _test_determinism(index, data_path, tmpdir):
synpp.run(stages, config, working_directory = cache_path)

REFERENCE_CSV_HASHES = {
"ile_de_france_activities.csv": "dcf8e08e9f238c90bff0298048251dac",
"ile_de_france_households.csv": "fa08f930689b27f9772c79d35075960d",
"ile_de_france_persons.csv": "ed87e2b6dfd2a9914d5fc7b2bf6d52d3",
"ile_de_france_trips.csv": "63425b21b452b65418db6f6d987a0162",
"ile_de_france_activities.csv": "e520003e1876a9542ff1a955a6efcfdc",
"ile_de_france_households.csv": "709ce7ded8a2487e6691d4fb3374754b",
"ile_de_france_persons.csv": "ddbe9b418c915b14e888b54efbdf9b1e",
"ile_de_france_trips.csv": "6c5f3427e41e683da768eeb53796a806",
}

REFERENCE_GPKG_HASHES = {
"ile_de_france_activities.gpkg": "f9e519cb5665c314431bcd16bbb8b1b8",
"ile_de_france_commutes.gpkg": "2e752795b7cd8e0cd4c8d32e736e455e",
"ile_de_france_homes.gpkg": "6f028d84944df9c4ae9342a47a932074",
"ile_de_france_trips.gpkg": "c5fdcff9416563823dd824c2a8ea85bd",
"ile_de_france_activities.gpkg": "4ef01c82b09e81e54cc6b7d59145123e",
"ile_de_france_commutes.gpkg": "a03554ee745e9a47a6b1ea4126a13c2a",
"ile_de_france_homes.gpkg": "3533f4756e3ee126618bb17f059033bd",
"ile_de_france_trips.gpkg": "982b83f27e231766d04b3f9351d84daa",
}

generated_csv_hashes = {
Expand Down Expand Up @@ -123,7 +123,7 @@ def _test_determinism_matsim(index, data_path, tmpdir):
REFERENCE_HASHES = {
#"ile_de_france_population.xml.gz": "e1407f918cb92166ebf46ad769d8d085",
#"ile_de_france_network.xml.gz": "5f10ec295b49d2bb768451c812955794",
"ile_de_france_households.xml.gz": "cdbd6ed5b175328861f237dc58dee1ff",
"ile_de_france_households.xml.gz": "64a0c9fab72aad51bc6adb926a1c9d44",
#"ile_de_france_facilities.xml.gz": "5ad41afff9ae5c470082510b943e6778",
"ile_de_france_config.xml": "f374807f12a5151fe1efb6e9904e1a56"
}
Expand Down

0 comments on commit a623143

Please sign in to comment.