City of Fort Collins Spending Analysis

Stoltzmaniac is going local in today’s blog post! I dug into the City of Fort Collins open data and published my findings below.

The data was surprisingly clean and laid out in JSON format on Amazon S3. This post shows my exploration of the data along with some observations.


As always, I loaded the required libraries. I also loaded a custom ‘cleaningData.R’ script, which I wrote specifically for this project.

I created a custom function to fetch, clean, and merge the data (code provided at the end of this post). I also created columns to help with the time series analysis.

The data is from The City of Fort Collins Website

When are vendors being paid by the City of Fort Collins?
  • The overwhelming majority of payments are made at the end of the month regardless of the year or month in question (Fig. 1 & 2)
    • For example, in January and February, between 15-20% of the payments were on the final day of the month (Fig. 2)
  • Almost all payments are made during the week (no surprise there) (Fig. 3)
    • Strangely, Thursday seems to have fewer payments than other days
    • It is substantially lower than other weekdays in both years
    • However, there is a relatively simple explanation: the end of the month didn’t land on Thursday very often
    • For example, Friday would have been the final business day of the month in 6 out of 12 months of 2014 whereas Thursday was only the last day of 1 out of 12 months in 2014

plot

plot

plot

Which departments spent the most money?
  • L&P Operations Service Unit spent almost $100M each year!
    • L&P stands for Light & Power
    • That’s roughly 4x the next highest spending department (Engineering) (Fig. 4)

plot

Where was L&P spending all of that money?
  • Almost all of the money goes to Platte River Power Authority (Fig. 5)
  • After removing this outlier, the rest of the data is easier to visualize (Fig. 6)
    • The most interesting observation: “fountain, city of” cost over $1.25M in 2014!

plot

plot

Which vendors received the highest average payments?
  • The Platte River Power Authority ranks number one (Fig. 7)
  • New Flyer of America came in second (Fig. 7)
    • New Flyer of America was the vendor for the MAX buses that were purchased in 2015
      plot

After diving into a few different departments and finding relatively unremarkable spending patterns I stumbled across ‘Patrol’ and it piqued my interest.

What vendors had the highest payment totals in the ‘Patrol’ department?
  • Redflex Traffic Systems Inc. was the number one vendor (Fig. 8)
    • They are a maker of red light cameras
    • There is a lot of controversy around this company and red light cameras in general
    • The company’s former CEO resigned due to being tied to bribes paid to elected officials
    • Chicago and Columbus were the cities in which bribery was being conducted – News Article
    • The financial return on these cameras is constantly being scrutinized in the US – News Article – the costs associated with the cameras are relatively high
    • Multiple cities, lead by Chicago, are questioning how effective these cameras are at reducing accidents News Article

plot

Conclusion
  • Overall, spending appears to align with what we see in Fort Collins
  • It will be interesting to see if Redflex continues to be on the payroll after what happened in Chicago & Columbus (not to mention the ROI and efficacy studies)
  • There’s not enough data to see a trend or attempt to make a forecast for future spending
  • Spending on schools and education has been a big topic in Fort Collins. I’ll attempt to find changes in this as we move forward and the data is updated

Code used in this post is on my GitHub

The fetchAndCleanData() function is below. I had some difficulties with binding the rows upon reading in JSON. Chip Oglesby helped me out, thanks Chip for introducing me to bind_rows!