meltt_inspect: Returns flagged event-to-episode matches for review.

View source: R/meltt_inspect.R

meltt_inspectR Documentation

Returns flagged event-to-episode matches for review.

Description

meltt.inspect returns all episode entries that were flagged to match to an event. Function provides a list containing each flagged event and episode to ease comparison and assessment. All flagged entries should be manually reviewed to determine the validity of the match.

If an flagged event-to-episode is determined to be a match, the duplicate can be removed by providing a Boolean vector to the confirmed_matches argument. All TRUE episodes will be removed as duplicates, retaining only the event entry.

Usage

meltt_inspect(object, columns = NULL, confirmed_matches = NULL)

Arguments

object

object of class meltt.

columns

string vector referencing column names located in the input data. Default is to return all location, time stamp, and taxonomy columns the data was evaluated on.

confirmed_matches

boolean vector specifying entries to be removed from deduplicated set. Function returns a data.frame of unique, deduplicated entries when specified.

Details

meltt_inspect returns all episode entries that were flagged to match to an event. Function provides a list containing each flagged event and episode for easy comparison. Matching event-to-episodes can be cleaned by specifying a boolean vector where TRUE identifies that entry as a duplicate, otherwise FALSE

Value

Returns a list object where each entry in the list contains information on the event and the flagged episode for manual assessment of the match. The information by which the entries are evaluated are specified by the columns argument. If columns = NULL,location, time stamp, and taxonomy information is reported.

Events and episodes confirmed as duplicate entries can be removed by providing a boolean vector to the confirmed_matches argument. A data.frame of unique entries (similar to the output of meltt_data) will be returned.

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, meltt_data, meltt_duplicates

Examples


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

flagged = meltt_inspect(output)
flagged

retain = c(TRUE,TRUE,TRUE,TRUE,TRUE)
dataset = meltt_inspect(output, confirmed_matches = retain)
head(dataset)


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