GithubHelp home page GithubHelp logo

fagan2888 / gridfinder Goto Github PK

View Code? Open in Web Editor NEW

This project forked from carderne/gridfinder

0.0 1.0 0.0 21.18 MB

Algorithm for guessing MV grid location based on NTL

Home Page: https://gridfinder.readthedocs.io/en/latest/

License: MIT License

Python 98.49% Shell 1.51%

gridfinder's Introduction

gridfinder

PyPI version Documentation Status

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.

Documentation is available here.

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

Requirements

gridfinder requires Python >= 3.5 with the following packages installed:

  • numpy >=1.2.0
  • scikit-image >=0.14.1
  • rasterio >=1.0.13
  • geopandas >=0.4.0

These additional packages may be necessary depending on your configuration:

  • Rtree >= 0.8.3
  • affine >= 2.2.1
  • Pillow >= 5.3.0
  • pyproj >= 1.9.5.1
  • pytz >= 2018.7
  • descartes

And these for using an interactive notebook:

  • IPython
  • jupyter
  • matplotlib
  • seaborn
  • folium

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 -r requirements.txt

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!)

gridfinder's People

Contributors

carderne avatar dependabot[bot] avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.