mplot: Wrapper to generate an interactive spatial plot of meltt...

View source: R/mplot.R

mplotR Documentation

Wrapper to generate an interactive spatial plot of meltt output data via Leaflet.

Description

mplot provides an interactive javascript map to plot the spatial distribution of duplicate and unique entries in the integrated data.

Usage

mplot(object, matching = FALSE, jitter=.0001)

Arguments

object

object of class meltt.

matching

if TRUE, plot only matching entries (i.e. duplicates and matches), else plot unique and matching entries. Default = FALSE.

jitter

Numeric value to randomly offset longitude and latitude of points for plotting. Useful when points overlap. Default is a small jitter of .0001 degrees.

Details

mplot generates a spatial map using javascript via the Leaflet package. The map identifies unique and duplicative (i.e. entries with "matches") entries. The function provides a concise summary of the integration output across the spatial bounds of the geo-referenced input data. Plot renders in the users viewer pane (if using RStudio) or in browser. Images of the map can be saved using the export button.

Value

Returns a javascript map, which renders in the user's viewer pane, of all unique event locations (or duplicate and matching entries if matching= argument is true). Each unique event are denoted as orange circles, matching entries as blue circles, and duplicate entries as green entries.

Author(s)

Karsten Donnay and Eric Dunford.

References

Karsten Donnay, Eric T. Dunford, Erin C. McGrath, David Backer, David E. Cunningham. (2018). "Integrating Conflict Event Data." Journal of Conflict Resolution.

See Also

meltt, tplot

Examples


data(crashMD)
output = meltt(crash_data1, crash_data2, crash_data3,
                taxonomies = crash_taxonomies, twindow = 1,spatwindow = 3)

mplot(output)


css-konstanz/meltt documentation built on Nov. 5, 2022, 11:32 p.m.