Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Difficulty passing date restrictions to query_tv #9

Open
thomasjwood opened this issue Sep 26, 2017 · 3 comments
Open

Difficulty passing date restrictions to query_tv #9

thomasjwood opened this issue Sep 26, 2017 · 3 comments

Comments

@thomasjwood
Copy link

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?

@yeedle
Copy link
Contributor

yeedle commented Sep 26, 2017

Use timespan = "custom". By default, timespan is set to "all" which causes the temporal ranges to be ignored.

@hrbrmstr
Copy link
Owner

I need to make that better in the docs (tho their API is also less than stellar)

@thomasjwood
Copy link
Author

thomasjwood commented Sep 27, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants