Kepler.gl visualization of the OECD Sahel and West Africa Club Secretariat Spatial Conflict Dynamics indicator.
This is a simple adaptation of ngz-geoviz without the Django backend. This simplified static Kepler setup is suitable for non-realtime datasets that do not require a backend server, especially historical time series datasets that do not change.
- Python >= 3.8 (for importing the data)
- Node >= 16 (for running the visualization app)
We recommend creating your own conda env:
conda create -n scdi-geoviz
conda activate scdi-geoviz
conda install -c conda-forge --file requirements.txt
Alternatively, if you are using pyenv, use a miniconda pyenv which contains conda wheels to make installing all dependencies easier:
pyenv install miniconda-latest
pyenv local miniconda-latest
pip install -r requirements.txt
You must have your SCDi shapefile in dataset
directory. The import script will create all datasets in csv and json formats for use in kepler.gl. They are saved in the frontend/public/data
directory:
python ./import_shp.py
You need to have a Mapbox account to use Mapbox background maps. Once you have created a Mapbox account, copy your public API token from the Mapbox tokens page and paste it in the /frontend/.env file.
Then, just
npm install yarn
cd frontend
yarn
yarn start
Read the full instructions for developing the React app in /frontend/README.md.
Let's assume you want to add a dataset by the name myData
and possibly a new map config myConfig
.
- Place the data in
frontend/public/data
directory in either csv or json format. File name ismyData.csv
ormyData.json
. - Id
myData
, label and type of the dataset must be defined infrontend/src/constants/settings.js
. In the same file, you may add the dataset in an existing map config or add a new configmyConfig
for the dataset. - The Kepler map configs for each map view are in
frontend/public/config
. Edit an existing view config or addmyConfig.json
if you added a new map config. - If you added a new map config, add a preview image
myConfig.png
of your map in the menu tofrontend/public/images
.
Included are international boundary data from World Bank CC-BY 4.0.