Description Author(s) Examples
wethepeople is an R package for working with the White House's We The People petition data.
Yoni Ben-Meshulam yoni@opower.com
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # Load a sample set of petitions and generate some plots:
data(petitions)
some_petitions <- head(petitions, n=5)
plot_issues_over_time(some_petitions)
plot_issues_pending_response(petitions)
plot_wordcloud(some_petitions, 'title')
# Create an API Client:
client <- WeThePeopleAPIClient()
# Load petitions from the live API:
petitions <- client$petitions(limit=2)
# Maye some eye candy:
plot_issues_over_time(petitions)
plot_wordcloud(some_petitions, 'title')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.