Information for outlets near a given location
outlets_nearby( latitude, longitude, max_distance = NULL, max_results = 30, user_id = determine_user_id(), api_key = determine_api_key() )
latitude | Numeric. Latitude in decimal degrees. For example, Flinders Street Station is at approximately -37.8183 latitude. |
---|---|
longitude | Numeric. Longitude in decimal degrees. For example, Flinders Street Station is at approximately 144.9671 longitude. |
max_distance | Integer. Optionally filter by maximum distance from the given location, in metres. |
max_results | Integer. Defaults to 30. Caps the number of results returned. |
user_id | Integer or character. A user ID or devid provided by Public
Transport Victoria. Refer to |
api_key | Character. An API key, with dashes, provided by Public
Transport Victoria. Refer to |
A tibble with the following columns:
outlet_slid_spid
outlet_name
outlet_business
outlet_latitude
outlet_longitude
outlet_suburb
outlet_postcode
outlet_business_hour_mon
outlet_business_hour_tue
outlet_business_hour_wed
outlet_business_hour_thu
outlet_business_hour_fri
outlet_business_hour_sat
outlet_business_hour_sun
outlet_notes
The outlet_name
reported here is more accurately described as an outlet
address. We keep the outlet_name
column name as this is how the PTV API
describes it.
The business hours are reported as characters. Usually they take on a format of "8.00AM - 10.00PM", but there variants such as "7.30AM - 11.00AM and 1.30PM - 6.00PM". For days on which an outlet is closed, the opening hours are usually reported as "CLOSED", but can also be an empty character. Some opening hours are "24 Hours". These fields are also filled with missing values and empty characters.
if (FALSE) { outlets_nearby(latitude = -37.8183, longitude = 144.9671) }