Inspiration

America has always been a place where natural disasters have hit. Over many years, disasters such as hurricanes, floods, tornadoes, and fires have ravaged through the US claiming homes and lives. Through the news and other social media, these events always manged to reach me. I decided that millions of people would benefit if they could see where natural disasters happened, what natural disasters they were, and how these stats compared to others. Additionally, this information had to be easily accessible, easy to read, and informative.

What it does

Natural Disaster Forecast is a web application that is designed to both spread awareness and inform people of different natural disasters in the US. A user must first choose both a state, and a natural disaster that they wish to look into. Data, which was web scraped from a Fema website is turned into a JSON file where it is then displayed on the page in a more user friendly format. This allows them to quickly get the information the user is looking for quick and easily. A choropleth map of America is also displayed and based on the users natural disaster, the colors represent the amount of disaster that has hit each state. The user can also easily search for another state or natural disaster.

How I built it

The front end was built entirely on HTML, CSS, and JavaScript. Using Cheerio, and Axios I web scraped the dates of various natural disasters and placed them in a JSON file. The choropleth map was created using Leaflet, by having different values for each state which was fetched from my JSON file. I was able to accurately color code the map based on the states that were being hit the most by any particular natural disaster. Using JavaScript, I created a novel algorithm that would predict the chance of another specific natural disaster that could occur in that state in the current year.

Challenges I ran into

The most challenging aspect of this project was finalizing it. After trying numerous times, I simply couldn't run the code together. Eventually, I had to combine different files to make the program work. Another challenge I ran into was getting the Leaflet map to work. The most difficult part of the map was getting the right colors to show up in the right states.

Accomplishments that I'm proud of

I am most proud of being able to make this web application extremely easy to use and read. Additionally, the map I created using Leaflet looks very promising as well, and I believe it will help many users to understand the different natural disasters occurring in different states.

What I learned

Being my first hackathon, I learned how to build a web application from scratch. Additionally, through the help of my mentors I was able to understand a lot more about JavaScript and use it to help compile my data. I also learned how to use Leaflet in order to create maps.

What's next for Natural Disaster Forecast

My project is only available locally, which means it is not deployed to the web with a domain. I plan to do so if given more time with the project. Furthermore, I plan to expand this website to show natural disasters happening all across the world, and not only in the US.

Built With

Share this project:

Updates