Algorithm for guessing MV grid network based on night time lights
Project description
gridfinder
gridfinder uses night-time lights imagery to as an indicator of settlements/towns with grid electricity access. Then a minimum spanning tree is calculated for these connect points, using a many-to-many variant Dijkstra algorithm and using existing road networks as a cost function. Adapted from this work from Facebook. Currently gridfinder only uses road networks, but it would be trivial to add other cost parameters such as slope or terrain.
The algorithm looks as follows in process, guessing the grid network for Uganda:
Input requirements
gridfinder requires the following data sources:
- VIIRS data, monthly and annual composites available here.
- OSM highway data, most easily available using the HOT Export Tool, otherwise geofabrik
Model usage
To get to grips with the API and steps in the model, open the Jupyter notebook example.ipynb
.
This repository includes the input data needed to do a test run for Burundi, so it should be a matter of openening the notebook and running all cells.
Installation
Install with pip
pip install gridfinder
Note: On some operating systems (Ubuntu 18.04), you may get an error about libspatialindex
. To overcome this on Ubuntu, run:
sudo apt install libspatialindex-dev
Development
Download or clone the repository and install the required packages (preferably in a virtual environment):
git clone https://github.com/carderne/gridfinder.git
cd gridfinder
rye sync
Useful commands:
rye fmt
rye lint
rye run check # type check
rye run test
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for gridfinder-3.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 11d73c3b1713e0362c4d6a6340679699c2f7c1e5b6a48a7bf3f3eeebe35aa4fe |
|
MD5 | 09706d0ea8b4167975287fe2b5cf3184 |
|
BLAKE2b-256 | efc9d24411c33370f48baabb31fd2eb522c6b900a0b6089cfe433675802028e1 |