Skip to content

Commit

Permalink
before adding dataset
Browse files Browse the repository at this point in the history
  • Loading branch information
carmengg committed Oct 23, 2023
1 parent 22a98fe commit 3e7c663
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
File renamed without changes.
47 changes: 47 additions & 0 deletions lectures/lesson-9-geopandas-intro.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# `geopandas`

GeoPandas is a Python library that extends the `pandas` library by adding support for geospatial data. In this lesson we will introduce the `geopandas` library to work with vector data. We will also make our first map.

To begin with, let's import `geopandas` with its standard abbreviation `gpd`:

```{python}
import geopandas as gpd
```

## Data

In this lesson we will use with point data about wild pigs (*Sus scrofa) sightings in Santa Barbara county from the [Global Biodiversity Information Facility](https://www.gbif.org).

```{python}
```

## `GeoSeries` and `GeoDataFrame`

The core data structure in GeoPandas is the `geopandas.GeoDataFrame`.
We can think of it as a `pandas.DataFrame` with a dedicated geometry column that can perform spatial operations.

The **geometry column** in a `gpd.GeoDataFrame` holds the geometry (point, polygon, etc) of each spatial feature. Columns in the `gpd.GeoDataFrame` with attributes about the features are `pandas.Series` like in a regular `pd.DataFrame`.

![Image source: GeoPandas documentation](/images/lesson-8-geopandas/dataframe.svg)

**Example**

## Geometric information


## Data wrangling


## Plotting


## Simple map

<!--
## References
[Geopandas Documentation - Introduction to GeoPandas](https://geopandas.org/en/stable/getting_started/introduction.html)
-->

0 comments on commit 3e7c663

Please sign in to comment.