Description Usage Arguments Value
View source: R/geotimeseries.R
Constructs a GeoTimeseries
object.
1 | GeoTimeseries(x, metrics = character(0), date.format = "%Y-%m-%d")
|
x |
a plain |
metrics |
(character) column names that point to numeric columns. At
least one metric must be specified. All metrics have to be not all
|
date.format |
(string, optional) format of the column |
A GeoTimeseries
object, which is a data.frame
,
with the required columns,
date
: a vector of class Date
.
geo
: a character
-valued vector of Geo IDs.
metrics
: one or more numeric metrics. In addition, optionally
any other user-definable columns. (These are ignored by the specified
methods but may be convenient for the user). Three columns are added,
for convenience:
.weekday
: day number (1=Monday, 2=Tuesday, ..., 7=Sunday)
.weeknum
: week number in the year from 0 to 53.
.weekindex
: absolute index of week, year + weeknum
(e.g., 201542
)
These should be convenient for generating totals and averages, using the
aggregate
method. The columns 'date' and 'geo' form the primary
keys: it is guaranteed that no duplicate ('date', 'geo') pairs exist.
The object includes fields stored in the attribute 'info':
metrics
: names of the metric columns.
other
: names of the other user-supplied columns.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.