.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gallery/sierra-negra-topography.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_gallery_sierra-negra-topography.py: Topography of the 2018 lava flows of the Sierra Negra volcano, Ecuador ---------------------------------------------------------------------- This is a structure-from-motion point cloud of the 2018 lava flows of the Sierra Negra volcano, located on the Galápagos islands, Ecuador. The survey covers a small region at the flank of the volcano and shows different structures and terrain roughness on the lava flows. **Original source:** `Carr, B. (2020). Sierra Negra Volcano (TIR Flight 3): Galápagos, Ecuador, October 22 2018. Distributed by OpenTopography. `__ **Pre-processing:** `Source code for preparation of the original dataset for redistribution in Ensaio `__ .. GENERATED FROM PYTHON SOURCE LINES 25-30 .. code-block:: default import pandas as pd import pygmt import ensaio .. GENERATED FROM PYTHON SOURCE LINES 31-32 Download and cache the data and return the path to it on disk .. GENERATED FROM PYTHON SOURCE LINES 32-35 .. code-block:: default fname = ensaio.fetch_sierra_negra_topography(version=1) print(fname) .. rst-class:: sphx-glr-script-out Out: .. code-block:: none /home/runner/work/_temp/cache/ensaio/v1/sierra-negra-topography.csv.xz .. GENERATED FROM PYTHON SOURCE LINES 36-37 Load the CSV formatted data with pandas .. GENERATED FROM PYTHON SOURCE LINES 37-40 .. code-block:: default data = pd.read_csv(fname) data .. raw:: html
longitude latitude elevation_m
0 -91.115651 -0.783062 930.1
1 -91.115658 -0.783056 930.7
2 -91.115649 -0.783060 930.3
3 -91.115656 -0.783063 929.7
4 -91.115655 -0.783068 929.2
... ... ... ...
1731379 -91.118421 -0.781943 990.7
1731380 -91.118303 -0.781933 990.2
1731381 -91.118357 -0.781971 992.4
1731382 -91.118354 -0.781940 991.2
1731383 -91.118374 -0.781945 991.4

1731384 rows × 3 columns



.. GENERATED FROM PYTHON SOURCE LINES 41-42 Make a PyGMT map with the data points colored by the elevation. .. GENERATED FROM PYTHON SOURCE LINES 42-59 .. code-block:: default fig = pygmt.Figure() fig.basemap( region=[ data.longitude.min(), data.longitude.max(), data.latitude.min(), data.latitude.max(), ], projection="M15c", frame=True, ) pygmt.makecpt(cmap="viridis", series=[data.elevation_m.min(), data.elevation_m.max()]) fig.plot( x=data.longitude, y=data.latitude, color=data.elevation_m, cmap=True, style="c0.01c" ) fig.colorbar(frame='af+l"elevation [m]"') fig.show() .. image-sg:: /gallery/images/sphx_glr_sierra-negra-topography_001.png :alt: sierra negra topography :srcset: /gallery/images/sphx_glr_sierra-negra-topography_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out Out: .. code-block:: none .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 1 minutes 15.660 seconds) .. _sphx_glr_download_gallery_sierra-negra-topography.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: sierra-negra-topography.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: sierra-negra-topography.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_