SmarterScotland 0.0.0.9010
  • Reference
  • Articles
    • Basic Workflow
    • Support Functions
  • Changelog

SmarterScotland

Overview

The SmarterScotland package provides a convenient interface for sourcing and interrogating data available through the statistics.gov.scot.

Example

# Data
library(SmarterScotland)
# Visuals and data manipulation
suppressPackageStartupMessages(library(tidyverse))
# Data sourcing
dta_Glasgow_Crime <- get_geography_data(data_set = "recorded-crime",
                                        geography = "Glasgow City",
                                        measure = "count",
                                        pre_process_results = TRUE)
# Summary chart
dta_Glasgow_Crime %>% 
  filter(crime_or_offence == "all-crimes") %>%
  select(count, reference_period) %>% 
  arrange(desc(reference_period)) %>% 
  ggplot(aes(x = reference_period, y = count, group = 1)) +
  geom_line() +
  labs(x = "Reference Period",
       y = "Count",
       title = "Total Crime in Glasgow City") +
  scale_y_continuous(labels = function(x) format(x, big.mark = ",", scientific = FALSE)) +
  theme_light() +
  theme(axis.text.x = element_text(angle = 45, hjust = 1))

Installation

if (isFALSE("remotes" %in% rownames(installed.packages()))) {
  install.packages("remotes")
}
remotes::install_github(repo = "konradzdeb/SmarterScotland", build_vignettes = TRUE,
                        dependencies = TRUE)

Similar projects

  • SmarterPoland
  • Eurostat

Links

  • Browse source code at
    https://​github.com/​konradzdeb/​SmarterScotland

License

  • Full license
  • GPL-3

Developers

  • Konrad Zdeb
    Author, maintainer ORCID

Dev status

  • Lifecycle: experimental
  • Build Status
  • codecov
  • Build status
  • license
  • develVersion
  • CRAN status

Developed by Konrad Zdeb.

Site built with pkgdown 1.3.0.