Filter polls based on k most recent by state or since a set date.
1 | polls_filter(polls, method = "last_k", k = 5, since = today() - weeks(4))
|
polls |
data frame of polling results as returned by 'fivethirtyeight_update“ |
method |
which method do we use to include polls: "last_k" includes the last 'k' polls, "since" includes polls as specified in 'since'. |
k |
include k most recent polls |
since |
date after which polls to include (based on 'date' or 'end_date'). |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.