Skip to content

Commit

Permalink
[SEDONA-469] Update binder notebooks and docker image to Sedona 1.5.1 (
Browse files Browse the repository at this point in the history
…#1207)

* Update binder notebooks and docker image

* Fix the lint issue
  • Loading branch information
jiayuasu committed Apr 28, 2024
1 parent db431b3 commit e51489e
Show file tree
Hide file tree
Showing 10 changed files with 553 additions and 117 deletions.
5 changes: 3 additions & 2 deletions binder/ApacheSedonaCore.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@
"source": [
"config = SedonaContext.builder() .\\\n",
" config('spark.jars.packages',\n",
" 'org.apache.sedona:sedona-spark-shaded-3.4_2.12:1.5.0,'\n",
" 'org.datasyslab:geotools-wrapper:1.5.0-28.2'). \\\n",
" 'org.apache.sedona:sedona-spark-shaded-3.4_2.12:1.5.1,'\n",
" 'org.datasyslab:geotools-wrapper:1.5.1-28.2,'\n",
" 'uk.co.gresearch.spark:spark-extension_2.12:2.11.0-3.4'). \\\n",
" getOrCreate()\n",
"\n",
"sedona = SedonaContext.create(config)"
Expand Down
21 changes: 3 additions & 18 deletions binder/ApacheSedonaRaster.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,9 @@
"source": [
"config = SedonaContext.builder() .\\\n",
" config('spark.jars.packages',\n",
" 'org.apache.sedona:sedona-spark-shaded-3.4_2.12:1.5.0,'\n",
" 'org.datasyslab:geotools-wrapper:1.5.0-28.2'). \\\n",
" 'org.apache.sedona:sedona-spark-shaded-3.4_2.12:1.5.1,'\n",
" 'org.datasyslab:geotools-wrapper:1.5.1-28.2,'\n",
" 'uk.co.gresearch.spark:spark-extension_2.12:2.11.0-3.4'). \\\n",
" getOrCreate()\n",
"\n",
"sedona = SedonaContext.create(config)\n",
Expand Down Expand Up @@ -157,22 +158,6 @@
"Sedona 1.5.0 provides [multiple ways to be able to visualize rasters](https://sedona.apache.org/1.5.0/api/sql/Raster-visualizer/). Throughout this notebook, [RS_AsImage](https://sedona.apache.org/1.5.0/api/sql/Raster-visualizer/#rs_asimage) will be used to visualize any changes to the rasters."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "d5f615f4-a3d6-407c-aea9-58891c1e55e3",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"# Define a simple wrapper to display HTML in jupyter notebook environment\n",
"class SedonaUtils:\n",
" @classmethod\n",
" def display_image(cls, df):\n",
" display(HTML(df.toPandas().to_html(escape=False)))"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down
5 changes: 3 additions & 2 deletions binder/ApacheSedonaSQL.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@
"source": [
"config = SedonaContext.builder() .\\\n",
" config('spark.jars.packages',\n",
" 'org.apache.sedona:sedona-spark-shaded-3.4_2.12:1.5.0,'\n",
" 'org.datasyslab:geotools-wrapper:1.5.0-28.2'). \\\n",
" 'org.apache.sedona:sedona-spark-shaded-3.4_2.12:1.5.1,'\n",
" 'org.datasyslab:geotools-wrapper:1.5.1-28.2,'\n",
" 'uk.co.gresearch.spark:spark-extension_2.12:2.11.0-3.4'). \\\n",
" getOrCreate()\n",
"\n",
"sedona = SedonaContext.create(config)\n"
Expand Down
5 changes: 3 additions & 2 deletions binder/ApacheSedonaSQL_SpatialJoin_AirportsPerCountry.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@
"source": [
"config = SedonaContext.builder() .\\\n",
" config('spark.jars.packages',\n",
" 'org.apache.sedona:sedona-spark-shaded-3.4_2.12:1.5.0,'\n",
" 'org.datasyslab:geotools-wrapper:1.5.0-28.2'). \\\n",
" 'org.apache.sedona:sedona-spark-shaded-3.4_2.12:1.5.1,'\n",
" 'org.datasyslab:geotools-wrapper:1.5.1-28.2,'\n",
" 'uk.co.gresearch.spark:spark-extension_2.12:2.11.0-3.4'). \\\n",
" getOrCreate()\n",
"\n",
"sedona = SedonaContext.create(config)\n",
Expand Down
3 changes: 2 additions & 1 deletion binder/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ shapely="==1.8.4"
geopandas="==0.11.1"
pyspark="==3.4.0"
attrs="*"
apache-sedona="==1.5.0"
apache-sedona="==1.5.1"
matplotlib = "*"
descartes = "*"
keplergl = "==0.3.2"
Expand All @@ -25,6 +25,7 @@ ipywidgets = "*"
jupyterlab-widgets = "==1.1.7"
ipykernel = "*"
jupyterlab = "==3.6.4"
pyspark-extension = "==2.11.0.3.4"

[requires]
python_version = "3.9"
Loading

0 comments on commit e51489e

Please sign in to comment.