Skip to content

stuartlynn/WOFGraphQL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WOFGraphQL

This is a proof of concept GraphQL interface for Who's On First

Play with it on heroku( it's not backed by a paid dyno so it might be down when you try ....)

https://wofgraphql.herokuapp.com/graphql

Instructions

To run locally, put your mapzen_api_key in a .env file. Then simply do:

npm install
npm start

Then head to http://localhost:4000/graphql

Example queries

{
  locality(lat:40.7048504  lng: -73.9368162 ){
    wof_name
    geometry 	
    neighbourhood{
      wof_name
      geom_area_square_meter
      microhood{
        wof_name
      }
    }
  }
}
{
  neighbourhood(name:"Canarsie"){
    wof_name
    wof_children
    geometry
  }
}
{
  macroregion(near:[42.274878 -2.517017] radius:200){
    wof_name
    wof_children
    parents {
      wof_id
      wof_parent_id
      wof_name
      wof_placetype
      geom_latitude
      geom_longitude
      geom_area
      geom_area_square_meter
      geom_bbox
      git_url
    }
  }
}

Next steps

  • Integrate with Census API to bring back census variables/geoms based on WOF regions
  • Build visual interface to view the results of the query

About

A proof of concept for accessing Who's On First with GraphQL queries

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published