コード例 #1
0
ファイル: example5.py プロジェクト: htm-community/menorah
# 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)
コード例 #2
0
ファイル: example3.py プロジェクト: htm-community/menorah
# 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)