SafeZone: A web application mapping COVID and disaster related information for your state.

Christian Mosley
3 min readNov 9, 2020

The premise is simple, when disaster strikes, what is your plan? Do you even have a plan? Does your plan account for different types of disasters? With SafeZone, you will feel safer knowing you have a plan of action when the worst moments strike.

Recently, I worked with a team to build a web app, with it’s goal being to deliver ongoing disaster related information to the user for their state of residence in the US. Along with current disaster related information, the app would also deliver 7 day moving averages for COVID positivity rates.

The scope of the project could potentially be very large with thousands of cities across the US, so we wanted to deliver an MVP that would start at the state level, to eventually be expanded further to major cities across the United States.

First, we needed to find a way to gather disaster data from a reliable and timely source. We came upon an API from FEMA that served this purpose quite nicely. It had historical disaster related data as well as current ongoing disasters. Our team wrote a script that would pull the required disaster data and we linked that data to a database to be extracted later.

Next, we looked for a source that had COVID related data. We settled on an API with the CDC that provided the 7 day moving average data we used. The next portion of our CDC data was to develop a model that could predict increases in the 7 day moving average 1 month and 2 months out. Without any prior seasonal lagging periods for COVID, we used previous winter flu rates as a substitute to map our positivity increases. With the flu data and current COVID data in hand, we built a simple SARIMA time series model that would forecast out 1 and 2 month ahead of time. Now we were ready to build that app.

We debated which framework to use to get our app displayed, we had narrowed down our choices to making a simple Streamlit app, or going with a more robust solution in Flask. The flask framework won out mainly because we wanted to expand our skillset and eventually have the styling capabilities to make a beautiful app.

The first iteration produced the screenshots below, where we had a form field that would take in the state the user wanted info on and a simple team page to showcase how handsome we were.

After a long night of debugging some pesky routing issues in flask, here is a demo of version one of our app SafeZone.

We learned a lot building this application, and could definitely expand upon the app by refining our data models for COVID predictions, adding in more granular search capabilities and getting the user a more ready make plan of action to take when disaster strikes.

--

--