Git Product home page Git Product logo

us-drought's Introduction

Tracking the Drought

This project builds a timeline of US drought conditions using data from the US Drought Monitor. It should produce an HTML page that can be embedded as an iframe.

Getting started

Building maps requires Mapnik 2. On OSX, the easiest way to install this is with homebrew:

$ brew install mapnik

Now go get lunch. This may take a while.

The rest of the build script is written in Python and can be safely tucked away in a virtual environment. Assuming you have virtualenvwrapper installed (and you should), do this:

$ mkvirtualenv drought --system-site-packages

Note that this environment will use your global site packages directory, which is unusual. We do this because installing Mapnik entirely inside a virtual environment is nearly impossible. This way, we install it once globally, then put everything else in an isolated space that won't pollute other projects.

Now we're ready to grab the code and build this thing. Clone the repo, install requirements and run the build script.

$ cdvirtualenv # go to the root of our new virtualenv (workon drought)
$ git clone [email protected]:npr/us-drought.git
$ cd us-drought
$ pip install -r requirements.txt
$ fab rebuild

To see the result:

$ python -m SimpleHTTPServer

Now go to http://localhost:8000.

To update map-slider:

  1. Download the latest shapefiles from the US Drought Monitor
  2. Unzip files and add them to the data directory. The folder and shapefile within should be named something like usdm120412.
  3. Run fab rebuild

us-drought's People

Contributors

dannydb avatar eyeseast avatar onyxfish avatar stiles 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.