Skip to content

Invoking doodl

From the command line

The doodl program, called from a command line interpreter like bash, is what you would use for any of these use cases:

  • Format and display a Markdown document, including interactive visualizations, in a Web browser.

  • Format and save a copy of a formatted document in a form that can be transfered by email and displayed on another computer. The output format can include HTML, PDF, Microsoft Word, or any other format that Pandoc knows. Pandoc has a comprehensive list of output formats.

The command line arguments to doodl include:

ShortLongValueDescription
-c--chartfileAdd a custom chart to doodl.
-f--filterfilterAdd a filter to be passed to pandoc.
-h--helpPrint this message.
-o--outputfileFile to which to store HTML document
-p--plotShort cut for adding the pandoc-plot filter
-s--serverRun doodl in server mode.
-t--titletitleTitle for generated HTML document
-v--verboseIncrease debugging output. May be repeated.
-z--zipfileUse zip to write the output directory to file.
-P--portThe port to use in the url. Defaults to 7300.
--formatformatGenerate a file in this format.

From a notebook

The first thing to note is that doodl must be installed in the same Python instance that your notebook is using. This can be non-obvious if you're running jupyter in its own virtual environment. Here's an example of doing so:

python
#! ~/myvenv/bin/pip install doodl
import doodl
doodl.chord(
  data={
    'chords': [
      [11975,  5871, 8916, 2868],
      [ 1951, 10048, 2060, 6171],
      [ 8010, 16145, 8090, 8045],
      [ 1013,   990,  940, 6907]
    ],
    'labels': [
      "black", "blond", "brunette", "redhead"
    ]
  },
  width=350,
  height=350,
  colors=["black", "#ffdd89", "#957244", "#f26223"]
)

or, if you like:

python
#! ~/myvenv/bin/pip install doodl
import doodl
import pandas as pd

df = pd.DataFrame(
  [
    [11975,  5871, 8916, 2868],
    [ 1951, 10048, 2060, 6171],
    [ 8010, 16145, 8090, 8045],
    [ 1013,   990,  940, 6907]
  ]
)

doodl.chord(
  data=df,
  labels=[
    "black", "blond", "brunette", "redhead"
  ],
  width=350,
  height=350,
  colors=["black", "#ffdd89", "#957244", "#f26223"]
)

You should see the visualization that you have requested in the next block.

Released under the MIT License. | Privacy Policy