Hello, I am trying to create a simple "plotly" timeseries plot in Insights Desktop. But I am getting a blank output for some reason.
How can I fix this?
Code
library(tidyverse)
library(plotly)
# Import the air temperature dataset to create a plotly plot.
df = read.csv("O:/local_path.csv")
# Plot
month.gg.bwrd_clip = df %>%
#Calculating mean by year
group_by(year) %>%
summarise(tmean = mean(tmean,na.rm = TRUE)) %>%
ggplot(aes(x= year, y=tmean)) +
geom_line(stat = "identity") +
xlab("Year") +
ylab("Average Temperature")
ggplotly(month.gg.bwrd_clip)
Hi @Ed_ ,
I'm not an R person... I wish I was, though! Hopefully someday. 🙂
However, I use Jupyter kernel gateways for Python in Insights.
So with that caveat (i.e., I *don't* have a definitive answer for you) I'm wondering if:
a) the libraries are definitely installed on your connection machine -- I presume they are, because I get the vibe you're an R Guru! :-), but I thought I would check just in case
b) have you installed all of ArcGIS Insights' R and Python dependencies? (Note: the dependencies vary between older versions of Insights and newer ones.)
https://github.com/Esri/insights-scripting-guide/tree/master/gateway
You probably found the next link already, as it sounds like you're pretty far along. It may even be a link that Scott sent you last Friday, so apologies if it is, but here is the guide to setting up scripting environments in ArcGIS Insights.
https://github.com/Esri/insights-scripting-guide
I'm sorry this isn't working for you.
Hopefully it's just a minor issue.
If not... please let us know, and I'll try to replicate the issue and report it as a bug to fix! 🙂
Better yet, hopefully a regular R user pops on here shortly with a solution!
Thanks, @Ed_!
Ian
Good day Ian,
Thank you for the quick response.
No worries, cheers for the help Ian.
I am not sure exactly where it's going wrong for you. I just installed tidyverse and ran a quick example and managed to get a plot. Maybe try this simple example and see if that works for you first?
Good day @LindaBeale ,
Thank you for the response, however, if you look at my code I am using "ggplotly" (you will have to install the "plotly" package for that). Basically, you first store the "ggplot" in an object, and then use that object with "ggplotly".
@LindaBeale actually, since "plotly" interactive plots are not supported by Insights, this post could be considered as an idea to be included as a feature in a near future Insights release.
@Ed_: This is great idea. We'll bring it up with the team for sure. Sorry this feature isn't "quite" there yet for you in this specific case. We'll try to get it there in the future! 🙂
Thanks again for using Insights!
Ian
Hi @Ed_,
Whoops. Hold up... I heard from someone online that this feature exists already. I'm wrong. (More proof I'm not a bot and very human!)
Sorry for the misinformation. I am hopeful someone will help sort this issue out.
Thanks again,
Ian