getTweet: Get Tweeter Data

View source: R/get_timeseries.R

getTweetR Documentation

Get Tweeter Data

Description

Create weekly time series from tweeter data from server. The source of this data is the Observatorio da Dengue (UFMG).

Usage

getTweet(cities, lastday = Sys.Date(), cid10 = "A90", datasource = con)

Arguments

cities

cities's geocode. Use getCidades()

cid10

default is A90 (dengue). If not dengue, returns NA

datasource

Use the connection to the Postgresql server for using project data.

finalday

last day. Default is the last available.

Value

data.frame with weekly counts of people tweeting on dengue.

Examples

NOT USE: con <- dbConnect(RSQLite::SQLite(), "../../AlertaDengueAnalise/mydengue.sqlite")
tw <- getTweet(cities = c(3302205,3200300), lastday = "2014-03-01")
tw <- getTweet(cities = 3304557, finalday = "2016-03-01")
cid <- getCidades(regional = "Norte",uf = "Rio de Janeiro")
tw <- getTweet(cities = cid$municipio_geocodigo) 
tail(tw)

AlertaDengue/AlertTools documentation built on Nov. 27, 2024, 11:55 p.m.