import geopandas as gpd
from sqlalchemy import create_engine
# Create a connection
# Create Connector engine
engine = create_engine(f'postgresql://USER:PASWORD@ADDRESS:PORT
/DATABASE?gssencmode=disable')
# Create SQL Query
sql = “SELECT name, host_name, room_type, price,
reviews_per_month, neighbourhood, geom FROM public.listings”
# Read the data with Geopandas
listings = gpd.GeoDataFrame.from_postgis(sql, engine,
geom_col=’geom’ )
listings.head()