Tools for optimizing placement of health workers and services based on village locations.
- Python 3.12 or higher.
- Python virtual environment
This section describes how to set up the tool and the demo web app.
- Activate your Python virtual environment and upgrade pip and build tools.
# Update pip and build package.
pip install --upgrade pip
pip install --upgrade build
pip install --upgrade setuptools
- Clone this repository or download and extract the source code. Then open a terminal and navigate to the root directory of the source code.
# Navigate to the root directory.
cd deepfacility
- Install the tool:
# Install the tool and required packages.
pip install -e .
Start the demo web app:
# Start the demo web app using `ux` command.
deepfacility ux
After you see the message Serving on ...
the demo web app is running.
Follow these steps to experience the workflow end-to-end:
- Open your web browser and navigate to http://localhost:8000 to access the demo web app.
- Follow instructions to "upload" and configure village locations .csv file.
- Note that this app is running on your local machine and all files are stored locally.
- Click
Prepare Data
to download and prepare input data: households and commune shapes. - Select locations (communes) and click
Run Clustering
to start the processing. - Visualize and explore village shapes and health facilities recommendations on a map.
- Obtain the results file.
Notes:
- This web app is only for demo purposes and is not intended for production use.
- To start a fresh copy of the app, without cached data, run
deepfacility reset
command before starting the app.
In this repository, we use the following terms and abbreviations:
-
Cluster
andVillage
refer to the same entity with small differences in context:- Cluster: a group of households.
- Village: spatial interpretation of a cluster.
-
Location
: an administrative area where the clustering is performed.- In this tool a location value is a colon-separated list of names of administrative levels, per configuration.
- For example, in Burkina Faso:
Tapoa:Diapaga
represents theDiapaga
commune from theTapoa
province.Tapoa:Diapaga:Mangou
represents a village from theDiapaga
commune.
-
Abbreviations:
- Health Facilities (HF)
- Empirical Cumulative Distribution Function (eCDF)
By default, the demo web app supports French and English languages. To add a support for additional languages see Add New Language section in the design document.
The system is using the following external data sources:
-
Open Buildings (Google)
W. Sirko, S. Kashubin, M. Ritter, A. Annkah, Y.S.E. Bouchareb, Y. Dauphin, D. Keysers, M. Neumann, M. Cisse, J.A. Quinn. Continental-scale building detection from high resolution satellite imagery. arXiv:2107.12283, 2021. -
GADM shapes for countries administrative areas
Packages listed in pyproject.toml
The code in this repository was developed by IDM to support our research into healthcare system capacity. We’ve made it publicly available under the MIT License to provide others with a better understanding of our research and an opportunity to build upon it for their own work. We make no representations that the code works as intended or that we will provide support, address issues that are found, or accept pull requests. You are welcome to create your own fork and modify the code to suit your own modeling needs as contemplated under the MIT License.