# In an attempt to better predict the number of "tree debris" 311 calls in # Chicago, this experiment incorporates data from local weather stations. from datetime import datetime from menorah import Menorah sources = [ ["chicago-311", "Tree Debris", "aggregate=1 day"], ["chicago-beach-weather", "Foster Weather Station", "humidity"], ["chicago-beach-weather", "Foster Weather Station", "interval_rain"], ["chicago-beach-water-quality", "Osterman Beach", "wave_height"], ] menorah = Menorah( sources, "work/example5-multifield-aggregated", since=datetime(2015, 5, 20) ) menorah.swarm(swarmParams={"swarmSize":"large"}) menorah.runModel(plot=True)
# Gets aggregated data for Portland OR 911 calls and attempts to predict the # number of calls every 15 minutes. from datetime import datetime from menorah import Menorah sources = [ ["portland-911", "portland-911", "aggregate=15 minutes"], ] menorah = Menorah(sources, "work/example3-aggregated", since=datetime(2015, 7, 10)) menorah.swarm() menorah.runModel(plot=True)