Filter polls based on k most recent by state or since a set date.

polls_filter(polls, method = "last_k", k = 5, since = today() - weeks(4))

Arguments

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`).