Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
jienkles
Regular Visitor

Trying to load google trends package through R script

Hi There
Ive tried to load google trends package through R in power bi and receive this error.
Any help will be appreciated. thanks
dean

Details: "ADO.NET: R script error.
Creating a generic function for 'toJSON' from package 'jsonlite' in package 'googleVis'
Error: No connection object has been created. Use 'gconnect()' first.
Execution halted

3 REPLIES 3
Anonymous
Not applicable

Hi @jienkles,

 

It seems like you need to sign in your account to enable google trends package, please refer to below link to know how to use it:

Download and plot Google Trends data with R

library(gtrendsR)
usr <- "<Google account email>"
psw <- "<Google account password>"
gconnect(usr, psw) 
lang_trend <- gtrends(c("data is", "data are"), res="week")
plot(lang_trend)

 

Regards,

Xiaoxin Sheng

Hi @Anonymous

Initially i was on the wrong R package which didnt habe the option of google connect /jsonlite etc. then i changed it to the correct cran package and corrected my directory but then ggot an error message and googled it and it said on the google trends read me that this option was not available for google trends.  ie. (Due to recent changes to Google Trends API, the CRAN version of the package is no longer working. If you wan to continue to query Google Trends, you have to install the development version of the package. This will be soon deployed on CRAN). and that i should download the developer version. Once i did that i have the sam problem the above error message and gconnect not available. 

 

many thanks

 

dean

Anonymous
Not applicable

HI @jienkles,

 

I'd like to suggest you to contact to google support team to report this issue.

 

Regards,
Xiaoxin Sheng

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors