项目作者: rexthompson

项目描述 :
Traffic Accident / Weather Analysis
高级语言: HTML
项目地址: git://github.com/rexthompson/axwx.git
创建时间: 2017-04-30T21:17:50Z
项目社区:https://github.com/rexthompson/axwx

开源协议:MIT License

下载


Logo3

Ax/Wx

Ax/Wx is a collision and weather analysis tool that can enhance the WSP collision database with objective observations from nearby personal weather stations. Most weather observations come from major weather stations that may not be able to detect the weather as accurately as a closer weather station at a particular location.

To use Ax/Wx, you will need to clone this repository onto your computer and follow the instructions at the bottom of this page.

Organization of the Project

The project has the following structure:

  1. axwx/
  2. |- axwx/
  3. |- data/
  4. |- test_wu_data/
  5. |- ...
  6. |- merged.p
  7. |- merged_data_sample.csv
  8. |- station_data.csv
  9. |- test_wsp_clean.csv
  10. |- test_wsp_raw.csv
  11. |- wsp_cleaned_data.csv
  12. |- tests/
  13. |- __init__.py
  14. |- unittests.py
  15. |- AxWx_dashboard.html
  16. |- __init__.py
  17. |- axwx.py
  18. |- dashboard.ipynb
  19. |- dashboard_title4.jpg
  20. |- get_wu_data.py
  21. |- merge_datasets.py
  22. |- wsp_cleaning.py
  23. |- wu_cleaning.py
  24. |- wu_metadata_scraping.py
  25. |- wu_metadata_scraping_test.py
  26. |- wu_observation_scraping.py
  27. |- data/
  28. |- CAT References/
  29. |- CAT-LookUp Excel/
  30. |- ...
  31. |- CAT-DataDictionary.xlsx
  32. |- CAT-LookUp.accdb
  33. |- station_data.xlsx
  34. |- doc/
  35. |- DesignSpecification.md
  36. |- Final Presentation - AxWx.pdf
  37. |- FunctionalSpecification.md
  38. |- examples/
  39. |- README.md
  40. |- wsp_cleaning.md
  41. |- images/
  42. |- screenshots/
  43. |- Screen Shot 2017-06-01 at 11.12.37 AM.png
  44. |- Screen Shot 2017-06-01 at 11.19.55 AM.png
  45. |- Screen Shot 2017-06-01 at 11.40.20 AM.png
  46. |- Logo.png
  47. |- WhiteboardMockup.JPG
  48. |- axwx-logo.jpg
  49. |- mockup2.jpg
  50. |- .gitignore
  51. |- LICENSE
  52. |- README.md
  53. |- requirements.txt
  54. |- setup.py

Installation

To install axwx you will need to begin by cloning axwx on your own computer by using the following git command:

  1. git clone https://github.com/uwescience

Next, to install the package you will need to go into the axwx directory and run the setup.py file:

  1. cd axwx/
  2. python setup.py install

To ensure that the dependencies to run axwx are installed on your computer you will want to run the following command:

  1. pip install -r requirements.txt

You should now be ready to import and use axwx on your computer.

Examples (How to use Ax/Wx)

To understand how to use Ax/Wx, please refer to
the examples section of this GitHub page where you can find
examples for doing the following:

  • How to generate a list of active personal weather stations in a region of interest
  • Scraping weather data from a generated list of personal weather stations
  • Cleaning the scraped weather data
  • Cleaning the Washington State Patrol collision data
  • Merging weather data with collision data from the Washington State patrol
  • Creating visualizations with the merged dataset

Project History

The idea for Ax/Wx was developed in May 2017 in the University of Washington’s DATA 515 course for Software Development.
Seeing the potential benefit of personal weather station data (sourced from Weather Underground) combined with collision
records from the Washington State Patrol, we decided build the infrastructure to help easily scrape and combine these
two data sources. The first objective we had set was to perform an analysis within the Seattle area to see what
insights could be uncovered in respect to weather impacts on collision occurrence. Going forward, we hope to explore
integrating interactive visualization tools and perhaps even mobile application creation.

Station List function to scrape can be easily customized to scrape weather data for state in the U.S. and can be further
subset based off lat/long inputs.

Limitations

In its current form, the Ax/Wx package serves as a very efficient and customizable weather station and data scraping
tool, with the ability for local users in Washington State to merge the data with Washington State Patrol’s collision data.

The package also does not support ad hoc interactive visualization but can create an analysis
report for weather impacts on accidents in Washington State for a given time frame.

Acknowledgements

A thanks to our DATA 515 course professors, Joe Hellerstein and Dave Beck, of the University of Washington eScience
Institute, for instructing us on the best practices of software development.

As mentioned, Weather Underground and Washington State Patrol were the resources used for the sourcing of weather
station and collision data respectively.

Contact

Questions? Comments? Drop us a line at axwx@googlegroups.com