# Dataflow, a self-hosted Observable Notebook Editor

**URL:** <https://talk.observablehq.com/t/dataflow-a-self-hosted-observable-notebook-editor/5055>\
**Category:** Show and tell\
**Created:** [May 13, 2021, 5:39pm UTC](https://talk.observablehq.com/t/dataflow-a-self-hosted-observable-notebook-editor/5055 "2021-05-13T17:39:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![asg017](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/asg017/32/2159_2.png) [@asg017](https://talk.observablehq.com/u/asg017)\
**Post date:** [May 13, 2021, 5:39pm UTC](https://talk.observablehq.com/t/dataflow-a-self-hosted-observable-notebook-editor/5055/1 "2021-05-13T17:39:37Z")

</div>

yo! Wanted to share something I’ve been working on for a while, [Dataflow](https://github.com/asg017/dataflow), a self-hosted Observable notebook editor. It’s got support for FileAttachments, Secrets, custom standard libraries, importing local files and observablehq notebooks, and integrates with any text editor that you want! Observable notebooks in Dataflow are files on your computer, so it works very well with git.

The project is still pretty young, but feel free to try it out and share your feedback!

> **[Introducing Dataflow, a self-hosted Observable Notebook Editor](https://observablehq.com/@asg017/introducing-dataflow)**
>
> Dataflow is a new tool that lets you run, edit, and compile Observable notebooks locally on your own computer, with any text editor you want! If you have ever wanted to save + run Observable notebooks as files on your computer (for easier integration...

---

<div class="post-metadata">

**Author:** ![vorbei](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/vorbei/32/1000_2.png) [@vorbei](https://talk.observablehq.com/u/vorbei)\
**Post date:** [May 14, 2021, 6:07am UTC](https://talk.observablehq.com/t/dataflow-a-self-hosted-observable-notebook-editor/5055/2 "2021-05-14T06:07:20Z")

</div>

Congrats!

I’ve tried it and it has incredible completeness. Most of things works well, except Arquero’s table view command, like: [Arquero Cookbook / UW Interactive Data Lab / Observable](https://observablehq.com/@uwdata/arquero-cookbook#pivot)

the tables renders as html codes rather than elements in ‘Dataflow’. How to correct it?

---

<div class="post-metadata">

**Author:** ![asg017](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/asg017/32/2159_2.png) [@asg017](https://talk.observablehq.com/u/asg017)\
**Post date:** [May 14, 2021, 4:50pm UTC](https://talk.observablehq.com/t/dataflow-a-self-hosted-observable-notebook-editor/5055/3 "2021-05-14T16:50:40Z")

</div>

thanks for trying it out!

What’s happening here is that `aq` is defined in [this notebook](https://observablehq.com/@uwdata/arquero), where the `.table()` view command is defined in the `toView` cell at the way bottom. But, that notebook uses the old `html` tagged template literal to define how to render the table, and while Dataflow uses the new `html` tagged template from [htl](https://github.com/observablehq/htl) (which is backwards incompatible).

As a workaround, you can fetch the old `html` tagged template and inject it into the import statement like so:

```javascript
// workaround.ojs
oldHTML = new (await require("@observablehq/stdlib")).Library().html()

import { aq, op } with {oldHTML as html} from 'https://observablehq.com/@uwdata/arquero'

aq.table({
    country: ['USA', 'USA', 'Canada', 'Canada'],
    medal: ['gold', 'silver', 'gold', 'silver'],
    count: [10, 20, 7, 26]
  })
  .groupby('country') 
  .pivot('medal', 'count') 
  .view()

```

`dataflow run workaround.ojs`

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/observablehq/original/2X/5/5ca301f8e462570b218c25bd4ac4dcc292c137d2.png)

But a better longterm solution would be to fork and edit that notebook to use the new `htl.html` so it plays better by default with Dataflow. I’ll consider making Dataflow more backwards compatible with notebooks that use the old `html` template as well!

---

<div class="post-metadata">

**Author:** ![gnestor](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/gnestor/32/2679_2.png) [@gnestor](https://talk.observablehq.com/u/gnestor)\
**Post date:** [May 18, 2021, 4:50am UTC](https://talk.observablehq.com/t/dataflow-a-self-hosted-observable-notebook-editor/5055/4 "2021-05-18T04:50:42Z")

</div>

Thank you for this! I’ve been wanting to try working with Observable notebooks in an IDE like VS Code for a variety of reasons: faster search, find and replace, refactoring (recursive renaming), etc. I’m most interested in experimenting with Deno (or Node.js) notebooks, Typescript notebooks could be great, too.

---

<div class="post-metadata">

**Author:** ![harris](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/harris/32/3326_2.png) [@harris](https://talk.observablehq.com/u/harris)\
**Post date:** [August 19, 2021, 4:12pm UTC](https://talk.observablehq.com/t/dataflow-a-self-hosted-observable-notebook-editor/5055/5 "2021-08-19T16:12:38Z")

</div>

Am really loving using this for a notebook I wanted to do with some very private very large data and it works super well!

I put in a PR to upgrade to the latest version of the observable standard library—would love if you’d take a look.
