.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "sample_data/california_gps.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note Click :ref:`here ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_sample_data_california_gps.py: [DEPRECATED] GPS velocities from California =========================================== .. warning:: All sample datasets in Verde are deprecated and will be **removed in Verde v2.0.0**. The tutorials/examples will transition to using `Ensaio `__ instead. We provide sample 3-component GPS velocity data from the West coast of the U.S. The data were cut from EarthScope Plate Boundary Observatory data provided by UNAVCO. The velocities are in the North American tectonic plate reference system (NAM08). The velocities and their associated standard deviations are in meters/year. .. GENERATED FROM PYTHON SOURCE LINES 24-68 .. image-sg:: /sample_data/images/sphx_glr_california_gps_001.png :alt: GPS horizontal velocities, Vertical velocity :srcset: /sample_data/images/sphx_glr_california_gps_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out Out: .. code-block:: none latitude longitude height ... std_north std_east std_up 0 34.116409 242.906804 762.11978 ... 0.0002 0.00037 0.00053 1 34.116409 242.906804 762.10883 ... 0.0002 0.00037 0.00053 2 34.116409 242.906805 762.09364 ... 0.0002 0.00037 0.00053 3 34.116409 242.906805 762.09073 ... 0.0002 0.00037 0.00053 4 34.116409 242.906805 762.07699 ... 0.0002 0.00037 0.00053 [5 rows x 9 columns] | .. code-block:: default import cartopy.crs as ccrs import matplotlib.pyplot as plt import verde as vd # The data are in a pandas.DataFrame data = vd.datasets.fetch_california_gps() print(data.head()) # Make a plot of the data using Cartopy to handle projections and coastlines crs = ccrs.PlateCarree() fig, axes = plt.subplots( 1, 2, figsize=(8, 4), subplot_kw=dict(projection=ccrs.Mercator()) ) # Plot the horizontal velocity vectors ax = axes[0] ax.set_title("GPS horizontal velocities") ax.quiver( data.longitude.values, data.latitude.values, data.velocity_east.values, data.velocity_north.values, scale=0.3, transform=crs, ) vd.datasets.setup_california_gps_map(ax) # Plot the vertical velocity ax = axes[1] ax.set_title("Vertical velocity") maxabs = vd.maxabs(data.velocity_up) tmp = ax.scatter( data.longitude, data.latitude, c=data.velocity_up, s=10, vmin=-maxabs / 3, vmax=maxabs / 3, cmap="seismic", transform=crs, ) plt.colorbar(tmp, ax=ax).set_label("meters/year") vd.datasets.setup_california_gps_map(ax) plt.show() .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 0.295 seconds) .. _sphx_glr_download_sample_data_california_gps.py: .. only :: html .. container:: sphx-glr-footer :class: sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: california_gps.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: california_gps.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_