GithubHelp home page GithubHelp logo

nbumbarger / openaq-fetch Goto Github PK

View Code? Open in Web Editor NEW

This project forked from openaq/openaq-fetch

0.0 2.0 0.0 191 KB

A tool to collect data for OpenAQ platform.

License: MIT License

Shell 1.66% JavaScript 98.34%

openaq-fetch's Introduction

OpenAQ Data Ingest Pipeline

Build Status

Overview

This is the main data ingest pipeline for the OpenAQ project.

Starting with index.js, there is an ingest mechanism to gather global air quality measurements from a variety of sources. This is currently run every 10 minutes and saves all unique measurements to a database.

openaq-api powers the API and more information on the data format can be found in openaq-data-format.

Installing & Running

To run the API locally, you will need both Node.js and PostgreSQL installed.

Install necessary Node.js packages by running

npm install

Make sure you have a PostgreSQL database available (with PostGIS extension) and have the DB settings in knexfile.js.

Now you can get started with:

node index.js --help

For production deployment, you will need to have certain environment variables set as in the table below

Name Description Default
SENDGRID_PASSWORD Email service password not set
SENDGRID_USERNAME Email service username not set
API_URL URL of openaq-api http://localhost:3004/v1/webhooks
WEBHOOK_KEY Secret key to interact with openaq-api '123'
AIRNOW_FTP_USER User for AirNow FTP not set
AIRNOW_FTP_PASSWORD Password for AirNow FTP not set

Tests

To confirm that everything is working as expected, you can run the tests with

npm test

Deployment

Deployment is handled automatically via Travis on the master branch and is deployed to Amazon's ECS.

Data Source Criteria

This section lists the key criteria for air quality data aggregated onto the platform. A full explanation can be accessed here. OpenAQ is an ever-evolving process that is shaped by its community: your feedback and questions are actively invited on the criteria listed in this section.

(1) Data must be of one of these pollutant types: PM10, PM2.5, sulfur dioxide (SO2), carbon monoxide (CO), nitrogen dioxide (NO2), ozone (O3), and black carbon (BC).

(2) Data must be from an official-level outdoor air quality source, as defined as data produced by a government entity or international organization. We do not, at this stage, include data from low-cost, temporary, and/or indoor sensors. 

(3) Data must be ‘raw’ and reported in physical concentrations on their originating site. Data cannot be shared in an 'Air Quality Index' or equivalent (e.g. AQI, PSI, API) format.

(4) Data must be at the ‘station-level,’ associable with geographic coordinates, not aggregated into a higher (e.g. city) level.

(5) Data must be from measurements averaged between 10 minutes and 24 hours.

Contributing

There are a lot of ways to contribute to this project, more details can be found in the contributing guide.

openaq-fetch's People

Contributors

jflasher avatar dolugen avatar olafveerman avatar

Watchers

James Cloos avatar Nick Bumbarger 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.