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 BBBike or geofabrik, depending on your needs.
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
Install from GitHub
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
pip install -e '.[dev]'
You can run ./test.sh
in the directory, which will do an entire run through using the test data and confirm whether everything is set up properly.
(It will fail if jupyter isn't installed!)
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
File details
Details for the file gridfinder-2.0.2.tar.gz
.
File metadata
- Download URL: gridfinder-2.0.2.tar.gz
- Upload date:
- Size: 15.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | aa67d071437e926cd5a0662d2e63dfcfbd186e4452ab129603fcb7ef2faf7714 |
|
MD5 | 44f693b44de036bbe13eb185e329bf1f |
|
BLAKE2b-256 | b7febf2ee56963df0a41409faf2aff288c57d940f7097f34db19024c4200f7d2 |
Provenance
File details
Details for the file gridfinder-2.0.2-py3-none-any.whl
.
File metadata
- Download URL: gridfinder-2.0.2-py3-none-any.whl
- Upload date:
- Size: 13.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | afa934306510f87b68cd023061ed37ca6831a5369a68906d718c82f3cc7e0adc |
|
MD5 | 0e74fcda6e62ecb502077c490cf6d48f |
|
BLAKE2b-256 | ea1d52728d55501b667d6be2b1398ec1aa58a11220d9dee413f763cbfb945c48 |