
We have created both an API and browser-based map that displays data from our API. The API is using Apollo Federation gateway to stitch together schemas from multiple GraphQL APIs. There are two GraphQL APIs which are separated by type of measurement they provide. First API provides Aerosol Optical Depth data taken from pre-generated data from NASA satellites Terra and Aqua (MODIS instrument) with possible integration to other satellites. Second API provides Air Quality Index as well as many other pollutant measurements, taken from WAQI API, which is free and open to public use. We have also integrated with 'fake' home sensor to illustrate how data can be gathered from multiple sources that we later map to our resources.
This architecture allows us to achieve couple of things:
Our browser-based map is based on Google Maps API, and demonstrates what data our API currently provides in an interactive way. It's goal is to be simplistic and user-friendly, and we have future plans to add measurement explanations, air quality predictions as well as extreme situation notifications.
Our proof-of-concept of browser-based map is hosted on Heroku here: http://nasa-air-pollution-app.herokuapp.com/
Our API is also hosted on heroku. Example curl request:
curl -X POST \
http://air-pollution-api.herokuapp.com/ \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{"query":"{ getStations(minLat: 56.065, minLong: 21.182, maxLat: 54.315, maxLong: 25.481) { name, latitude, longitude, aqi } }"}'
API github repository: https://github.com/lnternet/air-pollution-api
Browser-based map repository: https://gitlab.com/nasa-challenge/air-pollution
Resources: pre-generated MODIS data included in challenge example resources, WAQI API, Google Maps API.