Rmd embedded google trends

Hi,

I'm starting with Rmd and so on and I wanted to embed a graphic from google trend but I have trouble when rendering it in the Rmd file (or with a plain html text). Unfortunately half of the figure is cut... Here is an [example](https://trends.google.com/trends/explore?q=%2Fm%2F02vx4,%2Fm%2F0jm_&date=all&geo=US, the code) of the graph I wanted to add (before making my own with gtrendsR). In order to add the timeseries you have to copy paste the in an html page the following code:

I have try many stuff, wrap it in a div and so on but none of them works so here I am,
Thank you for your feedback and sorry for that question,
Cheers

My guess is that you are viewing the files locally, because when I did, I got the same results.

Here's a link to a demo file that was composed directly in HTML

https://s3-us-west-2.amazonaws.com/tuva/papers/NonRmd.html

And here is the same embed run through RMD

https://s3-us-west-2.amazonaws.com/tuva/papers/RMDRendered.html

They are both as I think you are looking for.

1 Like

You guess was correct! I'm still not sure why locally it doesn't work but anyway thank you very much!
I have to admit that I've lost lots of time with that (shame on me) so thank you again!

1 Like

I only knew because I once burned several hours on a similar problem before it dawned on me that reading a file through a browser is not necessarily the same thing as being served the file as an http client! The advantage in those time sinks is that the lessons are seldom forgotten!:grinning:

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.