gpt4 book ai didi

html - gtrends 错误版本 2 : Error in interest_over_time(widget, comparison_item, tz) : Status code was not 200. 返回状态码:401

转载 作者:行者123 更新时间:2023-12-05 05:40:05 28 4
gpt4 key购买 nike

我一直在尝试从 Gtrends 中提取 Covid 数据,但出现以下错误:

我在 R 中使用 grendsR 包。

# google search for covid (week started XX - SUN): https://trends.google.com/trends/explore?geo=US-HI&q=covid
search_covid <- gtrends(keyword = 'covid', geo = 'US-HI', time = 'today+5-y') %>%
pluck("interest_over_time") %>%
as_tibble() %>%
select(date, hits) %>%
rename(search_covid = hits) %>%
mutate(date = ymd(date) + days(1),
search_covid = as.numeric(search_covid %>% ifelse(. == '<1', 0, .)))
search_covid %>% ts_plot()
search_covid %>% tail()

我收到此错误:interest_over_time(widget, comparison_item, tz) 错误:状态码不是200,返回状态码:401

如有任何帮助,我们将不胜感激。

最佳答案

将 gtrendsR 包重新加载到较新的版本似乎已经解决了这个问题:

install.packages("readr")
install.packages("colorspace")
install.packages("vctrs")
install.packages("gtrendsR")

从这里找到的解决方案:How to load google trends package in R

关于html - gtrends 错误版本 2 : Error in interest_over_time(widget, comparison_item, tz) : Status code was not 200. 返回状态码:401,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72496826/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com