getAE_data: getAE_data

View source: R/scrape_AE_data_Eng.R

getAE_dataR Documentation

getAE_data

Description

getAE_data

Usage

getAE_data(update_data = TRUE, directory = file.path("data-raw",
  "sitreps"), url_list = NULL, use_filename_date = FALSE,
  country = "England")

Arguments

update_data

whether to download files afresh from NHS England/Scotland website (TRUE) or use existing downloaded files (FALSE)

directory

directory to find existing downloaded files, and to save new downloads

url_list

list of urls (as strings) for the pages to scrape for data files

use_filename_date

if TRUE, take dates from the Excel file's name, if FALSE, take from the date specified inside the sheet (English data only)

country

the country ("England" or "Scotland") whose NHS A&E data is to be returned

Value

A data frame containing all the A&E data from the NHS England/Scotland website.

Examples

## Not run: 
AE_data <- getAE_data(directory = file.path('nhsAEscraper','sitreps'))
str(AE_data)

## End(Not run)

HorridTom/nhsAEscraper documentation built on April 11, 2024, 1:12 a.m.