Preprocessing the data
The very first step in preprocessing data for prediction and classification models is to be clear about how far in the future you are planning to make predictions. As discussed, our goal in this case study is to make a prediction for two full weeks (that is, 14 days) in the future. This is critical to know before we start the preprocessing.
The next step is to design a dataset that has two characteristics:
- First, it must support our prediction needs. For instance, in this case, we want to use historical data to predict hospitalizations in two weeks.
- Second, the dataset must be filled with all of the data we have collected. In this example, the data includes
covid19hospitalbycounty.csv
,covid19cases_test.csv
,covid19vaccinesbyzipcode_test.csv
, and the dates of US public holidays.
One of the very first things we will do codewise, of course, is to read these datasets into pandas DataFrames. The following list shows the name we used for the...