Title: | API to Melbourne Pedestrian Data |
---|---|
Description: | Provides API to Melbourne pedestrian and weather data <https://data.melbourne.vic.gov.au> in tidy data form. |
Authors: | Earo Wang [aut, cre] , Stuart Lee [aut] |
Maintainer: | Earo Wang <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.5.7 |
Built: | 2024-11-04 04:49:58 UTC |
Source: | https://github.com/earowang/rwalkr |
Provides a GUI to download data of selected sensors over a specified period as a CSV file, accompanied with basic visualisation.
melb_shine()
melb_shine()
It offers some basic plots to give a glimpse of the data over a
short time period. In order to be reproducible, scripting using melb_walk
or melb_walk_fast
is recommended.
A shiny app.
Provides API using compedapi to Melbourne pedestrian data in a tidy data form.
melb_walk(from = to - 6L, to = Sys.Date() - 1L, na.rm = FALSE, session = NULL)
melb_walk(from = to - 6L, to = Sys.Date() - 1L, na.rm = FALSE, session = NULL)
from |
Starting date. |
to |
Ending date. |
na.rm |
Logical. |
session |
|
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.
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
## Not run: # Retrieve last week data melb_walk() # Retrieve data of a speficied period start_date <- as.Date("2017-07-01") end_date <- start_date + 6L melb_walk(from = start_date, to = end_date) ## End(Not run)
## Not run: # Retrieve last week data melb_walk() # Retrieve data of a speficied period start_date <- as.Date("2017-07-01") end_date <- start_date + 6L melb_walk(from = start_date, to = end_date) ## End(Not run)
API using Socrata to Melbourne pedestrian data with directions (per minute)
melb_walk_directional(app_token = NULL)
melb_walk_directional(app_token = NULL)
app_token |
Characters giving the application token. A limited number of
requests can be made without an app token ( |
It provides the API using Socrata, to access minute by minute directional pedestrian counts for the last hour from pedestrian sensor devices located across the city. The data is updated every 15 minutes.
Columns sensor_id
, direction_1
, and direction_2
can be used to join
the data with the Sensor Locations dataset which details the location, status,
and directional readings of sensors, which can be obtained from pull_sensor()
.
A tibble including these variables as follows:
sensor_id
: Sensor name
date_time
: Date time when the pedestrian counts are recorded
date
: Date associated with date_time
time
: Time of day
direction_1
: Direction 1 sensor reading (count of pedestrians)
direction_2
: Direction 2 sensor reading (count of pedestrians)
total_of_directions
: Total sensor reading i.e. direction 1+2 (count of pedestrians)
## Not run: melb_walk_directional() ## End(Not run)
## Not run: melb_walk_directional() ## End(Not run)
API using Socrata to Melbourne pedestrian data (per hour)
melb_walk_fast(year = NULL, sensor = NULL, na.rm = FALSE, app_token = NULL)
melb_walk_fast(year = NULL, sensor = NULL, na.rm = FALSE, app_token = NULL)
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 pull_sensor to see the available sensors. |
na.rm |
Logical. |
app_token |
Characters giving the application token. A limited number of
requests can be made without an app token ( |
It provides the 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.
A tibble including these variables as follows:
Sensor
: Sensor name
Date_Time
: Date time when the pedestrian counts are recorded
Date
: Date associated with Date_Time
Time
: Time of day
Count
: Hourly counts
## Not run: # Retrieve the year 2017 melb_walk_fast(year = 2017) # Retrieve the year 2017 for Southern Cross Station melb_walk_fast(year = 2017, sensor = "Southern Cross Station") ## End(Not run)
## Not run: # Retrieve the year 2017 melb_walk_fast(year = 2017) # Retrieve the year 2017 for Southern Cross Station melb_walk_fast(year = 2017, sensor = "Southern Cross Station") ## End(Not run)
API to access Melbourne microclimate sensor data
melb_weather( from = to - 6L, to = Sys.Date(), site = NULL, sensor_type = NULL, app_token = NULL )
melb_weather( from = to - 6L, to = Sys.Date(), site = NULL, sensor_type = NULL, app_token = NULL )
from |
Starting date. Earliest measurement is 2019-11-15 |
to |
Ending date. |
site |
The site identifier. By default will pull in all locations that have weather sensors |
sensor_type |
The type of microclimate measurement to extract see |
app_token |
Characters giving the application token. A limited number of
requests can be made without an app token ( |
It provides the API using Socrata, where microclimate measurements are updated on a dailly basis. For data documentation, including a data dictionary see the Melbourne Open Data Portal. Please refer to Melbourne Open Data Portal for more details about the dataset and its policy.
A tibble including these variables as follows:
site
: Site identifier, this is the location of the weather sensor
date_time
: Date time when the measurement was recorded
date
: Date associated with date_time
sensor_type
: The type of microclimate sensor reading
units
: The units that value
is in
value
: The value of the reading
melb_walk, pull_weather_sensors, pull_weather_types
## Not run: # Retrieve the last weeks data melb_weather() # Retrieve the last week but for a single location (Pelham St, Carlton) melb_weather(site = "arc1047") # Retrieve the last week but only ambient air temperature melb_weather(sensor_type = "TPH.TEMP") ## End(Not run)
## Not run: # Retrieve the last weeks data melb_weather() # Retrieve the last week but for a single location (Pelham St, Carlton) melb_weather(site = "arc1047") # Retrieve the last week but only ambient air temperature melb_weather(sensor_type = "TPH.TEMP") ## End(Not run)
Provides API using Socrata to Melbourne pedestrian sensor locations.
pull_sensor(app_token = NULL)
pull_sensor(app_token = NULL)
app_token |
Characters giving the application token. A limited number of
requests can be made without an app token ( |
It provides API using Socrata.
## Not run: pull_sensor() ## End(Not run)
## Not run: pull_sensor() ## End(Not run)
API using Socrata to extract Melbourne microclimate sensor locations
pull_weather_sensors(app_token = NULL)
pull_weather_sensors(app_token = NULL)
app_token |
Characters giving the application token. A limited number of
requests can be made without an app token ( |
Extract all available climate sensor types and their identifiers Socrata.
## Not run: pull_weather_types() ## End(Not run)
## Not run: pull_weather_types() ## End(Not run)
API using Socrata to Melbourne microclimate measurement types
pull_weather_types(app_token = NULL)
pull_weather_types(app_token = NULL)
app_token |
Characters giving the application token. A limited number of
requests can be made without an app token ( |
Extract all available climate sensor types and their identifiers Socrata.
## Not run: pull_weather_types() ## End(Not run)
## Not run: pull_weather_types() ## End(Not run)