Inspiration
We were inspired to make this project because we wanted to come up with a program that could provide helpful information to keep people safe and informed. We ended up creating a very helpful resource that could help homeowners stay safe, and we could create an even more informative app if we continue to develop this project.
What it does
Our project takes in your home address, (or any address in the United States) and will show you the statistics for the top disasters/risks that could happen at that location, and give an overall risk assessment score. It shows only the top five most likely disasters that would be experienced in that area, and shows their individual risk scores as well as the overall risk score.
How we built it
We had both a frontend and backend to this project. We split up the group to work on the two halves and were able to combine them for the final project.
For our data we had a federal database with dataset that described every federally declared disaster. This included Hurricanes, Tornadoes, Severe Storms, Forest Fires, Drought, and etc. With this dataset, we were able to see the different disasters that occurred in a certain area, described by a Federal Information Processing Standard (FIPS) code which uniquely identifies counties and county equivalents in the United States. We had another dataset that had a list of FIPS codes and the associated county, longitude, and latitude. This was important to be able to identify nearby counties and the natural disasters that were occurring near by. We decided to use MongoDB as our backend and also as our database for its simplicity and its Atlas services. In MongoDB, we created an endpoint that our react application calls to send information and process it using a function.
Once we the user types in their address and we get the longitude, latitude of the users location and the state that they are in using GeoApify, we send it to MongoDB through an HTTPS POST request. The data is received in the body of the call and then validated to void empty requests. Our algorithm filters the disaster database by the state of the user and finds distinct county codes in that particular state. Using our second dataset that had our FIPS to longitude and latitude association, we calculated the distances between all the county codes in our state and our current longitude and latitude using the Haversine formula. Sorting the results gave us the 10 closest counties to our current location. We determined that disasters from the 10 closest counties would at most times be in proximity to have noticeable impact on the users and therefore be information needed to assess risk. We get a count of each type of natural disasters that have occurred in those 10 counties and calculate the average frequency of that disaster per year. These results are returned as a response to the our frontend where it can be displayed.
Our overall risk index describes on average, the frequency of any disaster occurring per year.
Challenges we ran into
We ran into a couple problem that was mostly due to time constraints. We came up with a much more ambitious idea when we first came up with the project, but we realized we would not reasonably have the time to complete it. We ended up cutting out a number of things because they were becoming too time consuming, or they were just too difficult to implement. Eventually though we were able to work through our problems and come up with a finished product that we were satisfied with.
Accomplishments that we're proud of
We were able to create a professional looking website that gives a decent amount of data for the time we were given to make it. We were also very well coordinated and implemented the two sections of our code seamlessly.
What we learned
We were able to gain a lot of experience in both front and back end coding, and learned a lot about using React and API services. Different members of our group with different levels of experience were also able to communicate with each other in order to learn and collaborate to make a final product.
What's next for Home Risk Assessment Calculator
If we were to continue this project, we would actually be able to continue working on all of the functions that we had originally wanted to implement.
- We could make predictions in the future based on other environmental factors to determine the risk the home is at.
- We could add a resources section where we could provide helpful information to stay safe, or links to webpages that give tips on how to prepare for certain disasters. These links would be connected to whichever the top five most likely natural disasters were for that area.
- Function that would calculate the best insurance package to buy based off of your location and what events you are most likely to encounter. This could be helpful in providing more information to homeowners who may be spending extra money to protect against unlikely events in their area, or other problems like that.
- Find more databases that had more information to work with so we could make our results even more specific than they currently are.
Log in or sign up for Devpost to join the conversation.