geo_marker_plot
can be used to create the following kinds of charts:
Geo marker plots contain markers that highlight important geographic positions, the markers may differ in colour but do not use size as a channel for communicating data. For charts where geographic positions should be represented as circles of differing sizes, refer to geo_bubble_chart
instead.
library(oidnChaRts)
This vignette covers the use of geo lines plots for visualising data with a variety of htmlwidget libraries, for demonstration purposes we use the following dataset generated from https://doi.org/10.6084/m9.figshare.4516772.
head(data_geo_lines_plot)
Geo lines plot is used to visualise journies between geolocations, specifically a directed relationship between point A and B (i.e. there is no support for multi-legged journies). As all geo lines are directional, the following communication channels are available within the plot:
The geo_lines_plot
determines which locations are both "send" and "receive" locations and labels them appropriately.
At the time of writing (r Sys.Date()
) the only library with good support for geo lines is leaflet
. Additional support for highcharter
is planned in a future release.
The following will create a generic geo bubble chart with leaflet, note that significant work is required to make legends in leaflet charts "active" and you are recommended to build such charts from scratch.
library(leaflet) data_geo_lines_plot %>% geo_lines_plot(library = "leaflet")
Note that this plot automatically includes a popup for termini, providing information about how often the location is listed as a send or/and receive location.
Additional information may easily be added to the geolines via the line.popup
argument:
library(leaflet) data_geo_lines_plot %>% geo_lines_plot(library = "leaflet",line.popup = ~paste(start.location, "to", end.location))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.