Learn R Programming

PolitwoopsR

[Update 01/16] Good news: the Politwoops project is back! Twitter has reversed its decision and will restore the API access for the purpos of collecting deleted political tweets. For more information, read a NYT article on this.

[Update 08/28/15] Unfortunately, Twitter has shut down the Politwoops project - both in the US and internationally. This package can presently only help you extract historic content.

[Update 04/07/15] If you were brought here by a Dean Richards Twitter bot, read this.

Extract deleted tweet and politician data from the Politwoops project. Politwoops is an international project that tracks politicians on Twitter and records their deleted tweets. The project started in the Netherlands and spread to dozens of other countries. In the US, it is run by the Sunlight Foundation.

The PolitwoopsR package includes functions that extract tweet data from any most Politwoops projects. It also provides a way to scrape politician data from the US Politwoops project.

NOTE: The package has been tested mostly on the US project. I will be updating it to make sure it runs smoothly for other countries, but for now there might be bugs in cases where the URL or json data structure are formed in an unusual way.

To install the package, you need devtools:

Some visualizations based on politwoops data are available here.

Copy Link

Version

Version

1.0

License

GPL-2

Maintainer

Katherine Ognyanova

Last Published

February 15th, 2017

Functions in PolitwoopsR (1.0)

url_domain

Get domains from URLs
get_pw_pol

Get politician data from the US Politwoops project
clean_text

Clean tweet text
PolitwoopsR

Download Deleted Political Tweets From The Politwoops Project
url_expand

Expand shortened URLs in tweets
get_pw_tweets

Get deleted politician tweet data from the Politwoops project
merge_pw

Merge tweet and politician data