Skip to content

R data analysis of Government of Canada proactive disclosure of contracts data

License

Notifications You must be signed in to change notification settings

GoC-Spending/contracts-data

Repository files navigation

Government of Canada contract data analysis

This repository contains the R code to analyze Government of Canada procurement data published through the Proactive Disclosure of Contracts.

It uses the Tidyverse collection of packages as well as janitor, purrr and several others. See _libraries.R for the full set.

Inflation adjustments are done using Statistics Canada data via the cansim package, in inflation_adjustments.R.

System requirements

This analysis uses the R programming language and R Studio, although it could be run with other R environments.

Running this analysis in R Studio typically requires about 20 GB of RAM; we’d recommend running it on a computer with at least 32 GB. A typical run-through takes between 5 and 6 hours to complete.

Running the analysis

The main analysis takes place in load.R. This does the following steps:

  • Downloads the latest copy of the source data from open.canada.ca
  • Retrieves the latest inflation index data from Statistics Canada using cansim
  • Conducts the analysis described on the Methodology page
  • Exports a variety of summary CSV files to the data/out folder
  • Updates the run log with metadata from the completed analysis run

Data files

Summary CSV files are produced each time the analysis runs in the data/out folder. This includes:

A number of other analysis outputs are included in the overall trends folders, produced by research_findings.R which is run automatically by load.R.

Charts for specific presentations and other artefacts are produced by additional_research_findings.R and presentation_findings.R, which need to be run separately after contract data has already loaded in the environment.

You can see the resulting summary CSVs and other trend information in a user-friendly way at govcanadacontracts.ca. This website is produced from the CSVs generated by this repository, via the Blogdown code in contracts-data-web.

Feedback and improvements

You can get in touch with the research team via the About the project page, or use the feedback form to send in your suggestions.

This repository is licensed under the MIT license. Source data from the Government of Canada is available under the Open Government License – Canada. Please see the license details for specific R packages that are used for more information.

A Carleton SPPA Research Project

About

R data analysis of Government of Canada proactive disclosure of contracts data

Resources

License

Stars

Watchers

Forks