epitweetr Dashboard"

regions <- get_country_items()
countries <- Reduce(function(l1, l2) {unique(c(l1, l2))}, lapply(as.integer(params$countries), function(i) unlist(regions[[i]]$codes)))
region_names <- lapply(as.integer(params$countries), function(i) regions[[i]]$name)

epitweetr dashboard

Parameters

Line chart

line_chart_from_filters(
  params$topics, 
  params$countries, 
  params$period_type, 
  params$period, 
  params$with_retweets, 
  params$location_type, 
  params$alert_alpha, 
  params$alert_alpha_outlier, 
  params$alert_k_decay, 
  params$alert_historic,
  params$bonferroni_correction,
  params$same_weekday_baseline
  )$chart

Map

map_chart_from_filters(
  params$topics, 
  params$countries, 
  params$period, 
  params$with_retweets, 
  params$location_type
  )$chart

Top r params$top_type1 chart

top_chart_from_filters(
  params$topics,
  params$top_type1,
  params$countries, 
  params$period, 
  params$with_retweets, 
  params$location_type,
  20
  )$chart

Top r params$top_type2 chart

top_chart_from_filters(
  params$topics,
  params$top_type2,
  params$countries, 
  params$period, 
  params$with_retweets, 
  params$location_type,
  20
  )$chart

Top URLS

r paste("Top URLS of tweets mentioning", params$topic, "from", params$periond[[1]], "to", params$period[[2]])

df <- top_chart_from_filters(
    params$topics,
    "urls",
    params$countries, 
    params$period, 
    params$with_retweets, 
    params$location_type,
    50
    )$data
if(is.data.frame(df)) { 
  knitr::kable(df)
} else
  "No data found for the selected filters"

Top urls table only considers tweet location, ignoring the location type parameter

r ""



Try the epitweetr package in your browser

Any scripts or data that you put into this service are public.

epitweetr documentation built on Nov. 16, 2023, 5:07 p.m.