Adding new data to a tabular model
In this recipe, you will download external data and then add it into the model. The data is freely available from the state of Iowa and is a list of all crashes recorded by date. It includes many columns of data that you will use to build a model in the remaining chapters.
Getting ready
Depending upon your setup you may need to install Microsoft Access Database Engine 2010 Redistributable in order to enable importing data from Excel. For this recipe you will be using data vehicle crash data provided by the state of Iowa. Download the csv
file of the data here: https://data.iowa.gov/api/views/bew5-k5dr/rows.csv?accessType=DOWNLOAD. Once downloaded, open the csv
in Excel and save it as Iowa_Crash_Data.xlsx
. There are several fields in the file that will be used to create and enhance the model:
- CRASH_KEY - UNIQUE RECORD IDENTIFIER
- CRASH_DATE - DATE OF CRASH
- FATALITIES - NUMBER OF FATALITIES
- MAJINJURY - NUMBER OF MAJOR INJURIES
- MININJURY - NUMBER OF MINOR INJURIES...