getTweet: Get Tweeter Data

Description Usage Arguments Value Examples

View source: R/get_timeseries.R

Description

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

Usage

1
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

1
2
3
4
5
6
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)

claudia-codeco/AlertTools documentation built on Aug. 12, 2021, 9:58 a.m.