Coder Social home page Coder Social logo

petemihaylov / airqi Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 21.45 MB

🖥 Web application that visualizes real-time air quality metrics.

Home Page: https://www.youtube.com/watch?v=nQ2AAL6lpVY&list=PLCoS7tNHALEy6lhmpqEA3EtRPAY56FVoY&ab_channel=PetarMihaylov

License: MIT License

C# 66.20% Dockerfile 0.68% Shell 0.06% HTML 0.89% TypeScript 20.09% JavaScript 9.85% SCSS 1.43% CSS 0.79%
air-quality airpollution datavisualisation microservices-architecture

airqi's Introduction

AirQi Overview

Build Status

Introduction

The AirQi application is used to visualise real-time insights into air quality index metrics.

AirQi is a distirbuted web application that integrates air quality data. Its aim is to empower users with real-time insights into air quality metrics, enabling informed decisions about their daily activities and overall health. The AirQi web app is collecting, exposing, and visualizing air pollution data for specific regions as the goal is to improve the quality of living in the outdoor by informing the users about the health impacts and providing them with personalized suggestions. Our ultimate goal is to cultivate a sense of environmental consciousness, fostering a community that actively engages in improving air quality while ensuring that our visualizations are universally accessible.

Tech

AirQi uses a number of open source libraries/frameworks to work properly:

  • SignalR - Incredibly simple real-time web for ASPdotNet
  • Redux - A Predictable State Container for JS Apps
  • DeckGL - WebGL-powered framework for visual exploratory data analysis of large datasets.
  • Hangfire - Background processing in .NET and .NET Core applications.
  • .NetCore - Cross-platform, open-source developer platform.
  • React - Creates interactive UIs.
  • Node.js - Evented I/O for the backend.
  • jQuery - Designed to simplify HTML DOM tree.
  • Kubernetes - Open-source system for automating deployment, scaling, and management of containerized applications.

Installation

AirQi requires Node.js v4+ and .Net Core v3.1+ to run.

Install the dependencies and start the server and the client side.

Client ReactJS application

    $ cd Web/client
    $ npm i
    $ npm start

User Management system

    $ cd Core/ApiBase
    $ dotnet build
    $ dotnet run

Data Provider system

    $ cd Data/AirQi
    $ dotnet build 
    $ dotnet run

Docker

AirQi is very easy to install and deploy in a Docker container.

By default, the Docker will expose port 8080, so change this within the Dockerfile if necessary. When ready, simply use the Dockerfile to build the image.

cd Web/client
docker build -t {youruser}/airqi:${package.json.version} .

This will create the image and pull in the necessary dependencies. Be sure to swap out ${package.json.version} with the actual version of AirQi.

Once done, run the Docker image and map the port to whatever you wish on your host. In this example, we simply map port 8000 of the host to port 8080 of the Docker (or whatever port was exposed in the Dockerfile):

docker run -d -p 8000:8080 --restart="always" <youruser>/dillinger:${package.json.version}

Verify the deployment by navigating to your server address in your preferred browser.

127.0.0.1:8000

Source Details

/api/stations

{
  "id": "60076a29bd691e98a8bee122",
  "aqi": 28.0,
  "location": "Southport",
  "city": "Southport",
  "country": "Australia",
  "measurements": [
    {
      "parameter": "h",
      "value": 77.1,
      "unit": "µg/m³",
      "sourceName": "Air quality | Environment, land and water | Queensland Government"
    },
    {
      "parameter": "no2",
      "value": 1.9,
      "unit": "µg/m³",
      "sourceName": "Air quality | Environment, land and water | Queensland Government"
    },
    {
      "parameter": "o3",
      "value": 5.3,
      "unit": "µg/m³",
      "sourceName": "Air quality | Environment, land and water | Queensland Government"
    },
    {
      "parameter": "p",
      "value": 1018.3,
      "unit": "µg/m³",
      "sourceName": "Air quality | Environment, land and water | Queensland Government"
    },
    {
      "parameter": "pm10",
      "value": 19.0,
      "unit": "µg/m³",
      "sourceName": "Air quality | Environment, land and water | Queensland Government"
    },
    {
      "parameter": "pm25",
      "value": 28.0,
      "unit": "µg/m³",
      "sourceName": "Air quality | Environment, land and water | Queensland Government"
    },
    {
      "parameter": "r",
      "value": 0.3,
      "unit": "µg/m³",
      "sourceName": "Air quality | Environment, land and water | Queensland Government"
    },
    {
      "parameter": "t",
      "value": 22.4,
      "unit": "µg/m³",
      "sourceName": "Air quality | Environment, land and water | Queensland Government"
    },
    {
      "parameter": "w",
      "value": 1.4,
      "unit": "µg/m³",
      "sourceName": "Air quality | Environment, land and water | Queensland Government"
    },
    {
      "parameter": "wd",
      "value": 169.0,
      "unit": "µg/m³",
      "sourceName": "Air quality | Environment, land and water | Queensland Government"
    },
    {
      "parameter": "wg",
      "value": 6.0,
      "unit": "µg/m³",
      "sourceName": "Air quality | Environment, land and water | Queensland Government"
    }
  ],
  "position": [ 153.402, -27.9612 ],
  "createdAt": "2021-01-19T23:24:25.687Z",
  "updatedAt": "2021-01-19T23:24:25.687Z"
}

/api/measurements

{
  "id": "60075c54bd691e98a8bedc0d",
  "aqi": 110.0,
  "measurements": [
    {
      "parameter": "o3",
      "value": 191.0,
      "lastUpdated": "19/03/2019 07:00:00",
      "unit": "µg/m³",
      "sourceName": "ChinaAQIData"
    },
  ],
  "position": [ 117.1837, 39.2133 ],
  "createdAt": "2021-01-19T22:25:24.552Z",
  "updatedAt": "2021-01-19T22:25:24.553Z"
}

Licenses

AirQi repo typically uses either the MIT or Apache 2 licenses for code. Some projects license documentation and other forms of content under Creative Commons Attribution 4.0.

airqi's People

Contributors

constantimi avatar dependabot[bot] avatar petemihaylov avatar snyk-bot 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.