Giter Site home page Giter Site logo

gaze's Introduction

Gaze is a web service that can do the following:

* Find the population density at a particular point (using GPW data)
* Return the radius of a circle around a point containing a number of people
* Find placenames around a point, limited to population or distance.
* Perform a placename geocoding of a search query (using USGS and GEOnet Names data)
* Return the ISO country code for an IP address

It is used on e.g. FixMyStreet to work out how wide to search to show reports
for a particular map, or on PledgeBank for local search.

Installation
============

$ git clone git://github.com/mysociety/gaze.git
$ mkdir gaze-data
$ cd gaze
$ cp conf/general-example conf/general

Edit the conf/general file to have the database connection parameters, and the
location of two directories to store the Xapian and GPW data.

Set up a PostgreSQL database called gaze.

Fetch the single compressed zip that contains the entire country files dataset
from http://earth-info.nga.mil/gns/html/namefiles.htm and unzip it in the
gaze-data directory. For the US, fetch and unzip the Populated Places dataset
from http://geonames.usgs.gov/ in the same place.

Then run the following (replacing the input filenames with whatever you've just
downloaded):

$ psql gaze gaze < db/schema.sql
$ cd ../gaze-data
$ ../gaze/bin/usgs-geonames-parse < P_PLACES_20111204.txt
$ ../gaze/bin/xapian-index US
$ ../gaze/bin/geonames-split < geonames_dd_dms_date_20111212.txt
$ ../gaze/bin/load-all

This will set up all the place name related stuff. TODO: Document gpw-parse
beyond the comments in it - converting Gridded Population of the World data
into the format Gaze uses.

gaze's People

Contributors

dracos avatar zarino avatar

Watchers

 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.