Inserting data into the new data tables

Once the database has been created and the database tables have been defined and created within the database, the data can be added. A second script, Chapter11_1.py, will be used to find and read the data contained within the downloaded shapefiles and for loops will be used to read through the data and write it to the respective database table. An SQLAlchemy session manager will be used to query and commit data to the tables.

Get Mastering Geospatial Analysis with Python now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.