Errata

DuckDB: Up and Running

Errata for DuckDB: Up and Running

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted by Date submitted
O'Reilly learning platform Page Chapter 3. Geospatial Analytics > Displaying all Airports on the Map > conversion df_to_gdf() functi
You can now perform the conversion using the df_to_gdf() function:

Error in the code or missing python package modules depending on the python version. My python version is Python 3.10.14:

1. update from df_airports to df
```
import leafmap
df_airports_gdf = leafmap.df_to_gdf(df_airports,
geometry = 'geometry',
src_crs="EPSG:4326",
dst_crs="EPSG:4326")
```
When running the above code, getting the following error

```
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
Cell In[25], line 4
1 import leafmap
3 df_airports_gdf = leafmap.df_to_gdf(
----> 4 df_airports, geometry="geometry", src_crs="EPSG:4326", dst_crs="EPSG:4326"
5 )

NameError: name 'df_airports' is not defined
```
the data fame argument mentioned in this code is df_airports. However, the loaded dataframe name is `df`

2. mention to `pip install geopandas` along with leafmap

```
ModuleNotFoundError: No module named 'geopandas'
```

!pip install geopandas and run the code. it worked!

3. mention to `!pip install mapclassify` to explore the df_airports_gdf.explore()
getting `ModuleNotFoundError: No module named 'mapclassify'` after running df_airports_gdf.explore()

Raghuvamsi Ayapilla  Jul 16, 2024