Giter Site home page Giter Site logo

airqualityexpressserver's Introduction

AirQualityExpressServer

Express-based web server that exposes air quality observations from the Obelisk platform as Linked Data documents, using a geospatial fragmentation based on tiles.
The server uses an NGINX proxy and cache to store requested data fragments, speeding up the process.

Install it

Clone this repository and run npm install.

Running the server

  • First create a file called ObeliskLogin.json in the root folder containing the following structure:
{
  "ObeliskClientId": "xxxxx",
  "ObeliskClientSecret": "yyyyyyy"
}

โ€‹ Replace the values with your Obelisk credentials. See here to request new credentials.

  • Compile the project running npm run build.
  • Finally run docker-compose up to start the server.

Use it

Once the server is running you can query the data using the following template:

http://localhost:5000/data/14/{x}/{y}{?page,aggrMethod,aggrPeriod}

Where x and y are the coordinates of a certain tile and page is an ISO date that determines the day the air quality measurements were taken. aggrMethod and aggrPeriod define the used aggregation method and time interval for the aggregation respectively. Types for aggrMethod currently are average and median. Types for aggrPeriod are min, hour and day. If these two parameters are undefined, the raw data is queried. For example:

http://localhost:5000/data/14/8392/5467?page=2019-08-06T00:00:00.000Z&aggrMethod=median&aggrPeriod=hour

airqualityexpressserver's People

Contributors

brechtvdv avatar hdelva avatar julianrojas87 avatar sigvevermandere avatar tom-vandewiele-kb-vlaanderen-be avatar vandewieto 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.