inquiRy is an R package to extract written evidence from UK Parliament Select Committee inquiries. inquiRy was written as my final project for CS50's Programming with R. Watch a video walkthrough of inquiRy below!
- Load
main.Rinto RStudio - Call
written_submissions(n, clean = TRUE)- Replace
nwith a Select Committee inquiry's unique ID (to find this, go to an inquiry's landing page and take the four digit number from the URL e.g. 1813. - If
cleanis set to true (or not specified), redundant text will be removed from the start of written evidence.
- Replace
- A CSV file is saved to
cwd.- Each row corresponds to an individual piece of written evidence submitted to the inquiry
- Each row has three fields: a unique ID, an author(s), and raw evidence text.
- To view / manipulate the resulting data in RStudio, asign
written_submissions's return value to a variable e.g.,data <- written_submissions(1813, clean = TRUE).
inquiRy is a package written in R. inquiRy contains six functions:
written_submissions(main function (calls other functions); stored inmain.R)check_inputget_document_idsget_submittersget_documentsclean_evidence
inquiRy requires six external packages:
gluehttrxml2jsonlitebase64encdplyr
The package comes with test files (test-that) as well as man file documentation.
inquiRy uses Parliament's Select Committee API. Functions generally retrieve data as JSON via GET requests.
In the UK, Parliamentary Select Committees are cross-party groups of MPs and Lords which investigate specific issues and scrutinise the work of Government.
Select Committees perform inquiries, gathering written evidence from organisations and members of the public, and oral evidence sessions. Select Committees write reports with recommendations which the Government responds to.
Select Committees perform their work openly. Reports and their underlying evidence are published freely on Parliament's website.
Hello, World - I'm Ross Coron!
I'm a Senior Analyst at the UK's National Audit Office. My previous policy positions include the House of Lords (UK Parliament), the Department of Health and Social Care, and Blood Cancer UK.
Prior to hanging around Whitehall, I was a biochemist at Imperial College London, Institut Pasteur (Paris), and the University of St Andrews.
I'm interested in all-things policy, programming, pipetting. Let's connect!
