Skip to content

Instantly share code, notes, and snippets.

@lmeulen
Created May 25, 2021 19:29
Show Gist options
  • Save lmeulen/90a9f1673c79b47388aa38e07a04891e to your computer and use it in GitHub Desktop.
Save lmeulen/90a9f1673c79b47388aa38e07a04891e to your computer and use it in GitHub Desktop.
UT2ALL_create_gpd
segments_df['line'] = segments_df.apply(lambda x: LineString([Point(x["lon_x"], x["lat_x"]),
Point(x["lon_y"], x["lat_y"])]),
axis=1)
geodata = gpd.GeoDataFrame(segments_df, geometry=segments_df['line'])
geodata['width'] = 5 * (geodata['count']) / (geodata['count'].max())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment