Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (17.0%) to scientific vocabulary
Last synced: 10 months ago
·
JSON representation
Repository
R package for accessing the NISRA data portal API
Basic Info
- Host: GitHub
- Owner: MarkPaulin
- License: other
- Language: R
- Default Branch: main
- Homepage: https://markpaulin.github.io/nisrarr/
- Size: 1.56 MB
Statistics
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 1
- Releases: 2
Created over 1 year ago
· Last pushed about 1 year ago
Metadata Files
Readme
Changelog
License
README.Rmd
---
output: github_document
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# nisrarr
[](https://github.com/MarkPaulin/nisrarr/actions/workflows/R-CMD-check.yaml)
[](https://app.codecov.io/gh/MarkPaulin/nisrarr)
[](https://CRAN.R-project.org/package=nisrarr)
`nisrarr` is a package for accessing data from the
[NISRA data portal](https://data.nisra.gov.uk) directly from R.
## Installation
Install nisrarr from CRAN with:
``` r
install.packages("nisrarr")
```
Alternatively, you can install the development version of nisrarr from
[GitHub](https://github.com/) with:
``` r
# install.packages("pak")
pak::pak("MarkPaulin/nisrarr")
```
## Example
`nisra_search()` lets you search for a dataset using keywords or variable names,
and shows information like the last time the dataset was updated:
```{r search}
library(nisrarr)
head(nisra_search(keyword = "claimant"))
```
`nisra_read_dataset()` can be used to download a dataset from the NISRA data
portal as a data-frame:
```{r data}
claimant_count <- nisra_read_dataset("CCMLGD")
head(claimant_count)
```
The data portal also provides various types of metadata, which can be accessed
using `get_metadata()` or `get_metadata_field()`:
```{r metadata}
get_metadata(claimant_count)
get_metadata_field(claimant_count, "contact")
```
You can also access boundaries from the data portal. This isn't available for
all datasets, so your mileage may vary:
```{r bounds}
library(dplyr)
library(ggplot2)
claimant_count |>
nisra_get_boundaries() |>
filter(Statistic == "Percentage Claimant Count", Month == max(Month)) |>
ggplot(aes(fill = value)) +
geom_sf() +
scale_fill_binned(
type = "viridis",
n.breaks = 6,
name = "Percentage Claimant Count",
labels = scales::label_percent(scale = 1)
)
```
## Help wanted / things that need done
There isn't much error handling at the moment. If you're using this package and
get an error message, please open an issue!
## Inspiration
This package is heavily based on [csodata](https://github.com/CSOIreland/csodata), which wraps an identical API. I also learnt a lot from reading the code for [nomisr](https://github.com/ropensci/nomisr).
Owner
- Name: Mark
- Login: MarkPaulin
- Kind: user
- Location: Belfast
- Repositories: 1
- Profile: https://github.com/MarkPaulin
Interested in open data and data visualisation.
GitHub Events
Total
- Create event: 7
- Release event: 2
- Issues event: 12
- Delete event: 3
- Issue comment event: 4
- Push event: 37
- Pull request event: 6
- Fork event: 1
Last Year
- Create event: 7
- Release event: 2
- Issues event: 12
- Delete event: 3
- Issue comment event: 4
- Push event: 37
- Pull request event: 6
- Fork event: 1
Packages
- Total packages: 1
-
Total downloads:
- cran 189 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 2
- Total maintainers: 1
cran.r-project.org: nisrarr
Download Data from the NISRA Data Portal
- Homepage: https://github.com/MarkPaulin/nisrarr
- Documentation: http://cran.r-project.org/web/packages/nisrarr/nisrarr.pdf
- License: MIT + file LICENSE
-
Latest release: 0.1.1
published about 1 year ago
Rankings
Dependent packages count: 26.4%
Dependent repos count: 32.5%
Average: 48.5%
Downloads: 86.6%
Maintainers (1)
Last synced:
10 months ago
Dependencies
.github/workflows/R-CMD-check.yaml
actions
- actions/checkout v4 composite
- r-lib/actions/check-r-package v2 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/pr-commands.yaml
actions
- actions/checkout v4 composite
- r-lib/actions/pr-fetch v2 composite
- r-lib/actions/pr-push v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
DESCRIPTION
cran
- cachem * imports
- cli * imports
- dplyr * imports
- httr2 * imports
- jsonlite * imports
- lubridate * imports
- readr * imports
- rlang * imports
- stringr * imports
- tibble * imports
.github/workflows/test-coverage.yaml
actions
- actions/checkout v4 composite
- actions/upload-artifact v4 composite
- codecov/codecov-action v4 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite