From the course: Geospatial Data Analytics Essential Training

Unlock this course with a free trial

Join today to access over 25,300 courses taught by industry experts.

Turning tabular data into geospatial

Turning tabular data into geospatial - Python Tutorial

From the course: Geospatial Data Analytics Essential Training

Turning tabular data into geospatial

- In this section, we move away from human demographics a bit, and get to know a large scale data set, capturing the green environment of New York City. Namely, we parse and transform a large point database containing the location of New York City trees coming from the open data tree sensors data file, and turn this into a geopandas data frame with the help of shapely. First, let's import Pandas and then bring in the tabular dataset. To ensure that there are notebook runs efficiently, now, we will only analyze the first 10,000 rows representing the first 10,000 trees within the dataset. We can specify this when reading the data using the in rose perimeter. Of course, if you want to challenge, you can do it with the entire dataset. It will just take much longer. This might be useful if you want a really accurate dataset for your project. So now, let's import pandas under the as pd. Now, I copy the file name and use the usual CSV reading comment of pandas. Once we have the data frame…

Contents