newsflash
newsflash copied to clipboard
Difficulty passing date restrictions to query_tv
Fantastic package, but I'm missing something silly in passing date restrictions to the query_tv()
function. For instance
library(newsflash)
library(tidyverse)
q1 <- query_tv(
"election",
start_date = "2015-01-01" %>%
as.Date,
end_date = "2015-01-31" %>%
as.Date
)
returns
qtv1$timeline %>% head
# A tibble: 6 x 5
date_start date_end date_resolution station value
<dttm> <dttm> <chr> <chr> <int>
1 2009-07-02 2009-07-02 23:59:59 day Bloomberg 0
2 2009-07-02 2009-07-02 23:59:59 day CNBC 1
3 2009-07-02 2009-07-02 23:59:59 day CNN 1
4 2009-07-02 2009-07-02 23:59:59 day FOX Business 0
5 2009-07-02 2009-07-02 23:59:59 day FOX News 0
6 2009-07-02 2009-07-02 23:59:59 day MSNBC 0
How do I use temporal restrictions on search?
Use timespan = "custom"
. By default, timespan
is set to "all"
which causes the temporal ranges to be ignored.
I need to make that better in the docs (tho their API is also less than stellar)
Awesome, thanks!
On Tue, Sep 26, 2017 at 5:15 PM, boB Rudis [email protected] wrote:
I need to make that better in the docs (tho their API is also less than stellar)
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/hrbrmstr/newsflash/issues/9#issuecomment-332338616, or mute the thread https://github.com/notifications/unsubscribe-auth/ABWyx71JR4AIzT_f-iyS_lLem9G_16Dkks5smWmKgaJpZM4PkhaB .