The Project CCHAIN dataset is a validated, open-sourced linked dataset measuring 20 years (2003-2022) of climate, environmental, socioeconomic, and health variables at the barangay (village) level across 12 Philippine cities. We provide here the code used to generate the barangay level tabular extracts from our various geospatial sources.
Please see our main documentation page for more details
01-aoi_generation
- Prepares official administrative boundaries for the target cities.02-dataset_alignment
- Contains notebooks that process various data sources (in vector, raster, and tabular formats) into consistent barangay-level tabular extracts.03-baseline_model
- Contains notebooks for the sample outbreak detection model.04-analytics
- Obtains insights from the produced datasets in the form of visualizations
This repository is under Apache 2.0, which allows all developers to freely use, modify, and share software on an “as-is” basis, meaning without any warranties. When making changes, developers are required to document changes to the original code.
This repo assumes the use of conda for simplicity in installing GDAL.
- Python 3.9
- make
- conda
Run this the very first time you are setting-up the project on a machine to set-up a local Python environment for this project.
- Install miniconda for your environment if you don't have it yet.
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh
- Create a local conda env and activate it. This will create a conda env folder in your project directory.
make conda-env
conda activate <env name>
- Run the one-time set-up make command.
make setup
To run automated tests, simply run make test
.
Over the course of development, you will likely introduce new library dependencies. This repo uses pip-tools to manage the python dependencies.
There are two main files involved:
requirements.in
- contains high level requirements; this is what we should edit when adding/removing librariesrequirements.txt
- contains exact list of python libraries (including depdenencies of the main libraries) your environment needs to follow to run the repo code; compiled fromrequirements.in
When you add new python libs, please do the ff:
-
Add the library to the
requirements.in
file. You may optionally pin the version if you need a particular version of the library. -
Run
make requirements
to compile a new version of therequirements.txt
file and update your python env. -
Commit both the
requirements.in
andrequirements.txt
files so other devs can get the updated list of project requirements.
Note: When you are the one updating your python env to follow library changes from other devs (reflected through an updated requirements.txt
file), simply run pip-sync requirements.txt