{"id":23786600,"url":"https://github.com/seabbs/tbinenglanddataclean","last_synced_at":"2025-06-22T12:08:40.435Z","repository":{"id":99745299,"uuid":"93072437","full_name":"seabbs/tbinenglanddataclean","owner":"seabbs","description":"Cleans and Munges Tuberculosis and Demographic Data for England","archived":false,"fork":false,"pushed_at":"2019-07-11T17:18:23.000Z","size":32803,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-22T04:41:50.360Z","etag":null,"topics":["data-cleaning","demographics","england","incidence","tuberculosis"],"latest_commit_sha":null,"homepage":"http://www.samabbott.co.uk/tbinenglanddataclean/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/seabbs.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-06-01T15:32:07.000Z","updated_at":"2019-08-02T16:12:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"f9d2755b-ba69-41f5-8576-0d5f4057f2f4","html_url":"https://github.com/seabbs/tbinenglanddataclean","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/seabbs/tbinenglanddataclean","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seabbs%2Ftbinenglanddataclean","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seabbs%2Ftbinenglanddataclean/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seabbs%2Ftbinenglanddataclean/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seabbs%2Ftbinenglanddataclean/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/seabbs","download_url":"https://codeload.github.com/seabbs/tbinenglanddataclean/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seabbs%2Ftbinenglanddataclean/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261289418,"owners_count":23136070,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-cleaning","demographics","england","incidence","tuberculosis"],"created_at":"2025-01-01T14:27:21.650Z","updated_at":"2025-06-22T12:08:35.412Z","avatar_url":"https://github.com/seabbs.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n```{r, echo = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"README-\"\n)\n```\n\n# tbinenglanddataclean \n\n[![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://www.tidyverse.org/lifecycle/#stable)\n[![develVersion](https://img.shields.io/badge/devel%20version-1.0.0-blue.svg?style=flat)](https://github.com/tbinenglanddataclean)\n[![Documentation via pkgdown](https://img.shields.io/badge/Documentation-click here!-lightgrey.svg?style=flat)](https://www.samabbott.co.uk/tbinenglanddataclean/)\n[![Build Status](https://travis-ci.org/seabbs/tbinenglanddataclean.svg?branch=master)](https://travis-ci.org/seabbs/tbinenglanddataclean)\n[![codecov](https://codecov.io/gh/seabbs/tbinenglanddataclean/branch/master/graph/badge.svg)](https://codecov.io/gh/seabbs/tbinenglanddataclean)\n[![DOI](https://zenodo.org/badge/93072437.svg)](https://zenodo.org/badge/latestdoi/93072437)\n\n`tbinenglanddataclean` is an R package that contains functions and documentation to reproduce clean and munge available TB data in England.\n\n\n## Installation\n\nYou can install tbinenglanddataclean from github with:\n\n```{r gh-installation, eval = FALSE}\n# install.packages(\"devtools\")\ndevtools::install_github(\"seabbs/tbinenglanddataclean\")\n```\n\n## Raw data\n\nThis package relies on raw data from several sources, these are;\n\n1. An extract of from the [Enhanced Tuberculosis Surveillance System](https://www.gov.uk/government/publications/tuberculosis-tb-in-england-surveillance-data). Access to this data requires an application to Public Health England.\n1. Data on historic TB notifications from [Public Health England](https://www.gov.uk/government/publications/tuberculosis-tb-annual-notifications-1913-onwards).\n1. Demographic data from 2000, and from 2001 to 2015 from the [Office of National Statistics](https://www.ons.gov.uk/peoplepopulationandcommunity/populationandmigration/populationestimates/datasets/populationestimatesforukenglandandwalesscotlandandnorthernireland) (ONS) this data can be downloaded freely.\n1. Data on births in the UK both observed and projected from the ONS, available [here](https://www.ons.gov.uk/peoplepopulationandcommunity/populationandmigration/populationestimates/datasets/vitalstatisticspopulationandhealthreferencetables) and [here](https://www.ons.gov.uk/peoplepopulationandcommunity/populationandmigration/populationestimates/datasets/vitalstatisticspopulationandhealthreferencetables).\n1. Data on age specific mortality rates from the ONS, available [here](\"https://www.ons.gov.uk/peoplepopulationandcommunity/birthsdeathsandmarriages/lifeexpectancies/datasets/nationallifetablesenglandreferencetables\").\n1. Survey information from the Labour Force Survey, as yearly extracts from 2000-2016 for the [April to June survey](https://discover.ukdataservice.ac.uk/catalogue/?sn=5461). Only registered users can download this data. Registration is possible for those at UK institutions. Other access arrangements can be made at request.\n\n## Cleaning and building the datasets\n\nThe included vignette contains the code necessary to build all datasets associated with this package. Each function needs to be pointed at the correct raw data. If the default file names/locations are changed then this will also require updating. Contact [me](https://www.samabbott.co.uk) if you have any problems.\n\nOther vignettes explore approaches for estimating demographic parameters from the clean and munged datasets.\n\n### Docker\n\nThis packge was developed in a docker container based on the [tidyverse](https://hub.docker.com/r/rocker/tidyverse/) docker image. To run the docker image run:\n\n```{bash, eval = FALSE}\ndocker run -d -p 8787:8787 --name tbinenglanddataclean --mount type=bind,source=$(pwd)/data/tb_data,target=/home/rstudio/tbinenglanddataclean/data/tb_data -e USER=tbinenglanddataclean -e PASSWORD=tbinenglanddataclean seabbs/tbinenglanddataclean\n```\n\nThe rstudio client can be found on port `:8787` at your local machines ip. The default username:password is tbinenglanddataclean:tbinenglanddataclean, set the user with `-e USER=username`, and the password with ` - e PASSWORD=newpasswordhere`. The default is to save the analysis files into the user directory. If running without the accomanying data then remove `--mount type=bind,source=$(pwd)/data/tb_data,target=/home/rstudio/tbinenglanddataclean/data/tb_data`.\n\nTo run a plain R terminal use:\n\n```{bash, eval = FALSE}\ndocker run --rm -it --user seabbs tbinenglanddataclean /usr/bin/R\n```\n\nTo run a plain bash session:\n\n```{bash, eval = FALSE}\ndocker run --rm -it --user seabbs tbinenglanddataclean /bin/bash\n```\n\nTo connect as root:\n\n```{bash, eval = FALSE}\ndocker exec -ti -u root tbinenglanddataclean bash\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseabbs%2Ftbinenglanddataclean","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseabbs%2Ftbinenglanddataclean","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseabbs%2Ftbinenglanddataclean/lists"}