Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Sven Eggimann
committed
Sep 28, 2018
1 parent
7b640ef
commit b3bb4c6
Showing
8 changed files
with
222 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,8 @@ | ||
import pandas as pd | ||
import geopandas | ||
from shapely.geometry import Point | ||
import matplotlib.pyplot as plt | ||
|
||
df = pd.DataFrame( | ||
{'City': ['Buenos Aires', 'Brasilia', 'Santiago', 'Bogota', 'Caracas'], | ||
'Country': ['Argentina', 'Brazil', 'Chile', 'Colombia', 'Venezuela'], | ||
'Latitude': [-34.58, -15.78, -33.45, 4.60, 10.48], | ||
'Longitude': [-58.66, -47.91, -70.66, -74.08, -66.86]}) | ||
|
||
df['Coordinates'] = list(zip(df.Longitude, df.Latitude)) | ||
|
||
|
||
df['Coordinates'] = df['Coordinates'].apply(Point) | ||
|
||
gdf = geopandas.GeoDataFrame(df, geometry='Coordinates') | ||
|
||
world = geopandas.read_file(geopandas.datasets.get_path('naturalearth_lowres')) | ||
|
||
|
||
# We restrict to South America. | ||
#ax = world[world.continent == 'South America'].plot( | ||
# color='white', edgecolor='black') | ||
ax = world[world.name == "United Kingdom"].plot( | ||
color='white', edgecolor='black') | ||
#uk = world[world.name == "United Kingdom"] | ||
|
||
# We can now plot our GeoDataFrame. | ||
gdf.plot(ax=ax, color='red') | ||
|
||
plt.show() | ||
import math | ||
import numpy as np | ||
import matplotlib.pyplot as plt | ||
import pylab | ||
from scipy.interpolate import interp1d | ||
from scipy.interpolate import spline | ||
|
||
print("aa") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.