May 2019
Beginner
170 pages
4h 9m
English
The restaurant dataset is in GeoJSON format and therefore we do not need to convert it into GeoDataFrame but rather can read it directly with GeoPandas. Let's do that. The data comes with 22 columns and, therefore, it will be difficult to read the first five rows in the way that we normally do in this book. We will only read the first two rows and transpose the output to fit it into the screen:
# Read the data as GeoDataFramegeoplaces = gpd.read_file('RCdata/geoplaces.geojson')geoplaces.head(2).T
Here is the output of the first two rows transposed. The columns are now displayed as rows and vice versa. This data comes in 130 rows, matching placeID in the ratings datasets:
Since we have a geometry column ...
Read now
Unlock full access