Git Product home page Git Product logo

edgebundler's Introduction

Hi there ๐Ÿ‘‹

edgebundler's People

Contributors

colinbrislawn avatar garthtarr avatar jonp-16 avatar timelyportfolio avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

edgebundler's Issues

Specify colour for edges

From an email:

I am trying to assign colors to the edges, using groups and an igraph object; I am being able to make the assignments using the color names, but not with codes in hexadecimal. Is there any possible solution for this?

Flexdashboard compatibility

Hi!
Thank you very much for this amazing package.
However, I noticed that it is not compatible with flexdashboard (to build up serverless dashboards as R markdown).
I tried multiple approaches (this one included without success. The edgebundleR is included in the output (inspecting the html code), but the it is not rendered like other htmlwidgets (such as the ones of echarts and networkD3).

Problem displaying 2x2 matrix

Dear author,

When using a small matrix (2x2) the package displays the vertex but not the node.

screen shot 2018-03-27 at 11 23 47 am

Also, using a big matrix that only contains a a single correlation (aka, 9x9 filled with 0s with a single value) produces the same result (all the nodes but the link it is not displayed).

How I can overcome this situation?

Arrow head between connections

Hi,
I am wondering if I can use lines with arrows between connections, since there are many connections within my plot and it unable to distinguish them, many thanks !

Feature Request: Ordering nodes

Thank you for the great work, garthtarr and timelyportfolio!

I think it may be worth adding an order argument for the nodes. I think it will be a fairly common use case when one will have a lot of groups/classes in their data. Although they can colour these, but even if we have 5 groups of a thousand observations, it becomes difficult to spot patterns in the data.

Adding an order argument will be able to show if certain groups have intra/inter-groups linkage.

max.size argument

@timelyportfolio thanks for the great updates, I've made a couple of changes to ensure that the original examples still work.

I've hit an issue with the json object example where the sizes are specified:

library(edgebundleR)
filepath = system.file("sampleData", "flare-imports.json", package = "edgebundleR")
edgebundle(filepath,width=800,fontsize=8,tension=0.95)

I think a good fix will be to specify the maximum size that an vertex dot can be and rescale the sizes relative to the maximum size.

My javascript is terrible, I could probably work it out given enough time, but maybe you're able to quickly implement a simple fix. My suggested pseudo javascript code is below.

It assumes that the maxsize variable has been passed in through the xin object. My main issue is finding the maximum over a JSON array in javascript (don't mock me, I'm not JSON/javascript native!)

var maxval = Math.max(nodes_g.size)

nodes_g.append("circle")
        .attr("cx", 0)
        .attr("cy", 0)
        .attr("fill", function(d,i){
        if(d.color) return d.color;
        return null;
        })
        .attr("opacity", 1.0)
        .attr("r", function(d,i){
          var size = (d.size) ? d.size : 10;
          return Math.round(Math.pow(size / maxval * xin.maxsize, 1/2));
        });

Feature Request: ID which variable is selected

Hi -

Thanks for making this package! I was trying to tinker with seeing how I could get the ID of the variable selected. Specifically, when you click on a highlighted arc, can we return the underlying data?

Thanks,
Jon

Control edge color and edge width

1.Based on all the articles on edgebundleR, I am yet to find out a way on how to change the color of links based on whether the link is incoming or outgoing. Any help with this would be great. I am looking for something like https://bl.ocks.org/mbostock/7607999

2.Is changing the width of the links possible based on a weight parameter?

Grouping 2 way imports

Probably should add in functionality to identify 2 way imports in a similar manner to this stackoverflow question. This is necessary because the link lines overlap so currently you can only tell if there's a two way interaction or just a one way import by checking if the link colour is the same as the colour of the highlighted node. If they are the same, then it is a one way import.

Time-consuming downloading of dependences

It's time-consuming at my first use of edgebundleR. Because it has numorous reference packages and my program had to spend almost 20 mins to download all of the dependences. May I ask are all of the packages you referred to in the library necessary? It will be more than perfect If you could kindly exclude the redundant ones.

cutoff and node names

@garthtarr I have been trying to figure out a way to remove the node names from which there is no linkage in the graph after setting a cutoff range. When I set a higher cutoff range than an initial range, the node names that don't have a linkage anymore still show up in the graph, making it less readable. I thought this could be a quick fix.

Circle plot can be created in R console, but it does not show up in Shiny app.

Hi.
I am able to create circle plots in R console, but for some unknown reason, I am not able to present the circle plot in my Rshiny app. I even tried to reproduce the "shinyedge" function in my app, but the plot does not show up. The app does not through any error, it just does not show the plot.

here is a piece of my code:

UI side:
tabPanel(title="CirclePlot",value="CP",
fluidRow(
column(3,
sliderInput("tension", "Tension", 0.3,min=0,max=1,step = 0.01),
sliderInput("fontsize","Font size",12,min=6,max=24),
sliderInput("width","Width and height",600,min=200,max=1200),
sliderInput("padding","Padding",100,min=0,max=300),
downloadButton("export",label="Download")),
column(9,
uiOutput("circplot")
)))

Server:

output$circplot <- renderUI({
  edgebundleOutput("eb", width = input$width, height=input$width)
})

output$eb <- renderEdgebundle({
edgebundle(values$spp,tension=input$tension,cutoff=input$cutoff,
fontsize=input$fontsize,padding=input$padding)
})

Selected node by code

Hi, it's a wonderful works, just as needed!
I believe would be useful to get and set the selected node by code, as well as setting another events like click to interact with the graph.

Uncaught TypeError: Cannot read property 'cluster' of undefined

edgebundleR worked fine by itself in my ShinyApp, but I could not display a D3 network generated by networkD3. No error in my ShinyApp, but got the following javascript error in my browser. Apparently there is a conflict between edgebundleR and networkD3. I want to display my network in both on two different tabs. I would greatly appreciate it if you could help me to find a solution!

Uncaught TypeError: Cannot read property 'cluster' of undefined edgebundleR.js:30
at Object.drawGraphic (http://127.0.0.1:6080/edgebundleR-binding-0.1.4/edgebundleR.js:30:29)
at Object.renderValue (http://127.0.0.1:6080/edgebundleR-binding-0.1.4/edgebundleR.js:12:10)
at exports.OutputBinding.shinyBinding.renderValue (http://127.0.0.1:6080/htmlwidgets-0.9/htmlwidgets.js:516:20)
at exports.OutputBinding.onValueChange (http://127.0.0.1:6080/shared/shiny.min.js:4:9871)
at exports.OutputBinding.delegator.(anonymous function) [as onValueChange] (http://127.0.0.1:6080/htmlwidgets-0.9/htmlwidgets.js:112:23)
at OutputBindingAdapter.onValueChange (http://127.0.0.1:6080/shared/shiny.min.js:4:29679)
at ShinyApp.receiveOutput (http://127.0.0.1:6080/shared/shiny.min.js:3:26802)
at ShinyApp. (http://127.0.0.1:6080/shared/shiny.min.js:3:28780)
at ShinyApp._sendMessagesToHandlers (http://127.0.0.1:6080/shared/shiny.min.js:3:28585)
at ShinyApp.dispatchMessage (http://127.0.0.1:6080/shared/shiny.min.js:3:28375)

Adding title/legend

Thanks for the great work! Is there any way to add legend/title to the output?
Specifically I'm looking for adding legend based on color of the node and title in a Shiny app.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.