A web app containing an interactive map displaying avalanche accidents in the US.
Check it out here!
Data is obtained from the Colorado Avalanche Information Center.
After cloning or forking the project, you need to install dependencies. Use either yarn or npm. Then, navigate to into this directory and run one of the following commands:
npm install
yarn
Now, you should be able to launch the app. Open your browser at localhost:3000
.
npm run start
yarn start
To change what data this project displays, replace accidents.csv
with your new data.
The column headers must remain the same. Then run:
python convert-to-json.py
Both python2 and 3 should work. This will update the src/accidents.json
, which
gets used by the actual web app.
Only accidents with latitude and longitude coordinates will be accepted by the conversion script. In the future, we could probably use the place and state and query the Google API to get approximate coordinates, but we're not doing that currently.
The key technologies used in this app are:
- react: A JS component library that helps you build modular web apps.
- Google Map React: This library wraps the Google Maps API for react.
- react-popup: A simple react popup library.
- now.sh: real time deployment and hosting.