Skip to content

Commit

Permalink
#109 and more - add pydeck text and make some sections OPTIONAL (#135)
Browse files Browse the repository at this point in the history
  • Loading branch information
justb4 authored Jun 21, 2023
1 parent 7b0778b commit 55db0e4
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 39 deletions.
81 changes: 42 additions & 39 deletions workshop/jupyter/content/notebooks/07-visualization.ipynb
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"cells": [
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -12,11 +11,10 @@
"* [Folium](https://github.com/python-visualization/folium)\n",
"* [ipyleaflet](https://ipyleaflet.readthedocs.io)\n",
"* [Bokeh](https://bokeh.pydata.org)\n",
"* [pydeck](https://pydeck.gl/)\n"
"* [pydeck](https://pydeck.gl) - optional\n"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -53,7 +51,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -75,7 +72,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"pycharm": {
Expand All @@ -100,15 +96,13 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"Now [open this map here](test/07-folium-1.html) as \"regular\" HTML! \n"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -160,7 +154,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -170,7 +163,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"pycharm": {
Expand All @@ -192,7 +184,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"pycharm": {
Expand Down Expand Up @@ -221,7 +212,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -245,7 +235,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -279,7 +268,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -315,7 +303,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -337,7 +324,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -361,13 +347,12 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"### ipyleaflet - Adding Popup \n",
"### ipyleaflet - Adding Popups\n",
"\n",
"#### 1. Adding static popup"
"#### 1. Adding a static popup"
]
},
{
Expand All @@ -389,11 +374,10 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"#### 2. Using Custom data for popup\n",
"#### 2. Using Custom data in popup\n",
"\n",
"For this example we'll prepare map of following scenario\n",
"Seeing all the cities as a point on map and on click show their name"
Expand Down Expand Up @@ -435,11 +419,10 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"## Another interesting map options\n",
"### Other interesting ipyleaflet functions\n",
"\n",
"1. AntPath \n",
"2. Marker Cluster\n",
Expand All @@ -451,7 +434,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"pycharm": {
Expand All @@ -469,7 +451,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -484,7 +465,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -508,7 +488,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"pycharm": {
Expand All @@ -533,7 +512,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -555,7 +533,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -579,7 +556,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -610,7 +586,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -631,7 +606,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -655,7 +629,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -687,11 +660,10 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"### Creating an Interactive Maps using Bokeh and Geopandas\n",
"### Creating an Interactive Maps using Bokeh and Geopandas - OPTIONAL\n",
"\n",
"Creating an interactive Bokeh map from a Shapefile or other vector data file like GeoJSON\n",
"consists typically of the following steps:\n",
Expand Down Expand Up @@ -809,15 +781,14 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"pycharm": {
"name": "#%% md\n"
}
},
"source": [
"### Using Bokeh GeoJSONSource\n",
"### Using Bokeh GeoJSONSource - OPTIONAL\n",
"The above scenario could be effected even more compact.\n",
"The Bokeh `GeoJSONDataSource` expects a GeoJSON-string, so we can \n",
"just use ordinary file `open()/read()`.\n",
Expand Down Expand Up @@ -851,7 +822,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -875,7 +845,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -904,7 +873,41 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"## pydeck - OPTIONAL\n",
"\n",
"[pydeck](https://pydeck.gl/) is a WebGL2-powered, highly performant large-scale data visualization framework.\n",
"We leave it you to explore pydeck through [its documentation](https://pydeck.gl/).\n",
"\n",
"pydeck is part of [deck.gl](https://deck.gl/).\n",
"\n",
"![From deck.gl repo Example](images/deck.gl.jpg)\n",
"\n",
"From their [GitHub README](https://github.com/visgl/deck.gl):\n",
"\n",
"*\"deck.gl is designed to simplify high-performance, WebGL-based visualization of large data sets.\n",
"Users can quickly get impressive visual results with minimal effort by composing existing layers,\n",
"or leverage deck.gl's extensible architecture to address custom needs.*\n",
"\n",
"*deck.gl maps **data** (usually an array of JSON objects) into a stack of visual **layers** - e.g. icons, polygons, texts; and look at them with **views**: e.g. map, first-person, orthographic.*\n",
"\n",
"*deck.gl handles a number of challenges out of the box:*\n",
"\n",
"* *Performant rendering and updating of large data sets*\n",
"* *Interactive event handling such as picking, highlighting and filtering*\n",
"* *Cartographic projections and integration with major basemap providers*\n",
"* *A catalog of proven, well-tested layers*\n",
"\n",
"*Deck.gl is designed to be highly customizable.*\n",
"*All layers come with flexible APIs to allow programmatic control of each aspect of the rendering.*\n",
"*All core classes such are easily extendable by the users to address custom use cases.\"*\n",
"\n",
"deck.gl comes in several flavors (programming languages): JavaScript (`deck.gl`) and Python (`pydeck`)."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 55db0e4

Please sign in to comment.