get_ggmap_from_df {activatr} | R Documentation |
Get a map for a given act_tbl
Description
get_ggmap_from_df
takes an act_tbl
object, computes the
correct zoom and center for that activity, then returns a ggmap
object for
that zoom and center.
Usage
get_ggmap_from_df(df, ...)
Arguments
df |
An |
... |
Additional arguments forwarded to |
Details
Note that since this calls ggmap::get_googlemap()
, you must have
previously called ggmap::register_google()
to register an API key.
Value
A ggmap object, the result of calling ggmap::get_googlemap()
,
with the correct center and size to include the entire activity
represented by the act_tbl
.
See Also
ggmap::get_googlemap()
Examples
## Not run:
example_gpx_file <- system.file(
"extdata",
"running_example.gpx.gz",
package = "activatr"
)
act_tbl <- parse_gpx(example_gpx_file)
ggmap::ggmap(get_ggmap_from_df(act_tbl))
## End(Not run)
[Package activatr version 0.2.1 Index]