GithubHelp home page GithubHelp logo

mirkomantovani / chicago-realtime-aq Goto Github PK

View Code? Open in Web Editor NEW
4.0 4.0 0.0 14.34 MB

Shiny app in R which displays live Air Quality and weather data in the Chicago area integrating different R APIs to query the data in Real-Time

Home Page: https://mirkomantovani.com/projects/ChicagoRealTimeAQ.html

R 73.72% JavaScript 4.83% CSS 1.41% HTML 20.04%
airquality chicago interactive-visualizations javascript r real-time rstudio shiny visual-analytics visualization web webapp

chicago-realtime-aq's People

Contributors

abhishek-v avatar ashwanikhemani avatar mirkomantovani avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

chicago-realtime-aq's Issues

Error in darksky graphical_data_ds generation

Warning: Error in map: could not find function "map"
175: function_list[[i]]
174: freduce
173: _fseq
172: eval
171: eval
169: %>%
168: get_and_preprocess_observations_24h_ds [/Users/mirkomantovani/UIC/Visualization and Visual Analytics/Chicago-RealTime-AQ/app.R#1756]
167: renderPlot [/Users/mirkomantovani/UIC/Visualization and Visual Analytics/Chicago-RealTime-AQ/app.R#1850]
165: func
125: drawPlot
111: reactive:plotObj
95: drawReactive
82: origRenderFunc
81: output$graphical_data_ds
1: shiny::runApp

Grad part: new live data source

Add another dataset that helps to augment and explain the air quality data in Chicago, that can also be queried live through R.
Ideas?

  • Traffic data -> helps explain AQ through pollution created by cars

Error in graphical_data_last_ds aesthetics similar to issue #10

This happens when clicking on light blue node and then another light blue node, it might be similar to issue #10 that I solved putting some other constraints like
retrieved_measures <- unique(df$measure)

if ("so2" %in% c(input$measures1,input$measures2) && "so2" %in% retrieved_measures){

and so on..

Error:
Warning: Error in : Aesthetics must be either length 1 or the same as the data (43): y
182: stop
181: check_aesthetics
180: f
179: l$compute_aesthetics
178: f
177: by_layer
176: ggplot_build.ggplot
174: print.ggplot
166: func
164: f
163: Reduce
154: do
153: hybrid_chain
125: drawPlot
111: reactive:plotObj
95: drawReactive
82: origRenderFunc
81: output$graphical_data_last_ds
1: runApp

Hide/Show table with nodes data

Since we have to show the table with true/false and it takes up a lot of space but is not necessary to have it always there, we could put a switch on the sidebar to hide and show the table (this could be done via js easily as I was doing it with the project 2).

The main panel with data will probably have to be even bigger to show better the plots (bigger width, so we can't have 2 big panels always showing, no space for the map itself.

Error on clicking of nodes for AoT nodes and open AQ from the map and table.

Check if the node has valid attributes and data before extracting data from it.

Warning: Error in <-: 'names' attribute [1] must be the same length as the vector [0]
168: get_and_preprocess_observations [D:\cs 424\Chicago-RealTime-AQ/app.R#639]
167: renderPlot [D:\cs 424\Chicago-RealTime-AQ/app.R#1455]

OpenAQ preprocessing

The OpenAQ nodes preprocessing needs to create a dataframe with the pm2.5 feature name as "pm2.5" and not "pm25"

Handling click events on MAP and TABLE

We have to come up with a working way of storing the latest node click (in map and table independently) in the same variable so that it can be used easily in the future.

Integrate Current, 24h and 7d OpenAQ data

  • After clicking on green (OpenAQ nodes), the plot should be updated by querying the OpenAQ data
  • Maybe we will use a different panel, it could be easier and the requirements could be okay with that (Talk with TA)

Warning: Error in log_msg: could not find function "log_msg"

170: send_request [D:\cs 424\Chicago-RealTime-AQ/app.R#422]
169: ls.observations [D:\cs 424\Chicago-RealTime-AQ/app.R#500]
168: get_and_preprocess_observations [D:\cs 424\Chicago-RealTime-AQ/app.R#636]
167: renderPlot [D:\cs 424\Chicago-RealTime-AQ/app.R#1455]

Dark Sky limited API calls

I don't know how it's possible but Dark Sky with my key has already done 1000 requests today and yesterday, how many different requests happen when clicking on a single node?
The error presented in the console is:

Warning: Error in get_forecast_for: Forbidden (HTTP 403).
181:

We might want to consider using different keys and switching randomly between them

Sensor's true false in table representation

As explained in week 3 of the course, it would be visually better to show a table in a form like:

CO NO2 O3 PM2.5 PM10
- - TRUE TRUE TRUE
- TRUE - TRUE -
- TRUE - TRUE -

Integrate OpenAQ nodes in Map

Details:

  • Color? Green
  • No inactive nodes for OpenAQ
  • Primary key is location -> changed name to vsn for simplicity to use "vsn" as a common node ID

Imperial from metric uom

Conversion of all measures for all the plots to imperial from metric and viceversa based on switch input

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.