Skip to content

Combine datasets to one region or province

marliekeverweij edited this page Feb 1, 2019 · 11 revisions
  1. Go to ETLocal branch: dataset-amalgamator (there the script is located to combine the regions)
  2. Run in your terminal: python3 app/services/dataset_combiner.py geo_id=<geo_id> name=<dataset_name> migration_name=<migration_name> dataset_ids=<id1,id2,id3...> (make sure there are only commas between the ids and no spaces)
  3. Check in the etlocal/db/migrate folder if a new folder is created for this migration
  4. Check the commits.yml: are all datasets you wanted to combine stated here? (you can also correct the spelling when necessary)
  5. If everything is fine: create a new branch, commit the new files and create a PR.

If you want to migrate the new region into a database:

  1. Make sure your ETLocal .env file contains the correct export root. This either has to be EXPORT_ROOT=localhost:3000 (if you want to migrate it into your local database) or EXPORT_ROOT=beta-local.energytransitionmodel.com (if you want to migrate it into the BETA-database)
  2. Run in your terminal: rake db:migrate
Clone this wiki locally