how to map longitude and latitude in python

Solutions on MaxInterview for how to map longitude and latitude in python by the best coders in the world

showing results for - "how to map longitude and latitude in python"
Bladen
29 Aug 2016
1from shapely.geometry import Point
2import geopandas as gpd
3from geopandas import GeoDataFrame
4
5df = pd.read_csv("Long_Lats.csv", delimiter=',', skiprows=0, low_memory=False)
6
7geometry = [Point(xy) for xy in zip(df['Longitude'], df['Latitude'])]
8gdf = GeoDataFrame(df, geometry=geometry)   
9
10#this is a simple map that goes with geopandas
11world = gpd.read_file(gpd.datasets.get_path('naturalearth_lowres'))
12gdf.plot(ax=world.plot(figsize=(10, 6)), marker='o', color='red', markersize=15);
Julián
06 Jan 2018
1import matplotlib.pyplot as plt
2plt.scatter(x=df['Longitude'], y=df['Latitude'])
3plt.show()