Seeing a lot of posts of the "Observable vs Jupyter" variety. I really don't think this has to be a this versus that kind of discussion. There is plenty of room for both.
I like the idea, I've even written something similar myself, but for me a few things were not clear.
How would I load in data that is stored on my harddrive (not web addressable) without having to run my own server or go through the file selector popup box each time. User JS can't just read the harddisk (a requirement for web security). If I have to run my own server then a major selling point of this is gone. I work with large tabled data and very often use vectorised functions using numpy or pandas, working on entire columns with a fantastically simple interface. A = B * x, for arrays B, scalars x returning a new array A. Is there something as beautiful available, working around the lack of operator overloading in JS? I've only seen string abuse like p('A') = p('B*x'). Auh.
Good question! Mike wrote a notebook about getting data into Observable here: https://beta.observablehq.com/@mbostock/introduction-to-data - the gist is that right now any host that supports CORS does the trick, and the combination of GitHub Gist & RawGit is pretty good for the task. It'd be nice to drag & drop data right in the app, though, so... stay tuned.
And, yep - something like pandas for JavaScript would also be nice... also stay tuned.
So I finally got around to taking a good look at this last night after work. I adapted a single page d3 app that I'd written many years ago to model sous vide cooking.
A few comments: - Probably needs some more documentation. Maybe a quick reference for the API that's available and a list of keystrokes. I will admit though, I bailed halfway through the tutorials so I could start playing with it. - I'd like to be able to drag and drop cells (or otherwise rearrange them). I created my page, but then wanted to better organize it. Making new cells and cut/pasting content was annoying. - The Opt-Return thing is killing me. It executes the cell in Jupyter and splits the cell into two in Observable. I can't think of a reason I'd want to split a cell in the middle. I believe splitting in the middle will always result in two cells with syntax errors. Perhaps just always create and focus a new, empty cell? - It'd be nice if there was an easy way to delete a cell. Currently, I'm emptying it and then joining with the previous via option-del, which concatenates cells. I believe joining two cells with content will always result in a syntax error, so I'm not sure the utility of that. - The samples were useful, especially for learning how d3 fits into this. I ended up breaking up a long function (to build the d3 graph) into multiple cells, taking cues from the samples. (I also learned that d3 has changed a little since v3.) It would also be nice to be able to rename variables (i.e. refactor), but that's not a critical feature.
Comments (128) 39 threads
Earlier commentsHow would I load in data that is stored on my harddrive (not web addressable) without having to run my own server or go through the file selector popup box each time. User JS can't just read the harddisk (a requirement for web security). If I have to run my own server then a major selling point of this is gone.
I work with large tabled data and very often use vectorised functions using numpy or pandas, working on entire columns with a fantastically simple interface. A = B * x, for arrays B, scalars x returning a new array A. Is there something as beautiful available, working around the lack of operator overloading in JS? I've only seen string abuse like p('A') = p('B*x'). Auh.
And, yep - something like pandas for JavaScript would also be nice... also stay tuned.
Edit 1: Deploying the fix now...
Edit 2: ... and we're back.
...but not always
A few comments:
- Probably needs some more documentation. Maybe a quick reference for the API that's available and a list of keystrokes. I will admit though, I bailed halfway through the tutorials so I could start playing with it.
- I'd like to be able to drag and drop cells (or otherwise rearrange them). I created my page, but then wanted to better organize it. Making new cells and cut/pasting content was annoying.
- The Opt-Return thing is killing me. It executes the cell in Jupyter and splits the cell into two in Observable. I can't think of a reason I'd want to split a cell in the middle. I believe splitting in the middle will always result in two cells with syntax errors. Perhaps just always create and focus a new, empty cell?
- It'd be nice if there was an easy way to delete a cell. Currently, I'm emptying it and then joining with the previous via option-del, which concatenates cells. I believe joining two cells with content will always result in a syntax error, so I'm not sure the utility of that.
- The samples were useful, especially for learning how d3 fits into this. I ended up breaking up a long function (to build the d3 graph) into multiple cells, taking cues from the samples. (I also learned that d3 has changed a little since v3.)
It would also be nice to be able to rename variables (i.e. refactor), but that's not a critical feature.
All comments shown.
Couldn't load more comments. Check your connection and try again.