General information on the Array of things: https://aot-file-browser.plenar.io/data-sets/chicago-complete https://medium.com/array-of-things/five-years-100-nodes-and-more-to-come-d3802653db9f...






General information on the Array of things: https://aot-file-browser.plenar.io/data-sets/chicago-complete https://medium.com/array-of-things/five-years-100-nodes-and-more-to-come-d3802653db9f https://arrayofthings.github.io/ Information on the individual sensors: https://github.com/waggle-sensor/sensors/blob/develop/README.md and on the API and the library for R The R library used to work, but now seems to be out of date. It may return or you may need to grab the json files directly and manipulate them (which is what the R library did behind the scenes) https://arrayofthings.docs.apiary.io/#introduction/api-endpoints https://github.com/UrbanCCD-UChicago/aot-client-r the documentation believes it can be installed from devtools::install_github("UbranCCD-UChicago/aot-client-r") but that always seems to fail. A few weeks ago it was possible to grab the zip archive from github, unzip it, and then: install.packages("devtools") devtools::install_local("aot-client-r-master") library(AotClient) but that is also not happy as of mid March 2019, possibly due to some code changes during their early march hackathon * a temporary solution (thanks Emmanuel) is to edit the NAMESPACE file from the zip archive and comment out this line and then install with devtools: #export(ls.raw_observations) and then you could do things like: get a list of all the nodes ls.nodes(filters=list()) until its fixed the same information is available at: https://api.arrayofthings.org/api/nodes which is where that call grabs its data from more human readable data is available at: https://aot-file-browser.plenar.io/data-sets/chicago-complete if you go to the Node Information part of the page and click on the 'Show Table' button noticing that node 053 is close to the UIC campus you can find out more about it stat.node("053") or directly with https://api.arrayofthings.org/api/nodes/053span> and then see if there is a current temperature reading at that location (from one of the many temperature sensors) a = ls.observations() b = subset(a, node_vsn == "053") c = subset(b, sensor_path == "metsense.bmp180.temperature") until the R interface comes back, the same information can be grabbed directly using: url <- "https://api.arrayofthings.org/api/observations"="" or="" https://api.arrayofthings.org/api/observations?size="1000" if="" you="" want="" more="" than="" the="" standard="" 200="" or="" filtering="" by="" timestamp="" if="" you="" want="" a="" specific="" range="" s=""><- download.file(url, "/var/tmp/obs", quiet = false) (note that you should use a unique file name to avoid crashing into another group's data) t = fromjson("/var/tmp/obs") u = t$data v = subset(u, sensor_path == "metsense.bmp180.temperature") some of the resulting readings make sense, others seem way out of range so maybe try a different temperature sensor with v = subset(u, sensor_path == "metsense.tmp112.temperature") or v = subset(u, sensor_path == "metsense.tsys01.temperature") or take a look at the current humidity at that location d = subset(u, sensor_path == "metsense.htu21d.humidity") also note that the timestamp is in gmt there are various sensors looking at the same pollutants that we have been looking at in the other projects. ls.sensors() chemsense.co.concentration 0-1000 ppm chemsense.h2s.concentration 0-50 ppm chemsense.no2.concentration 0-20 ppm chemsense.o3.concentration 0-20 ppm chemsense.so2.concentration 0-20 ppm the particulate matter ones don't seem to be online yet, but may come on line soon. alphasense.opc_n2.pm10 μg/m^3 alphasense.opc_n2.pm2_5 μg/m^3 plantower.pms7003.pm10_atm μg/m^3 plantower.pms7003.pm25_atm μg/m^3 ----------------------------------- one of the most popular and accurate weather apis was from weather underground, which transitioned in 2018 to a pay only model, so we can't use it. dark sky has a similar api with 1000 calls per day for free, so we are going to integrate their api: https://cran.r-project.org/package=darksky https://github.com/hrbrmstr/darksky https://darksky.net/dev library(darksky) you will need to get a free api key. then you can get the current weather forecast for chicago (uic) with get_current_forecast(41.870, -87.647) or for chicago on new year's day 2019 get_forecast_for(41.870, -87.647, "2019-01-01t12:00:00-0600", add_headers=true) ----------------------------------- openaq also has an r library that allows 2000 requests every 5 minutes https://github.com/ropensci/ropenaq https://ropensci.org/tutorials/ropenaq_tutorial/ library("ropenaq") which allows commands such as aq_latest(country = "us", city = "chicago-naperville-joliet") or aq_measurements(city = "chicago-naperville-joliet", date_from = "2018-12-01", date_to = "2018-12-31", parameter = "pm25") note that openaq uses tibbles. a major focus of this project is going to be on querying the data dynamically in real-time, and trying to integrate data from multiple sources to compare data for a wider area with the data collected at individual locations so see how much of a difference there can be in a city like chicago. for a c you need to create a useful, responsive interactive visualization focusing on the array of things data for the chicago area · show the array of things sites in chicago on an interactive map and a table, allowing the user to filter based on any or all of the pollutants being monitored (so2, h2s, o3, no2, co, pm2.5, pm10) as well as temperature, light intensity, humidity to see which sites are collecting which data, and which sites are currently 'alive'. the table view should also show the node's street address. the map view should start out at an appropriate location and zoom factor. · allow the user to change the map background between at least 3 useful varieties · allow the user to tap on a node on the map or select it from the table to see data from it for the current time, last 24 hours, last 7 days in both tabular and appropriate graphical forms, allowing the user to choose any subset of the variables to visualize and compare · allow the user to pick 2 nodes and compare them for the current time, last 24 hours, last 7 days · the current data should be updated every minute · allow user to show the data in either imperial or metric · allow the user to bring up information on the dashboard about who wrote the project, what libraries are being used to visualize it, where the data came from, etc for a b you need to add in data for the chicago area from dark sky and the previous projects: · when the user is looking at the aot data for the current time, last 24 hours, last 7 days, add in the related chicago area weather data (temperature, humidity, wind speed, wind bearing, cloud cover, visibility, pressure, ozone, summary) from dark sky for that location. the user should, again, be able to choose whatever subset of variables they wish to show from the aot data and the dark sky data at the same time in both graphical and tabular form. · create a heat map for the chicago area where the user can choose to view any of the aot data or the dark sky data for the current time, min / max / average for the last 24 hours, or min / max / average for the last 7 days. note that to do a good heat map you may want to collect data from outside the city boundaries. · again, the current data should be updated every minute · again, allow user to show the data in either imperial or metric for an a you need to add in data for the chicago area from openaq: · show the openaq sites in the chicago area on the map, allowing the user to filter based on any or all of the pollutants being monitored to see which sites are collecting which data, and which sites are currently 'alive' · integrate data for pm25, pm10, so2, no2, o3, co and bc (note that some are not actively being collected in this area) into the current, last day, last week views, and the heat maps from the b requirements. · again, the current data should be updated every minute · again, allow user to show the data in either imperial or metric download.file(url,="" "/var/tmp/obs",="" quiet="FALSE)" (note="" that="" you="" should="" use="" a="" unique="" file="" name="" to="" avoid="" crashing="" into="" another="" group's="" data)="" t="fromJSON("/var/tmp/obs")" u="t$data" v="subset(u," sensor_path="=" "metsense.bmp180.temperature")="" some="" of="" the="" resulting="" readings="" make="" sense,="" others="" seem="" way="" out="" of="" range="" so="" maybe="" try="" a="" different="" temperature="" sensor="" with="" v="subset(u," sensor_path="=" "metsense.tmp112.temperature")="" or="" v="subset(u," sensor_path="=" "metsense.tsys01.temperature")="" or="" take="" a="" look="" at="" the="" current="" humidity="" at="" that="" location="" d="subset(u," sensor_path="=" "metsense.htu21d.humidity")="" also="" note="" that="" the="" timestamp="" is="" in="" gmt="" there="" are="" various="" sensors="" looking="" at="" the="" same="" pollutants="" that="" we="" have="" been="" looking="" at="" in="" the="" other="" projects.="" ls.sensors()="" chemsense.co.concentration="" 0-1000="" ppm="" chemsense.h2s.concentration="" 0-50="" ppm="" chemsense.no2.concentration="" 0-20="" ppm="" chemsense.o3.concentration="" 0-20="" ppm="" chemsense.so2.concentration="" 0-20="" ppm="" the="" particulate="" matter="" ones="" don't="" seem="" to="" be="" online="" yet,="" but="" may="" come="" on="" line="" soon.="" alphasense.opc_n2.pm10="" μg/m^3="" alphasense.opc_n2.pm2_5="" μg/m^3="" plantower.pms7003.pm10_atm="" μg/m^3="" plantower.pms7003.pm25_atm="" μg/m^3="" -----------------------------------="" one="" of="" the="" most="" popular="" and="" accurate="" weather="" apis="" was="" from="" weather="" underground,="" which="" transitioned="" in="" 2018="" to="" a="" pay="" only="" model,="" so="" we="" can't="" use="" it.="" dark="" sky="" has="" a="" similar="" api="" with="" 1000="" calls="" per="" day="" for="" free,="" so="" we="" are="" going="" to="" integrate="" their="" api:="" https://cran.r-project.org/package="darksky" https://github.com/hrbrmstr/darksky="" https://darksky.net/dev="" library(darksky)="" you="" will="" need="" to="" get="" a="" free="" api="" key.="" then="" you="" can="" get="" the="" current="" weather="" forecast="" for="" chicago="" (uic)="" with="" get_current_forecast(41.870,="" -87.647)="" or="" for="" chicago="" on="" new="" year's="" day="" 2019="" get_forecast_for(41.870,="" -87.647,="" "2019-01-01t12:00:00-0600",="" add_headers="TRUE)" -----------------------------------="" openaq="" also="" has="" an="" r="" library="" that="" allows="" 2000="" requests="" every="" 5="" minutes="" https://github.com/ropensci/ropenaq="" https://ropensci.org/tutorials/ropenaq_tutorial/="" library("ropenaq")="" which="" allows="" commands="" such="" as="" aq_latest(country="US" ,="" city="Chicago-Naperville-Joliet" )="" or="" aq_measurements(city="Chicago-Naperville-Joliet" ,="" date_from="2018-12-01" ,="" date_to="2018-12-31" ,="" parameter="pm25" )="" note="" that="" openaq="" uses="" tibbles.="" a="" major="" focus="" of="" this="" project="" is="" going="" to="" be="" on="" querying="" the="" data="" dynamically="" in="" real-time,="" and="" trying="" to="" integrate="" data="" from="" multiple="" sources="" to="" compare="" data="" for="" a="" wider="" area="" with="" the="" data="" collected="" at="" individual="" locations="" so="" see="" how="" much="" of="" a="" difference="" there="" can="" be="" in="" a="" city="" like="" chicago.="" for="" a="" c="" you="" need="" to="" create="" a="" useful,="" responsive="" interactive="" visualization="" focusing="" on="" the="" array="" of="" things="" data="" for="" the="" chicago="" area="" ·="" show="" the="" array="" of="" things="" sites="" in="" chicago="" on="" an="" interactive="" map="" and="" a="" table,="" allowing="" the="" user="" to="" filter="" based="" on="" any="" or="" all="" of="" the="" pollutants="" being="" monitored="" (so2,="" h2s,="" o3,="" no2,="" co,="" pm2.5,="" pm10)="" as="" well="" as="" temperature,="" light="" intensity,="" humidity="" to="" see="" which="" sites="" are="" collecting="" which="" data,="" and="" which="" sites="" are="" currently="" 'alive'.="" the="" table="" view="" should="" also="" show="" the="" node's="" street="" address.="" the="" map="" view="" should="" start="" out="" at="" an="" appropriate="" location="" and="" zoom="" factor.="" ·="" allow="" the="" user="" to="" change="" the="" map="" background="" between="" at="" least="" 3="" useful="" varieties="" ·="" allow="" the="" user="" to="" tap="" on="" a="" node="" on="" the="" map="" or="" select="" it="" from="" the="" table="" to="" see="" data="" from="" it="" for="" the="" current="" time,="" last="" 24="" hours,="" last="" 7="" days="" in="" both="" tabular="" and="" appropriate="" graphical="" forms,="" allowing="" the="" user="" to="" choose="" any="" subset="" of="" the="" variables="" to="" visualize="" and="" compare="" ·="" allow="" the="" user="" to="" pick="" 2="" nodes="" and="" compare="" them="" for="" the="" current="" time,="" last="" 24="" hours,="" last="" 7="" days="" ·="" the="" current="" data="" should="" be="" updated="" every="" minute="" ·="" allow="" user="" to="" show="" the="" data="" in="" either="" imperial="" or="" metric="" ·="" allow="" the="" user="" to="" bring="" up="" information="" on="" the="" dashboard="" about="" who="" wrote="" the="" project,="" what="" libraries="" are="" being="" used="" to="" visualize="" it,="" where="" the="" data="" came="" from,="" etc="" for="" a="" b="" you="" need="" to="" add="" in="" data="" for="" the="" chicago="" area="" from="" dark="" sky="" and="" the="" previous="" projects:="" ·="" when="" the="" user="" is="" looking="" at="" the="" aot="" data="" for="" the="" current="" time,="" last="" 24="" hours,="" last="" 7="" days,="" add="" in="" the="" related="" chicago="" area="" weather="" data="" (temperature,="" humidity,="" wind="" speed,="" wind="" bearing,="" cloud="" cover,="" visibility,="" pressure,="" ozone,="" summary)="" from="" dark="" sky="" for="" that="" location.="" the="" user="" should,="" again,="" be="" able="" to="" choose="" whatever="" subset="" of="" variables="" they="" wish="" to="" show="" from="" the="" aot="" data="" and="" the="" dark="" sky="" data="" at="" the="" same="" time="" in="" both="" graphical="" and="" tabular="" form.="" ·="" create="" a="" heat="" map="" for="" the="" chicago="" area="" where="" the="" user="" can="" choose="" to="" view="" any="" of="" the="" aot="" data="" or="" the="" dark="" sky="" data="" for="" the="" current="" time,="" min="" max="" average="" for="" the="" last="" 24="" hours,="" or="" min="" max="" average="" for="" the="" last="" 7="" days.="" note="" that="" to="" do="" a="" good="" heat="" map="" you="" may="" want="" to="" collect="" data="" from="" outside="" the="" city="" boundaries.="" ·="" again,="" the="" current="" data="" should="" be="" updated="" every="" minute="" ·="" again,="" allow="" user="" to="" show="" the="" data="" in="" either="" imperial="" or="" metric="" for="" an="" a="" you="" need="" to="" add="" in="" data="" for="" the="" chicago="" area="" from="" openaq:="" ·="" show="" the="" openaq="" sites="" in="" the="" chicago="" area="" on="" the="" map,="" allowing="" the="" user="" to="" filter="" based="" on="" any="" or="" all="" of="" the="" pollutants="" being="" monitored="" to="" see="" which="" sites="" are="" collecting="" which="" data,="" and="" which="" sites="" are="" currently="" 'alive'="" ·="" integrate="" data="" for="" pm25,="" pm10,="" so2,="" no2,="" o3,="" co="" and="" bc="" (note="" that="" some="" are="" not="" actively="" being="" collected="" in="" this="" area)="" into="" the="" current,="" last="" day,="" last="" week="" views,="" and="" the="" heat="" maps="" from="" the="" b="" requirements.="" ·="" again,="" the="" current="" data="" should="" be="" updated="" every="" minute="" ·="" again,="" allow="" user="" to="" show="" the="" data="" in="" either="" imperial="" or="">
Apr 26, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here