Skip to main content

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:

Animated algorithm

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gridfinder-2.0.1.tar.gz (15.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gridfinder-2.0.1-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

Details for the file gridfinder-2.0.1.tar.gz.

File metadata

  • Download URL: gridfinder-2.0.1.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

Hashes for gridfinder-2.0.1.tar.gz
Algorithm Hash digest
SHA256 1eac28ae1ad705ee7d7412dabfa94cbbf9f64beceef272e08757fe4be1b1ca7a
MD5 16d6e9e7377cfc8be19daf6968d49e53
BLAKE2b-256 70e24d5c85da71fa83d7f31e7319e72d4b95f22c9725f737acde30a29fb8bcdc

See more details on using hashes here.

File details

Details for the file gridfinder-2.0.1-py3-none-any.whl.

File metadata

  • Download URL: gridfinder-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 13.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.8

File hashes

Hashes for gridfinder-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 55e5d269e1a058c9c28677f9c292e8953e0786355242dfba07b10ede96a87d01
MD5 a303da3dbbf4365f936ebad8d975e59a
BLAKE2b-256 7178d4263b1d236401a20020e4ce8886a53bfe5fcc23a208e22ae169e2b590fc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page