get_pw_tweets: Get deleted politician tweet data from the Politwoops project

Description Usage Arguments Value Author(s) See Also Examples

View source: R/Pw_Functions.R

Description

This function downloads and combines json files from any of the countries participating in the Politwoops project (defaults to the US).

Usage

1
2
get_pw_tweets(start.page = 1, end.page = "all", domain = NULL,
  json.ext = NULL)

Arguments

start.page

The first json page to get - defaults to page 1.

end.page

The last json page to get - defaults to the last available page.

domain

The domain for the politwoops project of interest (do not include "http://"). Defaults to the US domain (politwoops.sunlightfoundation.com). For a list of other countries, see http://politwoops.com/countries.

json.ext

The last part of the URL that points to the country JSON pages - defaults to "/index.json?page=" which seems to be correct for some countris (including the US and UK) but not others. Future versions of this package will automate identifying this extension.

Value

Data frame with deleted tweet information from Politwoops.

Author(s)

Katya Ognyanova rstats@ognyanova.net

See Also

get_pw_pol merge_pw

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 

# Get all the US Politwoops tweets:
tweet.df <- get_pw_tweets()

# Get the first 5 pages from the UK Politwoops tweets:
tweet.df <- get_pw_tweets(1, 5, "politwoops.co.uk")

# Get the first 5 pages from Argentina's Politwoops tweets:
tweet.df <- get_pw_tweets(1, 5, "www.politwoops.com/g/Argentina", ".json?page=")


## End(Not run)

kateto/PolitwoopsR documentation built on May 20, 2019, 7:41 a.m.