The time has come to apply what you have learned throughout the course by doing a micro project.
You have two options now.
Choose from our list of projects
Use your own data
US Geological Survey (USGS) provides various earthquakes data on a global scale. Its Earthquake Catalog contains earthquake source parameters (e.g. hypocenters, magnitudes, phase picks and amplitudes) and other products (e.g. moment tensor solutions, macroseismic information, tectonic summaries, maps) produced by contributing seismic networks.
If you follow this link, you can search throught the catalog and filter data by the magnitude, time and geographic region. In the data/ folder, we provide an example dataset of earthquakes with magnitude >4.5 that occurred around the world throughout the last year.
So if you want to build your project on these data, some possible ideas are:
pandas package will be most useful to read in the data, as well as analyse themcartopy or basemap to plot the data using longitude and latitude columnspandas' groupby() method, which you can use to aggregate data by time or other parameterTo get you started, we provided the minimal code to load the data.
In [1]:
# import pandas as pd
# df = pd.read_csv('../data/earthquakes_2015_2016_gt45.csv', parse_dates = ['time',], index_col='time')
# df.head()
Inspired by this blog post: https://ocefpaf.github.io/python4oceanographers/blog/2015/05/04/woa13/
If you choose to analyse these data, we recommend that you start by:
../data/ directory, there are 2 netCDF files seaice_conc_monthly* that correspond to September 1991 (original FTP link) and September 2012 (original FTP link).For this project, we recommend that you:
xarray for opening and reading the netCDF filesxarray.open_mf_dataset() to load both files at oncecartopy for creating a plot with a correct map projectionTo get started, copy the following cell into your Project notebook.
In [2]:
# import cartopy.crs as ccrs
# import matplotlib.pyplot as plt
# import xarray as xr
# %matplotlib inline
In [3]:
# ds = xr.open_mfdataset('../data/seaice_conc_monthly_*.nc')
## or
# ds1 = xr.open_dataset('../data/seaice_conc_monthly_nh_f08_199109_v02r00.nc')
# ds2 = xr.open_dataset('../data/seaice_conc_monthly_nh_f17_201209_v02r00.nc')
In [4]:
## Extract longitude and latitude values, then the sea ice concentration itself
In [5]:
## Code for creating a map
# fig = plt.figure()
# ax = fig.add_subplot(111, projection=ccrs.???(central_longitude=0))
# ax.coastlines(resolution='110m', linewidth=0.5)
# ax.gridlines()
# ax.set_extent([-180, 180, 40, 90], crs=ccrs.PlateCarree())
../data/ directory, there are several files that haven't been used in the course:met_brw_insitu_1_obop_hour_2015.txt with accompanying met_brw_readme.txt - hourly meteorological observations in Barrow, Alaska (BRW)plot_extent_n_v2.csv - daily total sea ice extent in the Arcticnorth_sea_data.csv - ship observations from several cruises in the North Sea (data provided by Matt Bone)