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

Diagram not showing #93

Closed
olgabot opened this issue Feb 25, 2020 · 3 comments
Closed

Diagram not showing #93

olgabot opened this issue Feb 25, 2020 · 3 comments

Comments

@olgabot
Copy link

olgabot commented Feb 25, 2020

No description provided.

@olgabot
Copy link
Author

olgabot commented Feb 25, 2020

Arghgh I wrote a really detailed report and GitHub deleted it!!

@olgabot
Copy link
Author

olgabot commented Feb 25, 2020

Hello,
Thank you for making this package. At this point, I cannot get any of the examples to work in my environment.

Forward-Backward flows

From the forward-backward flows example:

import pandas as pd
from io import StringIO
import floweaver

flows = pd.read_csv(StringIO("""
source,target,type,value
a,b,main,3
b,c,main,4
imports,b,import/export,2
b,exports,import/export,1
"""))

# Set the default size to fit the documentation better.
size = dict(width=570, height=300)

nodes = {
    'a': floweaver.ProcessGroup(['a']),
    'b': floweaver.ProcessGroup(['b']),
    'c': floweaver.ProcessGroup(['c']),
}

bundles = [
    floweaver.Bundle('a', 'b'),
    floweaver.Bundle('b', 'c'),
]

ordering = [
    ['a'],
    ['b'],
    ['c'],
]

sdd = floweaver.SankeyDefinition(nodes, bundles, ordering)

floweaver.weave(sdd, flows).to_json('floweaver-test.json', format='widget')
floweaver.weave(sdd, flows)#.to_widget(**size)
# woven.t

This simply gives the output:

SankeyWidget(layout=Layout(height='300', width='570'), links=[{'source': '__>b^*', 'target': 'b^*', 'type': '*…

Write to json, output to SVG

This gives the same error as others have experienced: #34 (comment)

Screen Shot 2020-02-25 at 9 09 03 AM

Conda environment

Output of conda env export:

name: floweaver
channels:
  - conda-forge
  - bioconda
  - defaults
dependencies:
  - _libgcc_mutex=0.1=conda_forge
  - _openmp_mutex=4.5=1_llvm
  - attrs=19.3.0=py_0
  - backcall=0.1.0=py_0
  - bleach=3.1.1=py_0
  - ca-certificates=2019.11.28=hecc5488_0
  - certifi=2019.11.28=py38_0
  - decorator=4.4.1=py_0
  - defusedxml=0.6.0=py_0
  - entrypoints=0.3=py38_1000
  - floweaver=2.0.0a5=py_0
  - importlib_metadata=1.5.0=py38_0
  - ipykernel=5.1.4=py38h5ca1d4c_0
  - ipysankeywidget=0.3.0=py_0
  - ipython=7.12.0=py38h5ca1d4c_0
  - ipython_genutils=0.2.0=py_1
  - ipywidgets=7.5.1=py_0
  - jedi=0.16.0=py38_0
  - jinja2=2.11.1=py_0
  - jsonschema=3.2.0=py38_0
  - jupyter_client=6.0.0=py_0
  - jupyter_core=4.6.3=py38_0
  - ld_impl_linux-64=2.33.1=h53a641e_8
  - libblas=3.8.0=15_openblas
  - libcblas=3.8.0=15_openblas
  - libffi=3.2.1=he1b5a44_1006
  - libgcc-ng=9.2.0=h24d8f2e_2
  - libgfortran-ng=7.3.0=hdf63c60_5
  - liblapack=3.8.0=15_openblas
  - libopenblas=0.3.8=h5ec1e0e_0
  - libsodium=1.0.17=h516909a_0
  - libstdcxx-ng=9.2.0=hdf63c60_2
  - llvm-openmp=9.0.1=hc9558a2_2
  - markupsafe=1.1.1=py38h516909a_0
  - mistune=0.8.4=py38h516909a_1000
  - nbconvert=5.6.1=py38_0
  - nbformat=5.0.4=py_0
  - ncurses=6.1=hf484d3e_1002
  - networkx=2.3=py_0
  - notebook=6.0.3=py38_0
  - numpy=1.18.1=py38h95a1406_0
  - openssl=1.1.1d=h516909a_0
  - palettable=3.3.0=py_0
  - pandas=1.0.1=py38hb3f55d8_0
  - pandoc=2.9.2=0
  - pandocfilters=1.4.2=py_1
  - parso=0.6.1=py_0
  - pexpect=4.8.0=py38_0
  - pickleshare=0.7.5=py38_1000
  - pip=20.0.2=py_2
  - prometheus_client=0.7.1=py_0
  - prompt_toolkit=3.0.3=py_0
  - ptyprocess=0.6.0=py_1001
  - pygments=2.5.2=py_0
  - pyrsistent=0.15.7=py38h516909a_0
  - python=3.8.1=h357f687_2
  - python-dateutil=2.8.1=py_0
  - pytz=2019.3=py_0
  - pyzmq=19.0.0=py38h1768529_0
  - readline=8.0=hf8c457e_0
  - send2trash=1.5.0=py_0
  - setuptools=45.2.0=py38_0
  - six=1.14.0=py38_0
  - sqlite=3.30.1=hcee41ef_0
  - terminado=0.8.3=py38_0
  - testpath=0.4.4=py_0
  - tk=8.6.10=hed695b0_0
  - tornado=6.0.3=py38h516909a_4
  - traitlets=4.3.3=py38_0
  - wcwidth=0.1.8=py_0
  - webencodings=0.5.1=py_1
  - wheel=0.34.2=py_1
  - widgetsnbextension=3.5.1=py38_0
  - xz=5.2.4=h14c3975_1001
  - zeromq=4.3.2=he1b5a44_2
  - zipp=3.0.0=py_0
  - zlib=1.2.11=h516909a_1006
prefix: /home/olga/miniconda3/envs/floweaver

Let me know if there is anything else I can provide!
Warmest,
Olga

@olgabot
Copy link
Author

olgabot commented Feb 25, 2020

Finally got it working. Turns out my base conda environment (from which I launch Jupyter) also needed to have ipysankeywidget installed, and for jupyter-sankey-widget to be enabled:

Screen Shot 2020-02-25 at 11 04 58 AM

I have a bunch of conda environments that are accessible via nb_conda so I suggest specifying that the jupyter widgets need to be installed in the base environment where jupyter lab is launched from. Thanks!

Screen Shot 2020-02-25 at 11 06 01 AM

@olgabot olgabot closed this as completed Mar 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant