Streaming live at 10am (PST)

Embedded R HTMLwidgets


#1

Hey all! I’m trying to embed an HTMLwidget exported from R (the statistical package). The R package exports as a complete HTML page including embedded scripts, etc. I can load the html document in my browser as a standalone page, so that part works fine.

To import the graphs into Webflow I am trying to use an include HTML call a la W3 schools, since the code is over 10k characters. I can call a test html page from Dropbox using the following link (https://dl.dropboxusercontent.com/s/4d8s7okrubindh5/test.html?dl=0). However, when I call the HTML widget nothing is displayed in the staging website (https://dl.dropboxusercontent.com/s/zla35fp2h3xa5dx/network.html?dl=0). Any idea how to get these graphs to display?


#2

I don’t think you can perform ajax cors using dropbox. Use the tutorial on “How to host files on Github” in the tips and tricks category.


#4

I tried as you suggested and although that worked well for the test page, the network page still wouldn’t load.

Do you think it could have to do with the way Webflow loads the pages?


#5

I fixed it! The problem is that R exports all the scripts as base-64 javascript and I couldn’t figure out how to call this correctly. Decoding the graph fixes it.


#6

@scienceducky, I am trying to do the same thing (embed htmlwidgets from R) – How did you decode the graph/ insert the decoded version?