{ "cells": [ { "cell_type": "code", "execution_count": null, "id": "9680b576", "metadata": {}, "outputs": [], "source": [ "from bqplot import *\n", "sc_geo = Mercator()\n", "sc_c1 = ColorScale(scheme='YlOrRd')\n", "map_styles = {'color': {643: 105., 4: 21., 398: 23., 156: 42., 124:78., 76: 98.},\n", " 'scales': {'projection': sc_geo, 'color': sc_c1}, 'colors': {'default_color': 'Grey'}}\n", "\n", "axis = ColorAxis(scale=sc_c1)\n", "chloro_map = Map(map_data=topo_load('map_data/WorldMap.json'), **map_styles)\n", "Figure(marks=[chloro_map], axes=[axis],title='Choropleth Example')" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.9.5" } }, "nbformat": 4, "nbformat_minor": 5 }