PlotData: Plotting Tools for Traffic Count Data

Description Usage Arguments Value Author(s) Examples

View source: R/secondaryscripts.R

Description

Motorway Incident Detection and Automatic Signalling (MIDAS) is a sensor based network along UK motorways, and is designed to collect data regarding traffic flows, average speeds and road occupancy, amongst other features, on the road network. This data can be accessed via the MIDAS website https://www.midas-data.org.uk/ (login required) in the form of .tcd.bz2 files.

The function PlotData is designed to make plotting data found using the RoadData more accessible.

Usage

1
PlotData(data, timeRange, n, attributesXName, ...)

Arguments

data

The data that the user wishes to examine.

timeRange

The start and end minute of the data, formatted as "start minute:end minute". These are measured from the start of the dataset. For example, "1:1440" denotes the whole of the first day, whereas "5761:7200" denotes the whole of the fifth day.

n

The plotting 'character' that is plotted on the graph (the same as "pch" in points).

attributesXName

The (quoted) name of the column found in the data that the user wishes to plot on the x-axis. Note that to denote "Time" on the axis, use "" (2 quotation marks) as the value for this argument.

...

Any number of (quoted) names of columns found in the data that the user wishes to plot on the y-axis.

Value

A plot of the requested data.

Author(s)

RAC Foundation, Luke Hudlass-Galley

Examples

1
2
PlotData(trafficData, 1:1440, ".", "", "Average Speed (Lane 1)")
PlotData(roadData2016, 1380:1440, 20, "Average Speed (Lane 2)", "Occupancy (Lane 3)")

RACFoundation/oneminutetrafficdata documentation built on Dec. 2, 2018, 1:14 p.m.