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

dates not pulling #6

Open
glquinn opened this issue Aug 18, 2019 · 0 comments
Open

dates not pulling #6

glquinn opened this issue Aug 18, 2019 · 0 comments

Comments

@glquinn
Copy link

glquinn commented Aug 18, 2019

hi I am trying to pull some brandwatch mentions data with this package and everything seems to be working fine except in the data column a lot of values are coming up as NA. here is my code:

library(brandwatchR)
library(dplyr)
library(xlsx)

setwd("")

bwr_auth(un = "",
pw = "",
refresh = FALSE,
cache = FALSE)

View(bwr_cat_get(
project_id =
))

my_projects <- bwr_projects_get()
head(my_projects)

my_mentions1 <- bwr_mentions_get(
project_id = ,
query_id = ,
date_range = c("2019-04-01", "2019-08-12"))

my_mentions2 <- bwr_mentions_get(
project_id = ,
query_id = ,
date_range = c("2019-03-01", "2019-04-01"))

my_mentions3 <- bwr_mentions_get(
project_id = ,
query_id = ,
date_range = c("2019-01-20", "2019-03-01"))

my_mentions4 <- bwr_mentions_get(
project_id = ,
query_id = ,
date_range = c("2019-01-18", "2019-01-20"))

my_mentions5 <- bwr_mentions_get(
project_id = ,
query_id = ,
date_range = c("2019-01-17", "2019-01-18"))

my_mentions6 <- bwr_mentions_get(
project_id = ,
query_id = ,
date_range = c("2018-10-1", "2019-01-12"))

glimpse(my_mentions1)

library(dplyr)
my_mentions1 <- my_mentions1 %>%
as_tibble %>%
select(date, sentiment, categories)

my_mentions2 <- my_mentions2 %>%
as_tibble %>%
select(date, sentiment, categories)

my_mentions3 <- my_mentions3 %>%
as_tibble %>%
select(date, sentiment, categories)

my_mentions4 <- my_mentions4 %>%
as_tibble %>%
select(date, sentiment, categories)

my_mentions5 <- my_mentions5 %>%
as_tibble %>%
select(date, sentiment, categories)

my_mentions6 <- my_mentions6 %>%
as_tibble %>%
select(date, sentiment, categories)

my_mentions <- bind_rows(my_mentions1, my_mentions2, my_mentions3, my_mentions4, my_mentions5, my_mentions6)

write.csv(as.matrix(my_mentions), "mentions.csv")

(I have removed project/ query ID and name and password/ setwd)

The resulting CSV is a file with some dates, but most of them are filled with NA.

Any help would be really appreciated!

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

1 participant