Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@seumasmorrison
Created June 19, 2017 15:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save seumasmorrison/ade685b67b79bc0a562ea0937be388ef to your computer and use it in GitHub Desktop.
Save seumasmorrison/ade685b67b79bc0a562ea0937be388ef to your computer and use it in GitHub Desktop.
from geopandas import GeoDataFrame
from shapely.geometry import Point
geometry = [Point(xy) for xy in zip(df.Lon, df.Lat)]
df = df.drop(['Lon', 'Lat'], axis=1)
crs = {'init': 'epsg:4326'}
geo_df = GeoDataFrame(df, crs=crs, geometry=geometry)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment