Skip to content

Commit

Permalink
Update density_and_public_transportation.ipynb
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbailey authored Sep 26, 2024
1 parent b6d2599 commit 1d6f06f
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions docs/notebooks/density_and_public_transportation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,7 @@
"jc = JenksCaspall(\n",
" zones_interpolated[\"Total Population + Worker Population Density\"].fillna(0), k=10\n",
")\n",
"colors = []\n",
"for color in jc.yb:\n",
" colors.append(Viridis_20.colors[color])\n",
"colors = numpy.array(Viridis_20.colors)[jc.yb]\n",
"layer.get_fill_color = numpy.uint8(colors)\n",
"\n",
"Map(layers=[layer])"
Expand Down Expand Up @@ -470,9 +468,7 @@
"jc = JenksCaspall(\n",
" zones_interpolated[\"Total Population + Worker Population Density\"], k=10\n",
")\n",
"colors = []\n",
"for color in jc.yb:\n",
" colors.append(Viridis_20.colors[color])\n",
"colors = numpy.array(Viridis_20.colors)[jc.yb]\n",
"layer.get_fill_color = numpy.uint8(colors)\n",
"layers = [layer]\n",
"for route in network.routes:\n",
Expand Down Expand Up @@ -648,13 +644,12 @@
"outputs": [],
"source": [
"from mapclassify import Quantiles\n",
"import numpy\n",
"\n",
"zones_interpolated[\"Accessibility w/in 15 minutes\"] = tdf.T.sum()\n",
"layer = SolidPolygonLayer.from_geopandas(zones_interpolated, opacity=0.1)\n",
"jc = Quantiles(zones_interpolated[\"Accessibility w/in 15 minutes\"], k=10)\n",
"colors = []\n",
"for color in jc.yb:\n",
" colors.append(Viridis_20.colors[color])\n",
"colors = numpy.array(Viridis_20.colors)[jc.yb]\n",
"layer.get_fill_color = numpy.uint8(colors)\n",
"layers = [layer]\n",
"\n",
Expand Down

0 comments on commit 1d6f06f

Please sign in to comment.