HNHacker News
TopNewBestAskShowJobs

nicolaskruchten

378 karma · joined July 26, 2011

Visualization Lead at https://hex.tech/

Creator of https://plotly.express/ and https://react-pivottable.js.org/ and https://pivottable.js.org/

Personal Website: http://nicolas.kruchten.com/

Email first at last dot com.

submissionscomments
nicolaskruchten··on Uniwidth Typefaces for Interface Design
My understanding is that the term “lining” refers to numbers with the same height, (which is also common and appreciated in data tables!) and that “tabular” refers to numbers with the same width, so not quite the same thing: https://creativepro.com/typetalk-know-your-figures/
nicolaskruchten··on Uniwidth Typefaces for Interface Design
Ahh, very satisfying to learn the name of this property.

It’s especially important in data tables when coupled with tabular numbers (essentially mono spaced numbers) so you can e.g. bold a cell without having the thousands or decimal separators get out of alignment in a column of numbers. Spreadsheet programs use fonts with this property.

nicolaskruchten··on Vega-Lite: A Grammar of Interactive Graphics
I agree that some libraries do this but in general Plotly does not: we mostly visualize the data given, and lots of users wish we would onboard more transformation/aggregation/processing :)
nicolaskruchten··on A broken algorithm that affected American transportation
The model won't tell you how likely these scenarios are, but one advantage of this class of model over black-box ML function-fitting is that you can do scenario planning. You can do models runs like "what happens if the price of oil shoots way up?" or "what happens if 50% of the cars are taxis?" (e.g. Uber-driven future) or "what happens if transit all of a sudden gains a huge perceived cost?" (e.g. respiratory-virus pandemic) in the third and fourth stages of the model. In the early stages of the model you can look at stuff like "what happens if firms abandon city centers?" or "what happens if 50% of white-collar work is done from home?" etc.
nicolaskruchten··on A broken algorithm that affected American transportation
> an enormous set of available training data (all traffic happening everywhere across the country).

I'm not sure this is very helpful to predict traffic patterns over the next 20-30 years in a policy-sensitive way... All the historical data in the world wouldn't have predicted the rise of Uber, the pandemic, the maybe-eventual rise of self-driving cars etc.

nicolaskruchten··on A broken algorithm that affected American transportation
I broadly agree with the article, but one point where it falls short is that it doesn't mention that the 4 stages of the model can be (and sometimes even are!) iterated in various ways to account for the way real people actually behave: modellers in the 21st century aren't quite as naive as all that (and probably the ones in the 50s weren't either but they had less data/computer power).

For reference, the four stages go like this: you start with "trip supply and demand" by zone, then inter-zone trips are generated by matching those up, then mode choice is computed per trip based on cost and travel time priors, then assignment to the network which results in actual trips and computed travel times based on route selection and congestion.

The travel times can then be fed back into mode-choice and iterated on: people will make the transit-vs-car choice differently based on the relative costs (in time and money and inconvenience) so iterating the last two steps can go a ways towards modelling that equilibrium.

Folks can exert some amount of choice around which trips they make (as mentioned in the article) and where they work, based on how easy it is to get there, so feeding the travel costs back into trip-generation can account for some of that, and over a longer horizon, both workers and employers can exert some control over where they live/site their facilities, so all 4 stages can be iterated as well.

None of this is perfect, and it's not always done, and the rest of the article's points stand, but I just wanted to say the modelling is not all that primitive :)

Edit: I studied this stuff in university 15 years ago with Professor Eric Miller, who wrote this book on how to integrate all this stuff in an iterative way... https://link.springer.com/article/10.1007/s11067-005-2630-5

nicolaskruchten··on Data Visualization Catalog
I'm sorry you had a bad experience with Plotly... I'd be curious to hear more if you're willing to share! Were you working in Python or Javascript or within our GUI?
nicolaskruchten··on Kai: A plotting library for Common Lisp
This pattern of a having code in one language generate a static JSON 'spec' for a figure for rendering in Javascript is very widespread actually... We have Plotly wrappers in Python, R, and Julia and the community has made many others e.g. Scala, F#, Rust, .NET, C++ I believe even!

This is the same approach used by non-Plotly systems like Bokeh in Python (and at one time in R?), Highcharter in R (targets the Highcharts Javascript library) and Altair in Python (targets the Vega-Lite Javascript library).

One of the major advantages of this approach is that it makes it easy to move from visualizing data locally to embedding these same visualizations into a web application, which is what Plotly's Dash library is for: https://dash.plotly.com/

nicolaskruchten··on Show HN: Antimander – Optimize Congressional Districts with Genetic Algorithms
I've always like this article's thoughtful approach to what we should value when districting: https://www.politico.com/magazine/story/2015/06/could-gerrym...
nicolaskruchten··on Dexplot: Python library for data visualization
Yes, here's the official word on this, under "Can I use Plotly for Python offline, without being connected to the internet?" https://plotly.com/python/is-plotly-free/
nicolaskruchten··on Dexplot: Python library for data visualization
Thanks for mentioning this! If people are curious, here's the official announcement: https://medium.com/plotly/plotly-py-4-0-is-here-offline-only...
nicolaskruchten··on Altair – A declarative statistical visualization library for Python
Altair and Vega-Lite are awesome!

I'll shamelessly plug Plotly Express (https://plotly.express/) here as something that works in a similar way, i.e. generates JSON figure descriptions rendered in Javascript, with an even more minimal API, that now accepts both long and wide data :)

nicolaskruchten··on Falcon is a free, open-source SQL editor with inline data visualization
ReadMe has been updated with link to the Linux AppImage, now that I'm back at my desk.
nicolaskruchten··on Falcon is a free, open-source SQL editor with inline data visualization
ReadMe updated to include Linux link!
nicolaskruchten··on Falcon is a free, open-source SQL editor with inline data visualization
The missing link to the Linux AppImage was an oversight... fixed now that I'm back at my desk :)

And yes, the desktop-app build toolchain is a pain to maintain.

nicolaskruchten··on Falcon is a free, open-source SQL editor with inline data visualization
You're welcome! I'm glad you like it :)

I wish I had more time to work on the Jupyter version but Plotly Express and the JupyterLab Chart Editor keep me pretty busy at Plotly these days!

nicolaskruchten··on Falcon is a free, open-source SQL editor with inline data visualization
I'm so glad you like it! Have you checked out the upgraded React version? https://react-pivottable.js.org/

There's even a Dash wrapper now: https://community.plotly.com/t/show-and-tell-dash-pivottable...

nicolaskruchten··on Falcon is a free, open-source SQL editor with inline data visualization
There’s no feature specifically for this but you can sometimes use an SSH tunnel and connect to localhost and have it work out. YMMV :)
nicolaskruchten··on Falcon is a free, open-source SQL editor with inline data visualization
Just an oversight :)
nicolaskruchten··on Effectively Using Matplotlib (2017)
Plotly.py is indeed developed primarily by employees of Plotly the company, but it's a 100% free/open-source, MIT licensed library that works totally offline and doesn't depend on any external service or require any kind of registration :)

See https://plot.ly/python/is-plotly-free/ for full details.

nicolaskruchten··on How to learn D3.js
I can't speak for other libraries, but Plotly is extremely customizable: you can change pretty much color, font, dimension etc. There are thousands of attributes which can be tweaked, from the length of the tick markers to the exact positioning of the titles, the shapes of the markers, etc.

Here's the full Javascript reference for all of these attributes: https://plot.ly/javascript/reference/

nicolaskruchten··on Exploring Mathematics with Matplotlib and Python
Very much so! Plotly.py version 4 is "offline-only" just like matplotlib and other libraries: https://medium.com/plotly/plotly-py-4-0-is-here-offline-only...
nicolaskruchten··on Exploring Mathematics with Matplotlib and Python
Mighty matplotlib isn't going away any time soon, but just because Plotly makes interactive plots, it doesn't mean you can't also

a) customize every aspect of the chart, from the fonts to the length of the axis ticks to the legend placement etc (see the full list of thousands of available customization attributes here: https://plot.ly/python/reference/)

b) export to raster or vector formats for publication (https://plot.ly/python/static-image-export/)

c) use high-level grammar-of-graphics-inspired tools like https://plotly.express/ to create complex charts in a single line of code.

nicolaskruchten··on Exploring Mathematics with Matplotlib and Python
Plotly has very robust static image export capabilities, meaning you can create an interactive vis for yourself in a notebook, and embed it in an app if you like, and then use the same tools to create publication-ready export in SVG, EPS, PDF, PNG etc.

Here is the relevant documentation: https://plot.ly/python/static-image-export/

nicolaskruchten··on AI is supercharging the creation of maps around the world
I’m interested in learning more about this “Ops Plus” term but it doesn’t seem very google friendly... Is this a term of art in some circles?
nicolaskruchten··on Salesforce is buying Tableau for $15.7B
PS: and Dash, which is what the GP was talking about, is totally free and unrelated to Chart Studio :)
nicolaskruchten··on Salesforce is buying Tableau for $15.7B
That's not totally accurate... If you use our SaaS Chart Studio product then yes, but otherwise (i.e. in 'offline' mode) you can use our Python, R and Javascript libraries as much as you like: they're MIT licensed.
nicolaskruchten··on Using Altair for most of my visualization in Python
Plotly Express (https://plotly.express/) is a new high-level wrapper on top of Plotly.py which gives a similar API to Altair in a lot of ways.

Under the hood it works the same way: Plotly.py generates JSON figure descriptions which are passed to Plotly.js for rendering.

The whole thing is, of course, free and open-source and well-documented :)

nicolaskruchten··on Using Altair for most of my visualization in Python
Altair here is a play on the underlying library called Vega. They're both stars in the "Summer Triangle" https://en.wikipedia.org/wiki/Summer_Triangle
nicolaskruchten··on Using Altair for most of my visualization in Python
Plotly supports interactive 3d scatters, lines, surfaces, cones, streamtubes, volumes and isosuraces :)

https://plot.ly/python/3d-charts/

← PreviousPage 2 of 3Next →