plot_locations {WhatsR} | R Documentation |
Plotting locations sent in 'WhatsApp' chat logs on maps
Description
Plots the location data that is sent in the 'WhatsApp' chatlog on an auto-scaled map. Requires unanonymized 'Location' column in data
Usage
plot_locations(
data,
names = "all",
starttime = "1960-01-01 00:00",
endtime = "2200-01-01 00:00",
mapzoom = 5,
return_data = FALSE,
jitter_value = 0.01,
jitter_seed = 123,
map_leeway = 0.1,
exclude_sm = FALSE,
API_key = "fbb7105f-27c1-49a0-96f8-926dfddcae32",
map_type = "alidade_smooth"
)
Arguments
data |
A 'WhatsApp' chatlog that was parsed with |
names |
A vector of author names that the plots will be restricted to. |
starttime |
Datetime that is used as the minimum boundary for exclusion. Is parsed with |
endtime |
Datetime that is used as the maximum boundary for exclusion. Is parsed with |
mapzoom |
Value for zoom into the map passed down to |
return_data |
If TRUE, returns a data frame of LatLon coordinates extracted from the chat for more elaborate plotting. Default is FALSE. |
jitter_value |
Amount of random jitter to add to the geolocations to hide exact locations. Default value is 0.01. Can be NA for exact locations. |
jitter_seed |
Seed for adding random jitter to coordinates. Passed to |
map_leeway |
Adds additional space to the map so that points do not sit exactly at the border of the plot. Default value is 5. |
exclude_sm |
If TRUE, excludes the 'WhatsApp' system messages from the descriptive statistics. Default is FALSE. |
API_key |
API key for |
map_type |
Type of map to be used. Passed down to |
Value
Plots for geolocation and/or a data frame of latitude and longitude coordinates
Examples
data <- readRDS(system.file("ParsedWhatsAppChat.rds", package = "WhatsR"))
plot_locations(data, mapzoom = 10)