| 1 |
{ |
| 2 |
"cells": [ |
| 3 |
{ |
| 4 |
"cell_type": "code", |
| 5 |
"execution_count": null, |
| 6 |
"id": "9680b576", |
| 7 |
"metadata": {}, |
| 8 |
"outputs": [], |
| 9 |
"source": [ |
| 10 |
"from bqplot import *\n", |
| 11 |
"sc_geo = Mercator()\n", |
| 12 |
"sc_c1 = ColorScale(scheme='YlOrRd')\n", |
| 13 |
"map_styles = {'color': {643: 105., 4: 21., 398: 23., 156: 42., 124:78., 76: 98.},\n", |
| 14 |
" 'scales': {'projection': sc_geo, 'color': sc_c1}, 'colors': {'default_color': 'Grey'}}\n", |
| 15 |
"\n", |
| 16 |
"axis = ColorAxis(scale=sc_c1)\n", |
| 17 |
"chloro_map = Map(map_data=topo_load('map_data/WorldMap.json'), **map_styles)\n", |
| 18 |
"Figure(marks=[chloro_map], axes=[axis],title='Choropleth Example')" |
| 19 |
] |
| 20 |
} |
| 21 |
], |
| 22 |
"metadata": { |
| 23 |
"kernelspec": { |
| 24 |
"display_name": "Python 3", |
| 25 |
"language": "python", |
| 26 |
"name": "python3" |
| 27 |
}, |
| 28 |
"language_info": { |
| 29 |
"codemirror_mode": { |
| 30 |
"name": "ipython", |
| 31 |
"version": 3 |
| 32 |
}, |
| 33 |
"file_extension": ".py", |
| 34 |
"mimetype": "text/x-python", |
| 35 |
"name": "python", |
| 36 |
"nbconvert_exporter": "python", |
| 37 |
"pygments_lexer": "ipython3", |
| 38 |
"version": "3.9.5" |
| 39 |
} |
| 40 |
}, |
| 41 |
"nbformat": 4, |
| 42 |
"nbformat_minor": 5 |
| 43 |
} |