6 ms·
As someone who mostly sticks to python but is interested in data analysis and visualization, I still haven’t figured out what problem d3 solves, and which use c
by pletnes 9y ago
As someone who mostly sticks to python but is interested in data analysis and visualization, I still haven’t figured out what problem d3 solves, and which use cases it makes sense for?
- bronson 9y agoWhat a strange comment. Have you tried to answer this for yourself? For example, looking at the homepage or any demos?
- jordan801 9y agoIt offers a bunch of functions that help make svg manipulation digestible. Try manipulating an svg with vanilla javascript, it's a pain to do anything more than basic shape drawing.
- jordache 9y agodata visualization that is interactive and works on a platform that is universal. python produces only static output right?
- LaGrange 9y agoWhat? No. Check out Jupyter, for example. Of course that's a totally different platform, but I wouldn't call that "static".
- jordache 9y agobut you need a special viewer to run the output.. huge friction. That's a none-starter for almost everyone. everyone has a web browser...
- maxerickson 9y ago...The Jupyter Notebook is an open-source web application that allows you to create and share documents that contain live code, equations, visualizations and narrative text. http://jupyter.org/ http://jupyter.org/
- trgv 9y agoCalling it "live" seems just slightly inaccurate to me. Every time code needs to run an http request needs to be made. (Unless there's some new tech here I'm unaware of) This is a limitation that may make no difference in some cases, but in others it is important for code to execute in the client. A good example of this is making a visualization that seamlessly responds to the user's mouse pointer.
- tomca32 9y agoBut it is static. The visual output is usually in jpg form. That's pretty much the definition of static output. The only output I can find in Jupyter that is not static is coming from Bokeh which takes Python and generates javascript code to run in the browser. Jupyter itself calls this "a style of D3".
- pletnes 9y agoJupyter is just the editor and viewer. It can plug in a lot of stuff, including maps and videos, but those are prepared using other libraries.
- andybak 9y agohttps://bokeh.pydata.org https://bokeh.pydata.org offers a nice dynamic chart library from Python. It has a js helper library to handle to dynamism.
- pwang 9y agohttps://bokeh.pydata.org/en/latest/docs/gallery/hexbin.html https://bokeh.pydata.org/en/latest/docs/gallery/hexbin.html Write Python, make interactive web plots.
- mr_toad 9y agoYou can’t run Python (or R, or SAS or whatever) in a browser. If you want to do dynamic visualisation with something like Python or R in a browser you need need a server, and that incurs significant latency. D3 also allows much more fine grained control over visualisations than any visualisation library or package I’ve worked with in any language, because you have total control of every line, point, every fill. No matter what crazy design the design team comes up with for your website, D3 will let you bind data to it and turn it into a workable chart. It was written by an editor at the New York Times, and it is designed for producing bespoke visualisations on public facing showcase pages where appearances and speed have to be state of the art.
- pwang 9y ago> If you want to do dynamic visualisation with something like Python or R in a browser you need need a server, and that incurs significant latency. Not true. Bokeh (http://bokeh.pydata.org http://bokeh.pydata.org) lets you build interactive web graphics that run purely embedded in a static HTML file. No server needed. (Of course, it also has a server-based mode that lets you build interactive analytical viz apps, with browser interactions automagically driving Python callbacks)
- starpilot 9y agoTry making this in Python: https://archive.nytimes.com/www.nytimes.com/interactive/2012/02/13/us/politics/2013-budget-proposal-graphic.html https://archive.nytimes.com/www.nytimes.com/interactive/2012... d3 is for interactive charts
- pwang 9y agoYou mean like https://demo.bokehplots.com/apps/gapminder https://demo.bokehplots.com/apps/gapminder ?
- antod 9y agoI hope this makes sense: It's not so much for people wanting to make new 'instances' of a visualisation. It's more for people wanting to make new 'classes' of visualisations.
- antod 9y agoOr to try and explain that better... It's not a chart library, but a framework for wiring up dynamic data to collections of DOM nodes (either HTML or SVG) in any way you like. eg you can write specific chart libraries using it. It is oriented around the lifecycles of instances of data - eg entry and exit hooks to run as data appears and disappears, and it has a lot of powerful lower level functionality.
- palimpsests 9y agoThis slide has a nice answer: http://mbostock.github.io/d3/talk/20111116/#8 http://mbostock.github.io/d3/talk/20111116/#8