From 9ec0f33a07111fa03d024dcee2c3b973b75c5265 Mon Sep 17 00:00:00 2001 From: Arwa Date: Mon, 27 Jan 2025 17:28:09 -0600 Subject: [PATCH 1/5] docs: Add GeoSeris docs --- docs/templates/toc.yml | 4 + notebooks/geo/geoseries.ipynb | 158 ++++++++++++++++++++++++++++++++++ 2 files changed, 162 insertions(+) create mode 100644 notebooks/geo/geoseries.ipynb diff --git a/docs/templates/toc.yml b/docs/templates/toc.yml index 47d9e97d7a..70d3d19c60 100644 --- a/docs/templates/toc.yml +++ b/docs/templates/toc.yml @@ -207,6 +207,10 @@ - name: BigQuery built-in functions uid: bigframes.bigquery name: bigframes.bigquery + - items: + - name: GeoSeries + uid: bigframes.geoseries + name: bigframes.geoseries - items: - name: Overview uid: bigframes.streaming diff --git a/notebooks/geo/geoseries.ipynb b/notebooks/geo/geoseries.ipynb new file mode 100644 index 0000000000..0ae50b8d73 --- /dev/null +++ b/notebooks/geo/geoseries.ipynb @@ -0,0 +1,158 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [], + "source": [ + "# Copyright 2023 Google LLC\n", + "#\n", + "# Licensed under the Apache License, Version 2.0 (the \"License\");\n", + "# you may not use this file except in compliance with the License.\n", + "# You may obtain a copy of the License at\n", + "#\n", + "# https://www.apache.org/licenses/LICENSE-2.0\n", + "#\n", + "# Unless required by applicable law or agreed to in writing, software\n", + "# distributed under the License is distributed on an \"AS IS\" BASIS,\n", + "# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n", + "# See the License for the specific language governing permissions and\n", + "# limitations under the License." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Demo to Show GeoSeries Operations" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [], + "source": [ + "import bigframes.pandas as bpd\n", + "bpd.options.display.progress_bar = None\n", + "import geopandas.array\n", + "import shapely" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Retrieve the x location (longitude) of point geometries." + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/usr/local/google/home/arwas/src1/python-bigquery-dataframes/bigframes/core/global_session.py:114: DefaultLocationWarning: No explicit location is set, so using location US for the session.\n", + " return func(get_global_session(), *args, **kwargs)\n" + ] + } + ], + "source": [ + "series = bpd.Series(\n", + " [shapely.Point(1, 2), shapely.Point(2, 3), shapely.Point(3, 4)],\n", + " dtype=geopandas.array.GeometryDtype()\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "0 1.0\n", + "1 2.0\n", + "2 3.0\n", + "dtype: Float64" + ] + }, + "execution_count": 6, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "series.geo.x" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Retrieve the y location (latitude) of point geometries." + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [], + "source": [ + "series = bpd.Series(\n", + " [shapely.Point(1, 2), shapely.Point(2, 3), shapely.Point(3, 4)],\n", + " dtype=geopandas.array.GeometryDtype()\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "0 2.0\n", + "1 3.0\n", + "2 4.0\n", + "dtype: Float64" + ] + }, + "execution_count": 8, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "series.geo.y" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "venv", + "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.19" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} From f9271651c43bb96e79ba7e54e333b8a71dfcba3e Mon Sep 17 00:00:00 2001 From: Arwa Date: Mon, 27 Jan 2025 19:01:03 -0600 Subject: [PATCH 2/5] update geoseries notebook --- notebooks/geo/geoseries.ipynb | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/notebooks/geo/geoseries.ipynb b/notebooks/geo/geoseries.ipynb index 0ae50b8d73..d9b33b2728 100644 --- a/notebooks/geo/geoseries.ipynb +++ b/notebooks/geo/geoseries.ipynb @@ -30,7 +30,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 2, "metadata": {}, "outputs": [], "source": [ @@ -49,18 +49,9 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/usr/local/google/home/arwas/src1/python-bigquery-dataframes/bigframes/core/global_session.py:114: DefaultLocationWarning: No explicit location is set, so using location US for the session.\n", - " return func(get_global_session(), *args, **kwargs)\n" - ] - } - ], + "outputs": [], "source": [ "series = bpd.Series(\n", " [shapely.Point(1, 2), shapely.Point(2, 3), shapely.Point(3, 4)],\n", @@ -70,7 +61,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 4, "metadata": {}, "outputs": [ { @@ -82,7 +73,7 @@ "dtype: Float64" ] }, - "execution_count": 6, + "execution_count": 4, "metadata": {}, "output_type": "execute_result" } @@ -100,7 +91,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 5, "metadata": {}, "outputs": [], "source": [ @@ -112,7 +103,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 6, "metadata": {}, "outputs": [ { @@ -124,7 +115,7 @@ "dtype: Float64" ] }, - "execution_count": 8, + "execution_count": 6, "metadata": {}, "output_type": "execute_result" } From 810f31b3e3a74dc222ed8835d0ceb346a279f2fd Mon Sep 17 00:00:00 2001 From: Arwa Date: Tue, 28 Jan 2025 14:02:05 -0600 Subject: [PATCH 3/5] update docs to point to geopandas and notebook to be explain more about geoseries --- docs/templates/toc.yml | 4 +- notebooks/geo/geoseries.ipynb | 79 +++++++++++++++++++++-------------- 2 files changed, 50 insertions(+), 33 deletions(-) diff --git a/docs/templates/toc.yml b/docs/templates/toc.yml index 70d3d19c60..c17a1788df 100644 --- a/docs/templates/toc.yml +++ b/docs/templates/toc.yml @@ -209,8 +209,8 @@ name: bigframes.bigquery - items: - name: GeoSeries - uid: bigframes.geoseries - name: bigframes.geoseries + uid: bigframes.geopandas + name: bigframes.geopandas - items: - name: Overview uid: bigframes.streaming diff --git a/notebooks/geo/geoseries.ipynb b/notebooks/geo/geoseries.ipynb index d9b33b2728..017621483e 100644 --- a/notebooks/geo/geoseries.ipynb +++ b/notebooks/geo/geoseries.ipynb @@ -2,11 +2,11 @@ "cells": [ { "cell_type": "code", - "execution_count": 1, + "execution_count": 21, "metadata": {}, "outputs": [], "source": [ - "# Copyright 2023 Google LLC\n", + "# Copyright 2025 Google LLC\n", "#\n", "# Licensed under the Apache License, Version 2.0 (the \"License\");\n", "# you may not use this file except in compliance with the License.\n", @@ -25,85 +25,102 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Demo to Show GeoSeries Operations" + "# Analyzing a GEOGRAPHY column with bigframes.geopandas.GeoSeries" ] }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 22, "metadata": {}, "outputs": [], "source": [ + "import bigframes\n", "import bigframes.pandas as bpd\n", - "bpd.options.display.progress_bar = None\n", - "import geopandas.array\n", - "import shapely" + "import shapely\n", + "bpd.options.display.progress_bar = None" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "## Retrieve the x location (longitude) of point geometries." + "## - Retrieve the x (longitude) and y (latitude) locations of point geometries with `geo.x` and `geo.y`." ] }, { - "cell_type": "code", - "execution_count": null, + "cell_type": "markdown", "metadata": {}, - "outputs": [], "source": [ - "series = bpd.Series(\n", - " [shapely.Point(1, 2), shapely.Point(2, 3), shapely.Point(3, 4)],\n", - " dtype=geopandas.array.GeometryDtype()\n", - ")" + "#### Note: TypeError is raised if the GEOGRAPHY column contains geometry type other than `Point`." ] }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 23, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "0 1.0\n", - "1 2.0\n", - "2 3.0\n", - "dtype: Float64" + "0 POINT (1 2)\n", + "1 POINT (2 3)\n", + "2 POINT (3 4)\n", + "dtype: geometry" ] }, - "execution_count": 4, + "execution_count": 23, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "series.geo.x" + "series = bigframes.geopandas.GeoSeries(\n", + " [shapely.Point(1, 2), shapely.Point(2, 3), shapely.Point(3, 4)]\n", + ")\n", + "\n", + "series" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "## Retrieve the y location (latitude) of point geometries." + "### `geo.x`" ] }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 24, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "0 1.0\n", + "1 2.0\n", + "2 3.0\n", + "dtype: Float64" + ] + }, + "execution_count": 24, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "series.geo.x" + ] + }, + { + "cell_type": "markdown", "metadata": {}, - "outputs": [], "source": [ - "series = bpd.Series(\n", - " [shapely.Point(1, 2), shapely.Point(2, 3), shapely.Point(3, 4)],\n", - " dtype=geopandas.array.GeometryDtype()\n", - ")" + "### `geo.y`" ] }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 25, "metadata": {}, "outputs": [ { @@ -115,7 +132,7 @@ "dtype: Float64" ] }, - "execution_count": 6, + "execution_count": 25, "metadata": {}, "output_type": "execute_result" } From 2fe2c915b6848c733313b323d5f672efa9b5bf67 Mon Sep 17 00:00:00 2001 From: Arwa Date: Wed, 29 Jan 2025 16:23:50 -0600 Subject: [PATCH 4/5] correct geoseries path in docs and update notebook data --- .../bigframes.geopandas/geoseries.rst | 2 +- notebooks/geo/geoseries.ipynb | 130 ++++++++++++++---- 2 files changed, 105 insertions(+), 27 deletions(-) diff --git a/docs/reference/bigframes.geopandas/geoseries.rst b/docs/reference/bigframes.geopandas/geoseries.rst index 1819613955..91e853b1f8 100644 --- a/docs/reference/bigframes.geopandas/geoseries.rst +++ b/docs/reference/bigframes.geopandas/geoseries.rst @@ -11,7 +11,7 @@ GeoSeries Series ------ -.. autoclass:: bigframes.geopandas.geoseries.GeoSeries +.. autoclass:: bigframes.geopandas.GeoSeries :members: :inherited-members: :undoc-members: diff --git a/notebooks/geo/geoseries.ipynb b/notebooks/geo/geoseries.ipynb index 017621483e..15959cdd32 100644 --- a/notebooks/geo/geoseries.ipynb +++ b/notebooks/geo/geoseries.ipynb @@ -25,16 +25,17 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Analyzing a GEOGRAPHY column with bigframes.geopandas.GeoSeries" + "# Analyzing a GEOGRAPHY column with `bigframes.geopandas.GeoSeries`" ] }, { "cell_type": "code", - "execution_count": 22, + "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import bigframes\n", + "import bigframes.geopandas\n", "import bigframes.pandas as bpd\n", "import shapely\n", "bpd.options.display.progress_bar = None" @@ -44,7 +45,72 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## - Retrieve the x (longitude) and y (latitude) locations of point geometries with `geo.x` and `geo.y`." + "### Load the Counties table from Census Bureau US Boundaries dataset" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "df = bpd.read_gbq(\"bigquery-public-data.geo_us_boundaries.counties\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Create a series from the int_point_geom column" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": {}, + "outputs": [], + "source": [ + "point_geom_series = df['int_point_geom']" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Retrieve the first five geo points with `.head()`" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "0 POINT (-101.29826 46.71082)\n", + "1 POINT (-99.11108 29.35366)\n", + "2 POINT (-66.58687 18.21115)\n", + "3 POINT (-102.60179 38.83565)\n", + "4 POINT (-71.57862 41.86977)\n", + "Name: int_point_geom, dtype: geometry" + ] + }, + "execution_count": 14, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "first_five_points = point_geom_series.head()\n", + "first_five_points" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Convert the first five geo points to `bigframes.gopandas.GeoSeries`" ] }, { @@ -56,89 +122,101 @@ }, { "cell_type": "code", - "execution_count": 23, + "execution_count": 20, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "0 POINT (1 2)\n", - "1 POINT (2 3)\n", - "2 POINT (3 4)\n", + "0 POINT (-101.29826 46.71082)\n", + "1 POINT (-99.11108 29.35366)\n", + "2 POINT (-66.58687 18.21115)\n", + "3 POINT (-102.60179 38.83565)\n", + "4 POINT (-71.57862 41.86977)\n", "dtype: geometry" ] }, - "execution_count": 23, + "execution_count": 20, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "series = bigframes.geopandas.GeoSeries(\n", - " [shapely.Point(1, 2), shapely.Point(2, 3), shapely.Point(3, 4)]\n", + "geo_points = bigframes.geopandas.GeoSeries(\n", + " [point for point in first_five_points]\n", ")\n", - "\n", - "series" + "geo_points" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Retrieve the x (longitude) and y (latitude) from the series with `geo.x` and `geo.y`." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "### `geo.x`" + "### `.x`" ] }, { "cell_type": "code", - "execution_count": 24, + "execution_count": 17, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "0 1.0\n", - "1 2.0\n", - "2 3.0\n", + "0 -101.298265\n", + "1 -99.111085\n", + "2 -66.58687\n", + "3 -102.601791\n", + "4 -71.578625\n", "dtype: Float64" ] }, - "execution_count": 24, + "execution_count": 17, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "series.geo.x" + "geo_points.x" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "### `geo.y`" + "### `.y`" ] }, { "cell_type": "code", - "execution_count": 25, + "execution_count": 18, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "0 2.0\n", - "1 3.0\n", - "2 4.0\n", + "0 46.710819\n", + "1 29.353661\n", + "2 18.211152\n", + "3 38.835646\n", + "4 41.869768\n", "dtype: Float64" ] }, - "execution_count": 25, + "execution_count": 18, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "series.geo.y" + "geo_points.y" ] } ], From 8b9b0f413fe0cb5437e592ba52e09a779cfe1809 Mon Sep 17 00:00:00 2001 From: Arwa Date: Thu, 30 Jan 2025 11:02:28 -0600 Subject: [PATCH 5/5] update notebook to resolve comments --- notebooks/geo/geoseries.ipynb | 207 +++++++++++++++++++++++++++------- 1 file changed, 167 insertions(+), 40 deletions(-) diff --git a/notebooks/geo/geoseries.ipynb b/notebooks/geo/geoseries.ipynb index 15959cdd32..160d19ce91 100644 --- a/notebooks/geo/geoseries.ipynb +++ b/notebooks/geo/geoseries.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 21, + "execution_count": 1, "metadata": {}, "outputs": [], "source": [ @@ -30,7 +30,7 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": 2, "metadata": {}, "outputs": [], "source": [ @@ -45,14 +45,23 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Load the Counties table from Census Bureau US Boundaries dataset" + "### Load the Counties table from the Census Bureau US Boundaries dataset" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 3, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/usr/local/google/home/arwas/src1/python-bigquery-dataframes/bigframes/session/_io/bigquery/read_gbq_table.py:274: DefaultIndexWarning: Table 'bigquery-public-data.geo_us_boundaries.counties' is clustered and/or partitioned, but BigQuery DataFrames was not able to find a suitable index. To avoid this warning, set at least one of: `index_col` or `filters`.\n", + " warnings.warn(msg, category=bfe.DefaultIndexWarning)\n" + ] + } + ], "source": [ "df = bpd.read_gbq(\"bigquery-public-data.geo_us_boundaries.counties\")" ] @@ -66,7 +75,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 4, "metadata": {}, "outputs": [], "source": [ @@ -77,40 +86,47 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Retrieve the first five geo points with `.head()`" + "## The `GeoSeries` constructor accepts local data or a `bigframes.pandas.Series` object." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### 1. Create a GeoSeries from local data with `Peek`" ] }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 12, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "0 POINT (-101.29826 46.71082)\n", - "1 POINT (-99.11108 29.35366)\n", - "2 POINT (-66.58687 18.21115)\n", - "3 POINT (-102.60179 38.83565)\n", - "4 POINT (-71.57862 41.86977)\n", + "54 POINT (-93.47523 45.00612)\n", + "256 POINT (-89.60507 42.67552)\n", + "266 POINT (-104.11408 39.31516)\n", + "485 POINT (-91.23193 32.34688)\n", + "765 POINT (-83.42808 38.20427)\n", "Name: int_point_geom, dtype: geometry" ] }, - "execution_count": 14, + "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "first_five_points = point_geom_series.head()\n", - "first_five_points" + "five_geo_points = point_geom_series.peek(n = 5)\n", + "five_geo_points" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "### Convert the first five geo points to `bigframes.gopandas.GeoSeries`" + "### Convert the five geo points to `bigframes.gopandas.GeoSeries`" ] }, { @@ -122,28 +138,28 @@ }, { "cell_type": "code", - "execution_count": 20, + "execution_count": 6, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "0 POINT (-101.29826 46.71082)\n", - "1 POINT (-99.11108 29.35366)\n", - "2 POINT (-66.58687 18.21115)\n", - "3 POINT (-102.60179 38.83565)\n", - "4 POINT (-71.57862 41.86977)\n", + "0 POINT (-86.87338 38.37334)\n", + "1 POINT (-118.48037 46.25461)\n", + "2 POINT (-92.5617 32.30429)\n", + "3 POINT (-83.46189 39.55525)\n", + "4 POINT (-119.46779 47.21363)\n", "dtype: geometry" ] }, - "execution_count": 20, + "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "geo_points = bigframes.geopandas.GeoSeries(\n", - " [point for point in first_five_points]\n", + " [point for point in five_geo_points]\n", ")\n", "geo_points" ] @@ -152,7 +168,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Retrieve the x (longitude) and y (latitude) from the series with `geo.x` and `geo.y`." + "### Retrieve the x (longitude) and y (latitude) from the GeoSeries with `.x` and `.y`." ] }, { @@ -164,21 +180,21 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 7, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "0 -101.298265\n", - "1 -99.111085\n", - "2 -66.58687\n", - "3 -102.601791\n", - "4 -71.578625\n", + "0 -86.873385\n", + "1 -118.48037\n", + "2 -92.5617\n", + "3 -83.461893\n", + "4 -119.467788\n", "dtype: Float64" ] }, - "execution_count": 17, + "execution_count": 7, "metadata": {}, "output_type": "execute_result" } @@ -196,21 +212,21 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": 8, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "0 46.710819\n", - "1 29.353661\n", - "2 18.211152\n", - "3 38.835646\n", - "4 41.869768\n", + "0 38.373344\n", + "1 46.254606\n", + "2 32.30429\n", + "3 39.555246\n", + "4 47.213633\n", "dtype: Float64" ] }, - "execution_count": 18, + "execution_count": 8, "metadata": {}, "output_type": "execute_result" } @@ -218,6 +234,117 @@ "source": [ "geo_points.y" ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### 2. Alternatively, use the `.geo` accessor to access GeoSeries methods from a `bigframes.pandas.Series` object." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#### `geo.x`" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "0 -101.298265\n", + "1 -99.111085\n", + "2 -66.58687\n", + "3 -102.601791\n", + "4 -71.578625\n", + "5 -88.961529\n", + "6 -87.492986\n", + "7 -82.422666\n", + "8 -100.208166\n", + "9 -85.815939\n", + "10 -101.681133\n", + "11 -119.516659\n", + "12 -89.398306\n", + "13 -107.78848\n", + "14 -91.159306\n", + "15 -113.887042\n", + "16 -83.470416\n", + "17 -98.520146\n", + "18 -83.911718\n", + "19 -87.321865\n", + "20 -91.727626\n", + "21 -93.466093\n", + "22 -101.143324\n", + "23 -78.657634\n", + "24 -94.272323\n", + "dtype: Float64" + ] + }, + "execution_count": 13, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "point_geom_series.geo.x" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#### `geo.y`" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "0 46.710819\n", + "1 29.353661\n", + "2 18.211152\n", + "3 38.835646\n", + "4 41.869768\n", + "5 39.860237\n", + "6 36.892059\n", + "7 38.143642\n", + "8 34.524623\n", + "9 30.862007\n", + "10 40.180165\n", + "11 46.228125\n", + "12 36.054196\n", + "13 38.154731\n", + "14 38.761902\n", + "15 44.928506\n", + "16 30.447232\n", + "17 29.448671\n", + "18 42.602532\n", + "19 34.529776\n", + "20 33.957675\n", + "21 42.037538\n", + "22 29.875285\n", + "23 36.299884\n", + "24 44.821657\n", + "dtype: Float64" + ] + }, + "execution_count": 14, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "point_geom_series.geo.y" + ] } ], "metadata": {