Skip to content

PES Innovation Lab's Internship 2020 Project - Air Quality Cloud Site Visualization

Notifications You must be signed in to change notification settings

AQ-Vis/AQ-Cloud-Site

Repository files navigation

Build Status

AQ-Cloud-Site

PES Innovation Lab's Internship 2020 Project - Air Quality Cloud Site Visualization
Presentation Link

How to run

  • Intall the packages using pip install -r requirements.txt
  • Run using flask run

Running Gunicorn (Production Server)

gunicorn app:app --bind 0.0.0.0:8000 or
gunicorn filename:app --bind 0.0.0.0:8000

Misc data

  • Kibana port 5601
  • Elasticsearch port 9200

Mock Sensor IDs

  • gcptest004
  • 005
  • 006
  • 007, 008 for Demo
  • loadtest101 load testing

When creating new sensor make new index

send directly to Elasticsearch
URL: http://35.209.87.44:9200/<new device id (index name)>
Ex: http://35.209.87.44:9200/gcptest007

{
    "mappings": {
        "properties": {
            "timestamp": {
                "type": "date"
            },
            "location": {
                "type": "geo_point"
            }
        }
    }
}

Graphs on Kibaba

  1. Create index pattern
  2. DO NOT select timestamp field when it asks
  3. Go to Visualization and choose line graph
  4. Y axis - Average - Field choose any 1
  5. Buckets - X axis - Aggregation - Date Histogram - timestamp - 5s (or anything)

Docker commands for Flask Server

  1. docker build --tag aqserver:1.0 .
  2. docker run -p 8000:8000 aqserver:1.0

Docker commands for Mock sensor

  1. docker build --tag aqmocksensor:1.0 .
  2. docker run aqmocksensor:1.0

Set ELASTICSEARCH_URL as env variable for Flask Server

  • Bash:
export ELASTICSEARCH_URL=http://192.168.1.1
  • CMD:
set ELASTICSEARCH_URL=http://192.168.1.1
  • PowerShell:
$env:ELASTICSEARCH_URL="http://192.168.1.1"

To run the server

sudo docker run -e ELASTICSEARCH_URL='http://104.154.64.30' -p 8000:8000 srujandeshpande/aqvis-server:1.1

About

PES Innovation Lab's Internship 2020 Project - Air Quality Cloud Site Visualization

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •