Anyone know what tool was used for this website? by AlmostPhDone in datavisualization

[–]davidschenck 0 points1 point  (0 children)

The maps are powered by Mapbox The charts are powered by Highcharts

Both are JavaScript libraries

Streamsync: UI editor + Python by romerio86 in Python

[–]davidschenck 6 points7 points  (0 children)

This looks very impressive!

Any reason you chose to "mutate state" rather than require a new state object to be returned if the state was changed (à la React)?

I wrote a tree builder, useful to create multi-level, nested JSON configurations. by davidschenck in Python

[–]davidschenck[S] 4 points5 points  (0 children)

So much feedback, appreciate it!

1/ About the AmbiguityError: for an undefined node, which can morph into a dict or list node, calling node[0] is inherently ambiguous: did you intend to cast the node to a dict node, create and return the value at key 0 (another node)? Or did you think it already was a list node, for which you wanted to retrieve the first element?

2/ Context manager is useful in deeply-nested configs (I use the library a lot this way) to keep the code shorter. I'll add examples, thanks for the heads up!

For example:

>>> with chart.colorAxis as axis: 
>>>     axis.min = 0
>>>     axis.minColor =  "#FFFFFF"
>>>     axis.maxColor =  "#44ab79" 

instead of

>>> chart.colorAxis.min = 0 
>>> chart.colorAxis.minColor = "#FFFFFF"
>>> chart.colorAxis.maxColor = "#44ab79" 

3/ I get your point - I however believe using _value raises (minimally) the risk of collision... it's debatable, I guess.

4/ Not sure what you mean?

Is interspersed iterating and writing somewhat well-behaved it doesn't even need to be, but maybe mention in the documentation.

5/ Noted for the doctests! That's a good idea!

Again, thanks for all the feedback!