Imputation and analysis of sports volunteering rates in English local areas using Sport England's ActiveLives survey
James Liley, Bilal Ashraf, Caroline Dodd-Reynolds, Lindsay Findlay-King, Iain Lindsey, Jochen Einbeck
This repository concerns rates of sports volunteering in English local areas, using data from Sport England's ActiveLives survey. Analyses are in R. Data is not included in this repository but can be downloaded from the UK data service.
This repository contains two zipped files, each containing datasets and code in the R language.
- The first file (ActiveLives_share.zip) contains a pipeline to impute individual-level volunteering status (namely, whether an invididual had engaged in sports volunteering in the past month or in the past year). Please see the report contained in the zip file for more details.
- The second file (ActiveLives_shiny.zip) contains code to generate an R shiny app to visualise data.
This repository does not contain any ActiveLives data. Relevant datasets are publically available from UKDA.
To use this code, please do the following:
- Clone this repository locally
- Download the 2017-18 ActiveLives survey as a
.sav
file. The script will expect it to be called20220209 Active Lives Survey_May 17-18 data_Shared.sav
and look for it in the subdirectoryAnalysis/Data/Original/
. The data also needs the codebook, which it will expect to be called"Active Lives Adult Code Book_Mid year 3_V1_final.xlsx"
, also in the subdirectoryAnalysis/Data/Original/
. - In R, set the working directory to the folder
Analysis
. - Please see the README in
Analysis/Code
for details on running analyses. The fileAnalysis/Code/read_raw.R
will read the.sav
file, and filesAnalysis/Code/initial_analysis.R
andAnalysis/Code/analysis.R
will perform the main analyses.
To use the app, please do the following (after doing the above):
- In R, set the working directory to the folder
Shiny
- Run the file
la_associations.R
- Run the file
chloropleth.R
. This will generate the fileShiny/App/la_data.RData
. - The app should now work.