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 4 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.8%) to scientific vocabulary
Keywords
api-client
crime
police
police-api
r
r-package
uk
Last synced: 6 months ago
·
JSON representation
Repository
Download Data on UK Police and Crime
Basic Info
- Host: GitHub
- Owner: evanodell
- License: other
- Language: R
- Default Branch: master
- Homepage: https://docs.evanodell.com/ukpolice/
- Size: 1.34 MB
Statistics
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 0
- Releases: 0
Topics
api-client
crime
police
police-api
r
r-package
uk
Created almost 7 years ago
· Last pushed over 5 years ago
Metadata Files
Readme
License
Code of conduct
README.Rmd
---
output: github_document
---
```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# ukpolice
[](https://opensource.org/licenses/MIT)
[](https://travis-ci.org/evanodell/ukpolice)
[](https://ci.appveyor.com/project/evanodell/ukpolice)
[](https://codecov.io/github/evanodell/ukpolice?branch=master)
[](https://cran.r-project.org/package=ukpolice)
[](https://github.com/evanodell/ukpolice)
[](https://cran.r-project.org/package=ukpolice)
[](https://zenodo.org/badge/latestdoi/178673884)
[](https://github.com/evanodell/ukpolice/actions)
The `ukpolice` package downloads data from the UK Police public data API, the full docs of which are available at https://data.police.uk/docs/. Data is available on police forces, crimes, policing areas and stop-and-search.
`ukpolice` is on CRAN, which you can download using:
```{r cran-installation, eval = FALSE}
install.packages("ukpolice")
```
You can install the development version of `ukpolice` from github with:
```{r gh-installation, eval = FALSE}
# install.packages("devtools")
devtools::install_github("evanodell/ukpolice")
```
Data is available on police forces, crimes, policing areas and stop-and-search. All functions begin with `ukc_`.
The example below queries stop and searches by the Thames Valley Police in December 2018, and plots them by police-reported ethnic group.
```{r example, message=FALSE, warning=FALSE}
library(ukpolice)
library(ggplot2)
library(dplyr)
tv_ss <- ukc_stop_search_force("thames-valley", date = "2020-07")
tv_ss2 <- tv_ss %>%
filter(!is.na(officer_defined_ethnicity) & outcome != "" ) %>%
group_by(officer_defined_ethnicity, outcome) %>%
summarise(n = n()) %>%
mutate(perc = n/sum(n))
theme_set(theme_bw())
p1 <- ggplot(tv_ss2, aes(x = outcome, y = perc,
group = outcome, fill = outcome)) +
geom_col(position = "dodge") +
scale_y_continuous(labels = scales::percent,
breaks = seq(0.25, 0.8, by = 0.25)) +
scale_x_discrete(labels = scales::wrap_format(20)) +
theme(legend.position = "none",
axis.text.x = element_text(size = 7, angle = 45, hjust = 1)) +
labs(x = "Outcome",
y = "Percentage of stop and searches resulting in outcome",
title = "Stop and Search Outcomes by Police-Reported Ethnicity",
subtitle = "Thames Valley Police Department, July 2020",
caption = "(c) Evan Odell | CC-BY-SA") +
facet_wrap(~officer_defined_ethnicity)
p1
```
For more details, see the package vignette [vignette](https://docs.evanodell.com/ukpolice/articles/introduction.html) and [function documentation](https://docs.evanodell.com/ukpolice/reference/index.html).
## Meta
Please note that the 'ukpolice' project is released with a [Contributor Code of Conduct](https://github.com/evanodell/ukpolice/blob/master/CODE_OF_CONDUCT.md). By contributing to this project, you agree to abide by its terms.
The UK Police API is operated by the UK Government's Home Office. The `ukpolice` package is not affiliated with the Home Office. All data accessed through `ukpolice` is licenced with [Open Government Licence v3.0](https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/).
Get citation information for `ukpolice` in R with `citation(package = 'ukpolice')`, or use the citation information below:
Odell E, Tierney N (2020). _ukpolice: Download Data on UK Police and Crime_. doi:
[10.5281/zenodo.2619537](https://doi.org/10.5281/zenodo.2619537), R package version `r packageVersion("ukpolice")`, URL: https://github.com/evanodell/ukpolice.
A BibTeX entry for LaTeX users is:
```
@Manual{,
title = {{ukpolice}: Download Data on UK Police and Crime},
author = {Evan Odell and Nicholas Tierney},
year = {2020},
note = {R package version `r packageVersion("ukpolice")`},
doi = {10.5281/zenodo.2619537},
url = {https://github.com/evanodell/ukpolice},
}
```
Owner
- Name: Evan Odell
- Login: evanodell
- Kind: user
- Location: Berlin
- Website: https://evanodell.com
- Twitter: evanodell
- Repositories: 4
- Profile: https://github.com/evanodell
Data analysis | Statistics | R packages
GitHub Events
Total
Last Year
Committers
Last synced: almost 3 years ago
All Time
- Total Commits: 57
- Total Committers: 2
- Avg Commits per committer: 28.5
- Development Distribution Score (DDS): 0.018
Top Committers
| Name | Commits | |
|---|---|---|
| Evan Odell | e****1@g****m | 56 |
| Sam Abbott | c****t@s****k | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: over 2 years ago
All Time
- Total issues: 1
- Total pull requests: 3
- Average time to close issues: 43 minutes
- Average time to close pull requests: about 16 hours
- Total issue authors: 1
- Total pull request authors: 2
- Average comments per issue: 2.0
- Average comments per pull request: 0.33
- Merged pull requests: 2
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- rmac94 (1)
Pull Request Authors
- evanodell (2)
- seabbs (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- cran 267 last-month
- Total dependent packages: 0
- Total dependent repositories: 1
- Total versions: 5
- Total maintainers: 1
cran.r-project.org: ukpolice
Download Data on UK Police and Crime
- Homepage: https://github.com/EvanOdell/ukpolice/
- Documentation: http://cran.r-project.org/web/packages/ukpolice/ukpolice.pdf
- License: MIT + file LICENSE
-
Latest release: 0.2.2
published over 5 years ago
Rankings
Stargazers count: 20.6%
Dependent repos count: 24.0%
Average: 27.6%
Forks count: 27.8%
Dependent packages count: 28.8%
Downloads: 37.1%
Maintainers (1)
Last synced:
6 months ago
Dependencies
DESCRIPTION
cran
- httr * imports
- jsonlite * imports
- purrr * imports
- snakecase * imports
- tibble * imports
- covr * suggests
- dplyr * suggests
- ggplot2 * suggests
- htmltools * suggests
- knitr * suggests
- leaflet * suggests
- rmarkdown * suggests
- scales * suggests
- sf * suggests
- sp * suggests
- testthat * suggests
docs/articles/introduction_files/leaflet-markercluster-1.0.5/package.json
npm
- jake ~0.5.16 development
- jshint ~2.1.3 development
- karma ~0.8.5 development
- leaflet ~1.0.3 development
- magic-string ^0.7.0 development
- mocha ~1.10.0 development
- uglify-js ~2.6.0 development