arear

A collection of shapefile tools and catchment area algorithm

https://github.com/terminological/arear

Science Score: 49.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
    Found 1 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.4%) to scientific vocabulary
Last synced: 6 months ago · JSON representation

Repository

A collection of shapefile tools and catchment area algorithm

Basic Info
Statistics
  • Stars: 4
  • Watchers: 2
  • Forks: 1
  • Open Issues: 0
  • Releases: 4
Created about 5 years ago · Last pushed almost 2 years ago
Metadata Files
Readme License Citation

README.md

arear

R-CMD-check DOI arear status badge <!-- badges: end -->

This package provides a suite of geo-spatial functions that were useful during the response to the COVID-19 pandemic in the UK. It provides some curated data relevant to hospital capacity in the NHS, and demographic data for the UK at the beginning of the pandemic. Coupled with this are a range of functions to simplify the management of mapping data between different administrative geographies, at different levels of detail that were involved in COVID-19 reporting. For mapping community case data to hospital admissions data the library provides an algorithmic hospital catchment area estimation based on label propagation, the methods for which are described in detail in the paper "Algortihmic hospital catchment area estimation using label propagation". Many of the operations in the package involve time consuming calculations, which only generally need to be performed once, so the package incorporates a transparent filesystem caching layer to speed it all up.

Installation

arear is distributed via 'r-universe'. arear has a dependency on the sf package which in turn requires the gdal, geos and proj libraries. These can be installed on MacOS and linux using the instructions below but more details is available in the sf package

```BASH

in debian / ubuntu prior to 18.04 the following ppa is required for arear

sudo add-apt-repository -y ppa:ubuntugis/ubuntugis-unstable sudo apt-get -q update

system library dependencies:

sudo apt-get install -y make libcurl4-openssl-dev libssl-dev libprotobuf-dev \ protobuf-compiler libgeos-dev libproj-dev libudunits2-dev libjq-dev \ libicu-dev libgdal-dev gdal-bin libv8-dev

or on macOS

brew install gdal proj geos protobuf jq ```

With sf dependencies installed you can then install the development version of arear from GitHub with the following commands:

```R

install.packages("devtools")

devtools::install_github("terminological/arear") ```

or stable releases from r-universe by:

```R

Enable repository from terminological

options(repos = c( terminological = 'https://terminological.r-universe.dev', CRAN = 'https://cloud.r-project.org'))

Download and install rmaven in R

install.packages('arear') ```

This can take some time if sf has not already been set up.

Example

Without this package accessing maps relevant to the UK requires knowing where to look for various shape files, and then managing the various differences between nomenclature and naming conventions. The package provides a simple interface to downloading, extracting, standardising, and caching the main UK maps. Getting and plotting a map for the UK based on the administrative code in use is made relatively simple:

```R

library(arear) library(sf)

list the available maps ids:

arear::listStandardMaps()

map = arear::getMap("CTRY19") nhshospitals = arear::surgecapacity %>% dplyr::filter(sector == "NHS Sector")

ggplot()+ geomsf(data=map)+ geomsf(data=nhshospitals, aes(colour=tier1))+ arear::mapTheme() ```

Next steps

Please check the getting-started vignette for more examples on the available functions, including the catchment area algorithm.

Owner

  • Name: terminological
  • Login: terminological
  • Kind: organization
  • Email: rob@terminological.co.uk

Health informatics and data analytics

GitHub Events

Total
Last Year

Dependencies

.github/workflows/R-CMD-check.yaml actions
  • actions/checkout v2 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
  • r-lib/actions/setup-tinytex v2 composite
DESCRIPTION cran
  • R >= 2.10 depends
  • digest * imports
  • dplyr * imports
  • fs * imports
  • ggplot2 * imports
  • ggrepel * imports
  • glue * imports
  • grid * imports
  • gridExtra * imports
  • gtable * imports
  • here * imports
  • httr * imports
  • jsonlite * imports
  • leaflet * imports
  • lwgeom * imports
  • magrittr * imports
  • patchwork * imports
  • purrr * imports
  • rappdirs * imports
  • rlang * imports
  • rmapshaper * imports
  • sf * imports
  • spdep * imports
  • stringr * imports
  • tibble * imports
  • tidyselect * imports
  • covr * suggests
  • devtools * suggests
  • ggraph * suggests
  • ggspatial * suggests
  • knitr * suggests
  • markdown * suggests
  • pkgdown * suggests
  • readr * suggests
  • rmarkdown * suggests
  • rprojroot * suggests
  • scales * suggests
  • testthat * suggests
  • tidygraph * suggests
  • tidyr * suggests
  • tidyverse * suggests