README.md

miscOAT

The goal of miscOAT is to provide a testing area for trying out functions that could be useful to put in a package.

Installation

You can install the released version of miscOAT from CRAN with:

(not yet...)

install.packages("miscOAT")

Example

This is a basic example which shows how to use the package to get ONS deaths and population data:

library(miscOAT)

# run the function to get deaths and population data
oatData()

# get total deaths per year
deaths %>% 
  group_by(DeathRegistrationCalendarYear) %>% 
  summarise(n())

# get Powys population for 2018
pop_la %>% 
  filter(yr==2018 & ua_code =="NN") %>% 
  summarise(sum(population))

# geocode some postcodes

postcode_test <- data.frame("postcode" = c("CF10 4BZ", "CH7 1PZ", "SA31 3WY"))

geocode(postcode_test, 12)






public-health-wales-health-intelligence/mapOAT documentation built on Nov. 5, 2019, 1:56 a.m.