In [29]:
import pandas as pd
import shapely.geometry as shpg
import matplotlib.pyplot as plt
import cartopy.crs as ccrs
import cartopy
%matplotlib inline
In [58]:
df = pd.read_csv('C:\\Users\\jlandman\\Desktop\\GlaThiDa_2016_corr_20161027\\TTT_2016_corr.csv', skiprows=2, low_memory=False)
#df = pd.read_csv('C:\\Users\\jlandman\\Desktop\\TTT_2016_corr_20161019_2.csv', skiprows=3, low_memory=False)
In [59]:
df.head()
Out[59]:
In [60]:
# plot just one point per glacier
df = df.drop_duplicates('GlaThiDa_ID')
f = plt.figure(figsize=(14, 7))
ax = plt.axes(projection=ccrs.PlateCarree())
gl = ax.gridlines(crs=ccrs.PlateCarree(), draw_labels=True,
linewidth=2, color='gray', alpha=0.5, linestyle='--')
ax.set_global()
ax.stock_img()
ax.coastlines()
ax.scatter(df.POINT_LON, df.POINT_LAT, transform=ccrs.Geodetic(), s=50, c='r', zorder=99)
ax.add_feature(cartopy.feature.COASTLINE, edgecolor='gray');
plt.tight_layout()
In [44]:
df.loc[(df.POINT_LAT>80.) & (30. <df.POINT_LON) & (df.POINT_LON<60.)]
Out[44]:
In [27]:
df.to_excel('c:\\users\\jlandman\\desktop\\TTT_2016_corr_restore.xlsx', index=False)
In [ ]: