R Package: wisdotcrashdatabase

Package development
I developed this package to make data import and data analysis much easier inside an R environment.
Author
Affiliation

Jacci Ziebert

WisDOT

Published

August 20, 2020

Screenshot of package readme.

What I learned

The typical work flow was using SAS to get the data and then doing the analysis in Excel. Doing everything in R would be more efficient. It came to a point where I was constantly sourcing the same scripts so it was logical to turn these scripts into an R package. The package has functions that query certain crash flags so I don’t have to look up the actual query. On the backend, data is stored in a SQL database, one that I created and updates automatically on a weekly basis. Importing data multiple times a day and unable to store tihs data in the cloud, I found duckdb to be the fastest solution (as compared to csv, SQLite, and fst).

Highlighted packages

The dashboard uses data.table, duckdb, fst, and purrr.