cqcr

Access 'Care Quality Commission' Data

https://github.com/evanodell/cqcr

Science Score: 23.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
    Found 2 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (16.3%) to scientific vocabulary

Keywords

care-quality-commission cqc cqc-data data-retrieval healthcare hospital hospitals r social-care
Last synced: 6 months ago · JSON representation

Repository

Access 'Care Quality Commission' Data

Basic Info
Statistics
  • Stars: 5
  • Watchers: 2
  • Forks: 0
  • Open Issues: 1
  • Releases: 0
Topics
care-quality-commission cqc cqc-data data-retrieval healthcare hospital hospitals r social-care
Created over 6 years ago · Last pushed almost 3 years ago
Metadata Files
Readme License Code of conduct

README.Rmd

---
output: github_document
---



```{r options, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)
```
# cqcr


[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/cqcr)](https://cran.r-project.org/package=cqcr)
[![GitHub tag](https://img.shields.io/github/tag/evanodell/cqcr.svg)](https://github.com/evanodell/cqcr)
[![](https://cranlogs.r-pkg.org/badges/grand-total/cqcr)](https://dgrtwo.shinyapps.io/cranview/)
[![R build status](https://github.com/evanodell/cqcr/workflows/R-CMD-check/badge.svg)](https://github.com/evanodell/cqcr/actions)
[![AppVeyor build status](https://ci.appveyor.com/api/projects/status/github/evanodell/cqcr?branch=master&svg=true)](https://ci.appveyor.com/project/evanodell/cqcr)
[![Codecov test coverage](https://codecov.io/gh/evanodell/cqcr/branch/master/graph/badge.svg)](https://codecov.io/gh/evanodell/cqcr?branch=master)
[![DOI](https://zenodo.org/badge/204009825.svg)](https://zenodo.org/badge/latestdoi/204009825)


Get 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/)

Access 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.


## Installation

The package is available on [CRAN](https://cran.r-project.org/package=cqcr), and can be installed with:

```
install.packages("cqcr")
```


To install the development version from GitHub use:

```
#install.packages("devtools")
devtools::install_github("evanodell/cqcr")
```

```{r packages}
library(cqcr)
library(purrr)
library(dplyr)
library(ggplot2)
library(forcats)
```

```{r eval=FALSE}
loc1 <- cqc_locations_search(care_home = TRUE, 
                             local_authority = c("Waltham Forest",
                                                 "Hackney", "Tower Hamlets"))


care_home_details <- cqc_location_details(loc1)

care_home_df <- map_dfr(care_home_details, `[`,
                        c("location_id", "name", "number_of_beds", 
                          "onspd_longitude", "onspd_latitude"))

care_home_df <- care_home_df %>% 
  mutate(rating = care_home_details %>%
           map(c("current_ratings", "overall", "rating")) %>%
           as.character(),
         rating = recode(rating, "NULL" = "No published rating"),
         rating = factor(rating, levels = c("Outstanding", "Good",
                                            "Requires improvement", 
                                            "Inadequate",
                                            "No published rating")),
         report_date = care_home_details %>%
           map(c("current_ratings", "reportDate")) %>%
           as.character(),
         report_date = ifelse(report_date == "NULL", NA, report_date),
         specialisms = care_home_details %>% map(c("specialisms", "name")))

```

```{r readin, include=FALSE}
care_home_df <- readr::read_rds("vignettes/care_home_df.rds")
```


```{r plot}
care_home_df_unnest <- tidyr::unnest(care_home_df, cols = c(specialisms)) %>%
  mutate(specialisms = fct_infreq(specialisms))

theme_set(theme_bw())

ggplot(care_home_df_unnest,
                        aes(x = specialisms, fill = rating)) + 
  geom_bar() + 
  scale_x_discrete(labels = scales::wrap_format(33)) + 
  scale_fill_viridis_d(name="", option = "A", end = 0.95) + 
  labs(x = "Specialism(s)", y = "Number of Care Homes") + 
  theme(legend.position = "bottom",
        axis.text.x = element_text(size = 8, angle = 60, hjust = 1))
```




# Citing cqcr


Odell E (2019). _cqcr: Access 'Care Quality Commission' Data_. doi: 10.5281/zenodo.3452020, R package version `r packageVersion("cqcr")`, URL:
.

A BibTeX entry for LaTeX users is

```
  @Manual{,
    title = {{cqcr}: Access 'Care Quality Commission' Data},
    author = {Evan Odell},
    doi = {10.5281/zenodo.3452020},
    year = {2019},
    note = {R package version `r packageVersion("cqcr")`},
    url = {https://github.com/evanodell/cqcr},
  }
```


# Notes

This package is not affiliated with or supported by the Care Quality Commission. 

Please note that the 'cqcr' project is released with a
[Contributor Code of Conduct](https://github.com/evanodell/cqcr/blob/master/CODE_OF_CONDUCT.md).
By contributing to this project, you agree to abide by its terms.

Owner

  • Name: Evan Odell
  • Login: evanodell
  • Kind: user
  • Location: Berlin

Data analysis | Statistics | R packages

GitHub Events

Total
  • Issue comment event: 1
Last Year
  • Issue comment event: 1

Committers

Last synced: almost 3 years ago

All Time
  • Total Commits: 46
  • Total Committers: 1
  • Avg Commits per committer: 46.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
evan e****1@g****m 46

Issues and Pull Requests

Last synced: over 2 years ago

All Time
  • Total issues: 2
  • Total pull requests: 0
  • Average time to close issues: 5 days
  • Average time to close pull requests: N/A
  • Total issue authors: 2
  • Total pull request authors: 0
  • Average comments per issue: 1.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 0
  • Average time to close issues: 5 days
  • Average time to close pull requests: N/A
  • Issue authors: 1
  • Pull request authors: 0
  • Average comments per issue: 2.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • evanodell (1)
  • simondashnash (1)
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • cran 168 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 1
  • Total maintainers: 1
cran.r-project.org: cqcr

Access 'Care Quality Commission' Data

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 168 Last month
Rankings
Stargazers count: 22.1%
Dependent repos count: 24.6%
Forks count: 28.3%
Dependent packages count: 28.7%
Average: 36.1%
Downloads: 76.8%
Maintainers (1)
Last synced: over 2 years ago

Dependencies

DESCRIPTION cran
  • R >= 3.5.0 depends
  • anytime * imports
  • dplyr * imports
  • httr * imports
  • jsonlite * imports
  • purrr * imports
  • rlang * imports
  • snakecase * imports
  • covr * suggests
  • forcats * suggests
  • htmltools * suggests
  • knitr * suggests
  • leaflet * suggests
  • pbapply * suggests
  • readr * suggests
  • rmarkdown * suggests
  • scales * suggests
  • testthat >= 2.1.0 suggests
  • tibble * suggests
  • tidyr * suggests