IPython notebook to explore bivariate mapping
MIT License | |
Copyright (c) 2019 Patrick Brockmann / LSCE | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
A example to explore spatial plot with bokeh (0.7.1) using plt.image
An interactive version of a Reingold–Tilford tree. Click on the nodes to expand or collapse. From http://bl.ocks.org/mbostock/4339083
Added search, expand and styling of results and its ancestors. Visible from http://bl.ocks.org/PBrockmann/0f22818096428b12ea23
Circle packing of the available datasets from the CMIP5 exercice (Datanodes and Indexes). Click on any package to zoom in or out. The json information is read from https://esg-dn1.nsc.liu.se:8843/api/datavisibility
A D3.js bubbles map driven by a time slider.
The map shows traffic accidents recorded in Oslo, Norway, for the year 2013.
The Leaflet Markercluster plugin is wonderful. Since the markerclusters are divIcons you can put whatever you want inside them using the iconCreateFunction. I wanted my clusters to reveal more information than just the marker count and figured a pie chart would do the job. So I told the iconCreateFunction to do some D3 magic and this is the result.
The example is a bit more complicated than necessary due to how my dataset is structured. But if you take a look at the defineClusterIcon() function you'll see that I use d3.nest() to build a dataset for the pie chart based on a given property from all the cluster's children. Then I pass this dataset over to the bakeThePie() function together with instructions on how to style the chart. The function returns svg markup which in turn is placed inside the divIcon.
Feel free to suggest improvements.
This is an example of adding simple interface for single axis zoom and pan capability using the mouse. When the mouse is over the x
or y
axes, the panning and zooming with the mouse will execute on only those axes. When the mouse is over the main plotting canvas, pan and zoom with the mouse works on both axes. Feel free to comment on the gist.