A framework to analyze traffic incident reports from the Bing Maps API and predict future incident levels
- Install Pip
- In the top folder run
pip install -r requirements.txt
python pull_data.py [region1,region2,etc]
If no regions are specified only the sf data will be pulled by default
Simply run python export_arff.py [in_file.json] [out_file.arff] [conf_file.json]
An example configuration file can be found at conf/example.json
. The maps and filters listed will be run in the order listed in your conf file.
Attributes have three fields:
- The name of the attribute in the exported ARFF file,
- The JSON path to the attribute in each instance
- The type of attribute (NOMINAL, NUMERIC, and INTEGER are currently supported).
Note that since attributes will be extracted after your maps are run, you can add computed attributes in a map and then reference them in the attribute list. For example, in the example.json
conf file the calculated attribute hour
is referenced.