MrPowers commented on code in PR #41:
URL: https://github.com/apache/sedona-db/pull/41#discussion_r2336519787


##########
docs/geopandas-interop.ipynb:
##########
@@ -0,0 +1,211 @@
+{
+ "cells": [
+  {
+   "cell_type": "markdown",
+   "id": "caa5f2d5-28bb-4ce9-8a11-92646b3a9f6c",
+   "metadata": {},
+   "source": [
+    "# GeoPandas interoperability\n",
+    "\n",
+    "This example shows how to read a GeoJSON file with GeoPandas and then 
convert the GeoPandas DataFrame to a SedonaDB DataFrame.\n",
+    "\n",
+    "Any file type that can be read by GeoPandas can also be read into a 
SedonaDB DataFrame!"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 8,
+   "id": "0434bead-2628-4844-a3f6-2f9c15a21899",
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "import sedonadb\n",
+    "import geopandas as gpd\n",
+    "\n",
+    "sd = sedonadb.connect()"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "618b5d1d-ac2b-4786-ae5b-0d10efd6a8d4",
+   "metadata": {},
+   "source": [
+    "### Read a GeoJSON file with GeoPandas"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 9,
+   "id": "2691bd24-9b2d-4cf9-958d-4ef01d967cb3",
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "gdf = gpd.read_file(\"some_data.json\")"

Review Comment:
   Good idea, I added a FlatGeobuf example as well.  I kept the GeoJSON example 
if that's alright cause it's just nice and compact and easily understandable, 
especially for folks that aren't familiar with geo data.  It's really nice that 
SedonaDB supports all these file types via GeoPandas!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to