import swisslandstats as sls ldf = sls.read_csv('data/AREA_NOAS04_72_171129.csv') # Transform the 4-category land statistics of 2009 `AS09_4` to a numpy array ldf.to_ndarray('AS09R_4') # Export the same column to a GeoTIFF ldf.to_geotiff('landstats.tiff', 'AS09R_4') # Or plot it ldf.plot('AS09R_4', cmap=sls.noas04_4_cmap, legend=True) # Clip the dataframe by a place query to OSM's Nominatim vaud_ldf = sls.clip_by_nominatim(ldf, 'Vaud, Switzerland') vaud_ldf.plot('AS09R_4', cmap=sls.noas04_4_cmap, legend=True) import matplotlib.pyplot as plt year_columns = ['85', '97', '09'] fig, axes = plt.subplots(1, 3, figsize=(15, 5)) for year_column, ax in zip(year_columns, axes): ax = vaud_ldf.plot('AS%sR_4' % year_column, cmap=sls.noas04_4_cmap, ax=ax) ax.set_title(year_column)