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]:
GlaThiDa_ID POLITICAL_UNIT GLACIER_NAME SURVEY_DATE POINT_ID POINT_LAT POINT_LON ELEVATION THICKNESS THICKNESS_UNCERTAINTY DATA_FLAG REMARKS
0 33 US EASTON 19929999 1 48.767380 -121.819644 2962.0 0 NaN NaN GPR data from Finn et al., (2012). Jour. Glac....
1 33 US EASTON 19929999 2 48.764904 -121.821909 2813.0 29 NaN NaN GPR data from Finn et al., (2012). Jour. Glac....
2 33 US EASTON 19929999 3 48.761662 -121.825264 2598.0 41 NaN NaN GPR data from Finn et al., (2012). Jour. Glac....
3 33 US EASTON 19929999 4 48.757063 -121.829107 2383.0 71 NaN NaN GPR data from Finn et al., (2012). Jour. Glac....
4 33 US EASTON 19929999 5 48.753715 -121.832006 2284.0 82 NaN NaN GPR data from Finn et al., (2012). Jour. Glac....

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]:
GlaThiDa_ID POLITICAL_UNIT GLACIER_NAME SURVEY_DATE POINT_ID POINT_LAT POINT_LON ELEVATION THICKNESS THICKNESS_UNCERTAINTY DATA_FLAG REMARKS
812963 2085 CN MUZ TAW 2013 1 85.56903 47.079014 3179 0 NaN NaN The accuracy of the survey was reported as 1.18%

In [27]:
df.to_excel('c:\\users\\jlandman\\desktop\\TTT_2016_corr_restore.xlsx', index=False)

In [ ]: