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.


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


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



object of class meltt.


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


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


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.


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.


Karsten Donnay and Eric Dunford.


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


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


meltt documentation built on Oct. 27, 2022, 1:05 a.m.