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

run_melb(year = NULL, sensor = NULL, tz = "", na.rm = FALSE,
  app_token = NULL)

Arguments

year

An integer or a vector of integers. By default, it's the current year.

sensor

Sensor names. By default, it pulls all the sensors. Use lookup_sensor to see the available sensors.

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.

app_token

Characters giving the application token. A limited number of requests can be made without an app token (NULL), but they are subject to much lower throttling limits than request that do include one. Sign up for an app token here.

Value

A data frame including these variables as follows:

  • Sensor: Sensor name (45 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 Socrata, where counts are uploaded on a monthly basis. The up-to-date data would be till the previous month. 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

walk_melb

Examples

# NOT RUN {
  # Retrieve the year 2017
  ped_df17 <- run_melb(year = 2017)
  head(ped_df17)

  # Retrieve the year 2017 for Southern Cross Station
  sx_df17 <- run_melb(year = 2017, sensor = "Southern Cross Station")
  head(sx_df17)
# }