Advertisement
Guest User

Untitled

a guest
Apr 5th, 2019
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. #connect to wpg homicides database
  2. con = psycopg2.connect(dbname="wpg_homicides", user="postgres", password="password")
  3.  
  4. #import city grid polygon
  5. sql_grid = 'SELECT id, geom FROM grid'
  6. grid = gpd.GeoDataFrame.from_postgis(sql_grid, con, geom_col='geom')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement