Description Usage Arguments Examples
View source: R/create_flowMap_function.R
This function creates a flow map from a dataframe. It will output a .json file in your working directory for you to later push to a specific EarthTime instance.
1 2 3 4 5 6 7 8 9 10 11 | create_flowMap(
dataframe,
origin,
destination,
value_column,
date_column,
projected_coordinate_system = "epsg_3857",
centroids_geojson = "country-centroids.geojson",
centroids_json = "centroids_by_iso_alpha_3.json",
output_dir = getwd()
)
|
dataframe |
Specify the name of the dataframe that you'd like to transform into a dot map .json file. |
origin |
Specify the column name (in quotes) that contains the latitudinal coordinates. |
destination |
Specify the column name (in quotes) that contains the longitudinal coordinates. |
value_column |
Specify the column name (in quotes) that contains the primary value being visualized. |
date_column |
Specify the column name (in quotes) that contains the date category. |
projected_coordinate_system |
A flat, two-dimensional representation of the Earth based on a sphere or spheroid geographic coordinate system, but it uses linear units of measure for coordinates, so that calculations of distance and area are easily done in terms of those same units. Defaults to EPSG:3857 (WGS 84 / Pseudo-Mercator) used for rendering maps in Spherical Mercator, Google Maps, OpenStreetMap, Bing, ArcGIS, ESRI, etc. |
centroids_geojson |
Defaults to "country-centroids.geojson" included with the package. |
centroids_json |
Defaults to "centroids_by_iso_alpha_3.json" included with the package. |
output_dir |
Output director for .json file. Defaults to current working directory. |
1 2 3 4 | ## Not run:
create_flowMap <- function(dataframe, origin, destination, value_column, date_column)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.