Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: SSL certificate problem - Sankey Diagram #276

Open
cebriggs7135 opened this issue Oct 3, 2020 · 2 comments
Open

Error: SSL certificate problem - Sankey Diagram #276

cebriggs7135 opened this issue Oct 3, 2020 · 2 comments

Comments

@cebriggs7135
Copy link

Can you please address this issue?
I've successfully run the sample code from https://rdrr.io/cran/networkD3/f/README.md up to the Sankey Diagram:

Recreate Bostock Sankey diagram: http://bost.ocks.org/mike/sankey/

Load energy projection data

URL <- paste0("https://cdn.rawgit.com/christophergandrud/networkD3/",

  •           "master/JSONdata/energy.json")
    

Energy <- jsonlite::fromJSON(URL)
Error in open.connection(con, "rb") :
SSL certificate problem: certificate has expired

Plot

sankeyNetwork(Links = Energy$links, Nodes = Energy$nodes, Source = "source",

  •           Target = "target", Value = "value", NodeID = "name",
    
  •           units = "TWh", fontSize = 12, nodeWidth = 30)
    

Error in is.factor(Source) : object 'Energy' not found

@cjyetman
Copy link
Collaborator

cjyetman commented Oct 4, 2020

Apparently http://rawgit.com has been shut down. You can access the same dataset directly from this repo at: https://raw.githubusercontent.com/christophergandrud/networkD3/master/JSONdata/energy.json

library(networkD3)
URL <- "https://raw.githubusercontent.com/christophergandrud/networkD3/master/JSONdata/energy.json"
Energy <- jsonlite::fromJSON(URL)
sankeyNetwork(Links = Energy$links, Nodes = Energy$nodes, Source = "source",
              Target = "target", Value = "value", NodeID = "name",
              units = "TWh", fontSize = 12, nodeWidth = 30)

@cebriggs7135
Copy link
Author

Thanks very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants