Coder Social home page Coder Social logo

covid-brs's Introduction

Covid R scripts: README

This folder contains a collection of scripts for loading and analysing Covid Business Restriction Survey data. The master scripts are on CBAS in gitlab repository "Covid". Versions are in this folder so MHCLG and others can more easily access them. I've not created R projects so to run one of the "end use" scripts you'll have to put all relevant precedents into your working directory or set up a project yourself I've listed some sets of files for different tasks below...

fernley Symons 23:46 21/01/2021

General

  • CovidLoadDataFunctions.r
    Functions to load data and aggregate it; includes functions to load lookups like geography lookups, field description [whether number/text] lookups. NB this includes lists with sets of fields to add together to get totals etc. Edit this if these change [e.g. when new options added to questions]
  • CovidLoadPublicData.r
    Load [concatenate] all the public "br*.xlsx" files listed in the README. Assumes README exists and has named range with public "br*" files listed
  • CovidLoadWorkingData.r
    Load any working files listed in a separate input file [edit the code to reflect your input file with its list of files to load, and keep the input file as audit trail]
  • CovidByWeek.r
    Basic aggregation script doing aggregation by week etc. NB default in underlying function is to group by week, but should work for any supplied grouping variable [e.g. group by q2 to get total checks by each respondent since survey start etc]. Call this script with grouping variables as in CovidByWeekEng.r,CovidByWeekRegion.r

QA scripts

  • CovidNoFTEsByWeek.r
    Crosstab giving those respondents who've not recorded any FTE resource by week.
  • CovidResponsesByWeek.r
    Create a matrix of response received [=1] or not [=0] by potential respondents / weeks. Works on public data

Data summary

  • CovidByWeekEng.r
    aggregation by week for England
  • CovidByWeekRegion.r
    aggregation by week for regions

Create public dataset

  • CovidKentResponses.r
    Extract of overall data for Kent respondents only. ***Check this carefully for disclosive info before making available ***

Tasks:

1) Extracting Kent data [subset of all data]

CovidKentResponses.r calls:
      CovidLoadPublicData.r,
      [optional: CovidLoadWorkingData.r]
      CovidLoadDataFunctions.r

2) Summarising who responded in which week

CovidResponsesByWeek.r calls:
      CovidLoadPublicData.r,
      [optional: CovidLoadWorkingData.r]
      CovidLoadDataFunctions.r

3) Determining who recorded no FTEs [but did respond] by week

CovidNoFTEsByWeek.r calls:
      CovidLoadPublicData.r,
      [optional: CovidLoadWorkingData.r]
      CovidLoadDataFunctions.r

4) Summarising data by week [England]

CovidByWeekEng.r calls:
      CovidByWeek.r
      CovidLoadPublicData.r,
      [optional: CovidLoadWorkingData.r]
      CovidLoadDataFunctions.r

5) Summarising data by week and region

CovidByWeekRegion.r calls:
      CovidByWeek.r
      CovidLoadPublicData.r,
      [optional: CovidLoadWorkingData.r]
      CovidLoadDataFunctions.r

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.