The main app code is in our "app.R" file. The preprocessing code for the initial dataset is in the file "formatFile.py".
The datasets we used are also located in the repository, under the names "hurdat2-1851-2018-120319.txt" and "hurdat2-nepac-1949-2018-122019.txt"
Prerequisite Software
To set up the app, first you need to make sure that you have R set up. Then, you need to make sure that you have installed the shiny, shiny dashboard, ggplot2, and leaflet packages set up for R.
To run the preprocessing code, you need to have a python3 environment setup.
Preprocessing Data
To preprocess the data, first make sure that the files "hurdat2-1851-2018-120319.txt" and "hurdat2-nepac-1949-2018-122019.txt" are in the same directory as "formatFile.py".
Now, simply run the "formatFile.py" script using python3. The data should be processed, with the processed Atlantic data being in the file "hurdat2-formatted.txt" and the processed Pacific data being in the file "hurdat2Pacific-formatted.txt".
For the most part, our processing simply adds headers to the file and cleans whitespaces. The most useful part of the preprocessing is that it helps us deal with the fact that hurricane data spans multiple lines. Our solution to this is to copy the columns that identify the hurricane, to every single row that corresponds to that hurricane.
Running the App
Simply launch app.R, or host the required data files "app.R", "hurdat2-formatted.txt", and "hurdat2Pacific-formatted.txt" in a shiny server.