Provides API using compedapi to Melbourne pedestrian data in a tidy data form.

walk_melb(from = to - 6L, to = Sys.Date() - 1L, tz = "", na.rm = FALSE,
  session = NULL)

Arguments

from

Starting date.

to

Ending date.

tz

Time zone. By default, "" is the current time zone. For this dataset, the local time zone is "Australia/Melbourne" which would be the most appropriate, depending on OS.

na.rm

Logical. FALSE is the default suggesting to include NA in the dataset. TRUE removes the NAs.

session

NULL or "shiny". For internal use only.

Value

A tibble including these variables as follows:

  • Sensor: Sensor name (43 sensors up to date)

  • Date_Time: Date time when the pedestrian counts are recorded

  • Date: Date associated with Date_Time

  • Time: Time of day

  • Count: Hourly counts

Details

It provides API using compedapi, where counts are uploaded on a daily basis. The up-to-date data would be till the previous day. The data is sourced from Melbourne Open Data Portal. Please refer to Melbourne Open Data Portal for more details about the dataset and its policy.

See also

Examples

# NOT RUN {
  # Retrieve last week data
  ped_df1 <- walk_melb()
  head(ped_df1)

  # Retrieve data of a speficied period
  start_date <- as.Date("2017-07-01")
  end_date <- start_date + 6L
  ped_df2 <- walk_melb(from = start_date, to = end_date)
  head(ped_df2)
# }