{"id":32204654,"url":"https://github.com/evanodell/cqcr","last_synced_at":"2025-10-22T04:59:59.434Z","repository":{"id":56936700,"uuid":"204009825","full_name":"evanodell/cqcr","owner":"evanodell","description":"Access 'Care Quality Commission' Data","archived":false,"fork":false,"pushed_at":"2024-08-21T08:09:28.000Z","size":662,"stargazers_count":8,"open_issues_count":2,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-22T04:59:53.175Z","etag":null,"topics":["care-quality-commission","cqc","cqc-data","data-retrieval","healthcare","hospital","hospitals","r","social-care"],"latest_commit_sha":null,"homepage":"https://docs.evanodell.com/cqcr/","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/evanodell.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-08-23T14:02:03.000Z","updated_at":"2025-10-11T03:16:24.000Z","dependencies_parsed_at":"2025-09-08T16:34:01.408Z","dependency_job_id":null,"html_url":"https://github.com/evanodell/cqcr","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/evanodell/cqcr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evanodell%2Fcqcr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evanodell%2Fcqcr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evanodell%2Fcqcr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evanodell%2Fcqcr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/evanodell","download_url":"https://codeload.github.com/evanodell/cqcr/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evanodell%2Fcqcr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280382997,"owners_count":26321423,"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","status":"online","status_checked_at":"2025-10-22T02:00:06.515Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["care-quality-commission","cqc","cqc-data","data-retrieval","healthcare","hospital","hospitals","r","social-care"],"created_at":"2025-10-22T04:59:57.421Z","updated_at":"2025-10-22T04:59:59.420Z","avatar_url":"https://github.com/evanodell.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r options, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n```\n# cqcr\n\n\u003c!-- badges: start --\u003e\n[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)\n[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/cqcr)](https://cran.r-project.org/package=cqcr)\n[![GitHub tag](https://img.shields.io/github/tag/evanodell/cqcr.svg)](https://github.com/evanodell/cqcr)\n[![](https://cranlogs.r-pkg.org/badges/grand-total/cqcr)](https://dgrtwo.shinyapps.io/cranview/)\n[![R build status](https://github.com/evanodell/cqcr/workflows/R-CMD-check/badge.svg)](https://github.com/evanodell/cqcr/actions)\n[![AppVeyor build status](https://ci.appveyor.com/api/projects/status/github/evanodell/cqcr?branch=master\u0026svg=true)](https://ci.appveyor.com/project/evanodell/cqcr)\n[![Codecov test coverage](https://codecov.io/gh/evanodell/cqcr/branch/master/graph/badge.svg)](https://codecov.io/gh/evanodell/cqcr?branch=master)\n[![DOI](https://zenodo.org/badge/204009825.svg)](https://zenodo.org/badge/latestdoi/204009825)\n\u003c!-- badges: end --\u003e\n\nGet data from the Care Quality Commission [API](https://anypoint.mulesoft.com/exchange/portals/care-quality-commission-5/4d36bd23-127d-4acf-8903-ba292ea615d4/cqc-syndication-1/)\n\nAccess data from the 'Care Quality Commission', the health and adult social care regulator for England. The 'Care Quality Commission' operates an [API](https://www.cqc.org.uk/about-us/transparency/using-cqc-data#api), with data available under the Open Government License. Data includes information on service providers, locations such as hospitals, care homes and medical clinics, and ratings and inspection reports.\n\n\n## Installation\n\nThe package is available on [CRAN](https://cran.r-project.org/package=cqcr), and can be installed with:\n\n```\ninstall.packages(\"cqcr\")\n```\n\n\nTo install the development version from GitHub use:\n\n```\n#install.packages(\"devtools\")\ndevtools::install_github(\"evanodell/cqcr\")\n```\n\n```{r packages}\nlibrary(cqcr)\nlibrary(purrr)\nlibrary(dplyr)\nlibrary(ggplot2)\nlibrary(forcats)\n```\n\n```{r eval=FALSE}\nloc1 \u003c- cqc_locations_search(care_home = TRUE, \n                             local_authority = c(\"Waltham Forest\",\n                                                 \"Hackney\", \"Tower Hamlets\"))\n\n\ncare_home_details \u003c- cqc_location_details(loc1)\n\ncare_home_df \u003c- map_dfr(care_home_details, `[`,\n                        c(\"location_id\", \"name\", \"number_of_beds\", \n                          \"onspd_longitude\", \"onspd_latitude\"))\n\ncare_home_df \u003c- care_home_df %\u003e% \n  mutate(rating = care_home_details %\u003e%\n           map(c(\"current_ratings\", \"overall\", \"rating\")) %\u003e%\n           as.character(),\n         rating = recode(rating, \"NULL\" = \"No published rating\"),\n         rating = factor(rating, levels = c(\"Outstanding\", \"Good\",\n                                            \"Requires improvement\", \n                                            \"Inadequate\",\n                                            \"No published rating\")),\n         report_date = care_home_details %\u003e%\n           map(c(\"current_ratings\", \"reportDate\")) %\u003e%\n           as.character(),\n         report_date = ifelse(report_date == \"NULL\", NA, report_date),\n         specialisms = care_home_details %\u003e% map(c(\"specialisms\", \"name\")))\n\n```\n\n```{r readin, include=FALSE}\ncare_home_df \u003c- readr::read_rds(\"vignettes/care_home_df.rds\")\n```\n\n\n```{r plot}\ncare_home_df_unnest \u003c- tidyr::unnest(care_home_df, cols = c(specialisms)) %\u003e%\n  mutate(specialisms = fct_infreq(specialisms))\n\ntheme_set(theme_bw())\n\nggplot(care_home_df_unnest,\n                        aes(x = specialisms, fill = rating)) + \n  geom_bar() + \n  scale_x_discrete(labels = scales::wrap_format(33)) + \n  scale_fill_viridis_d(name=\"\", option = \"A\", end = 0.95) + \n  labs(x = \"Specialism(s)\", y = \"Number of Care Homes\") + \n  theme(legend.position = \"bottom\",\n        axis.text.x = element_text(size = 8, angle = 60, hjust = 1))\n```\n\n\n\n\n# Citing cqcr\n\n\nOdell E (2019). _cqcr: Access 'Care Quality Commission' Data_. doi: 10.5281/zenodo.3452020, R package version `r packageVersion(\"cqcr\")`, URL:\n\u003chttps://github.com/evanodell/cqcr\u003e.\n\nA BibTeX entry for LaTeX users is\n\n```\n  @Manual{,\n    title = {{cqcr}: Access 'Care Quality Commission' Data},\n    author = {Evan Odell},\n    doi = {10.5281/zenodo.3452020},\n    year = {2019},\n    note = {R package version `r packageVersion(\"cqcr\")`},\n    url = {https://github.com/evanodell/cqcr},\n  }\n```\n\n\n# Notes\n\nThis package is not affiliated with or supported by the Care Quality Commission. \n\nPlease note that the 'cqcr' project is released with a\n[Contributor Code of Conduct](https://github.com/evanodell/cqcr/blob/master/CODE_OF_CONDUCT.md).\nBy contributing to this project, you agree to abide by its terms.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevanodell%2Fcqcr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fevanodell%2Fcqcr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevanodell%2Fcqcr/lists"}