A processing job used to populate demography data from the French institute INSEE.
The k-population job allows to ingest the INSEE 200m grid data starting from a set of GeoPackages. The data are stored within a MongoDB database, more precisely in a population collection, so that spatial analysis can be performed on-demand.
All records are stored in GeoJson format.
| Variable | Description |
|---|---|
DB_URL |
The Mongo DB database URL. The default value is mongodb://127.0.0.1:27017/kano |
DB_COLLECTION |
The Mongo DB target collection. The default value is population |
You need to mount the input data in the data folder, e.g. like this on a local development environment:
docker build -f dockerfile -t kalisio/k-population .
docker run --name k-population --rm -it -e "DB_URL=mongodb://host.docker.internal:27017/kano" -v E:\GeoData\Filosofi2015_carreaux_200m_gpkg:/opt/k-population/data kalisio/k-population
We personally use Kargo to deploy the job as a before hook whenever an application requires the data.
To avoid generating data multiple times you can easily dump/restore it from/to MongoDB databases:
mongodump --host=localhost --port=27017 --username=user --password=password --db=kano --collection=population --gzip --out dump
mongorestore --db=kano --gzip --host=mongodb.example.net --port=27018 --username=user --password=password --collection=population dump/kano/population.bson.gzPlease refer to contribution section for more details.
This project is sponsored by
This project is licensed under the MIT License - see the license file for details
