get_events: Scrape the number of advertised events in Bath for each day

Description Usage Arguments Value Examples

Description

Web scraping function to retrieve the number of events advertised at http://www.bath.co.uk/events for each day in a specified range of months.

Note: Have a look at this package's GitHub repo - in particular, here - to see the code for this function, along with comments which explain the process followed. See get_rugby for a similar function with more detailed commentary!

Usage

1
get_events(from, to)

Arguments

from

A date or date-time object, or YYYY-MM-DD string: the first day from which to get an event count.

to

A date or date-time object, or YYYY-MM-DD string: the last day from which to get an event count.

Value

A data frame of daily event counts for each day in the specified range.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
# Return daily event counts from 01 Oct 2014 to 17 Jul 2015
events <- get_events("2014-10-01", "2015-07-17")

# Return daily event counts for all months in date range of parking records
raw_data <- get_all_crude()
df <- refine(raw_data)

events <- get_events(min(df$LastUpdate), max(df$LastUpdate))

## End(Not run)

owenjonesuob/BANEScarparking documentation built on April 21, 2020, 10:15 a.m.