Skip to content

Latest commit

 

History

History
70 lines (34 loc) · 1.47 KB

GeoPandas_WalkThru.md

File metadata and controls

70 lines (34 loc) · 1.47 KB
Title: GeoPandas Walk Thru
Author: John Fay
Data: Spring 2020

GeoPandas Walk Thru

Data import and exploration

1. Read the Exits shapefile (downloaded in the Fetching Data exercises) into a geodataframe

2. Explore the data in the geodataframe

  • Reveal the dimensions of the geodataframe

  • Reveal the data types of each column in the geodataframe

  • Reveal the data in the Durham exits dataframe (first 5 records)

  • Plot the data

Attribute subset

3. Extract into a new geodataframe the records values in the"County" field are "Durham"

  • Method 1: Create a mask and apply the mask
  • Method 2: Query records into a new dataframe

4. Explore the Durham data as you did the entire dataset

  • Dimensions?
  • Plot?

Geometric transformation

5. Project the data to the UTM Zone 17N coordinate system

Geometric objects

5. Extract the geoseries from the geodataframe (i.e., the geometry column) into a new object

6. Convert point geoseries to single multipoint object

  • Compute the centroid of the multipoint object
  • Compute the convex hull of the multipoint object
  • Compute the area of the convex hull object

6. Group the original dataframe by county