This document describes how to get started with running this code on your own computer.
- Make sure
python 3.7
is installedpython --version
- Update pip to latest
sudo -H pip3 install --upgrade pip
All the commands below are to be executed in the root of this code directory
-
Install Virtual Env
sudo pip install virtualenv
-
Create a new Virtual Env for this project
virtualenv -p python3 venv
-
Switch to using our new virtual environment a.k.a Safe Bubble a.k.a Don't Mess Up Your System
On Linux or OSX
source venv/bin/activate
On Windows run
venv\Scripts\activate.bat
This project comes with a requirements.txt
file. This can be used to install all the dependencies with the recommended version. You can skip the next step after this.
pip install --no-cache-dir -r requirements.txt
Skip the last step of installing dependencies from requirements.txt
if you want to create your own or update any dependencies. In which case right after the fresh virtual env install follow these steps
- Install Library Dependencies
pip3 install beautifulsoup4 pip3 install requests pip3 install lxml pip3 install pyshp
- Now Freeze these dependencies into
requirements.txt
pip freeze > requirements.txt
-
Download and create raw datasets
python3 downloadHurricaneData.py
This script will create a new directory called
data
in the project root with following output files. These files will be used as input to the next script.$ ls -l data dataDownloadHistory.log ensoData.txt ibtracsData.csv nameMapping.txt natlData.csv nepacData.csv stormreportData.txt
-
Create Final Datasets
python3 annualDataUpdate.py
This script will create the following output datasets in
results
directory$ ls -l results hurricaneYears.json Segments_WebMerc.dbf Segments_WebMerc.prj Segments_WebMerc.shp Segments_WebMerc.shx stormnames.js Tracks_WebMerc.dbf Tracks_WebMerc.prj Tracks_WebMerc.shp Tracks_WebMerc.shx update.log
On Linux or OSX
source venv/bin/activate
On Windows run
venv\Scripts\deactivate.bat