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 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
pip install -e '.[dev]'

Linting

make lint

Testing

make test

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.2.0.tar.gz (690.2 kB view details)

Uploaded Source

Built Distribution

gridfinder-2.2.0-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gridfinder-2.2.0.tar.gz
  • Upload date:
  • Size: 690.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.8

File hashes

Hashes for gridfinder-2.2.0.tar.gz
Algorithm Hash digest
SHA256 fa9a8b4f92e89ce80606b4e84842a7609c3af37fd7eea536ca7ce0ecddd87a05
MD5 34a1938bded29eb50672b7055efc02a8
BLAKE2b-256 e185e32c6f08d77431b0610cd0607b09b02a64b8ab68d47b1c37c952ccd2874a

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: gridfinder-2.2.0-py3-none-any.whl
  • Upload date:
  • Size: 13.1 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 61c75bd7f7642111b3fa7552efd38b2cef95e2ae4a9bfd3be02793c61c45bcbf
MD5 603c15e59651d8bb642e7279e5bd931b
BLAKE2b-256 96e0abc9942d53d6df32940f319abe77b1219119c9560d3153a2b9129055a77f

See more details on using hashes here.

Provenance

Supported by

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