.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "sample_data/britain_magnetic.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_britain_magnetic.py: Total Field Magnetic Anomaly from Great Britain ================================================ These data are a complete airborne survey of the entire Great Britain conducted between 1955 and 1965. The data are made available by the British Geological Survey (BGS) through their `geophysical data portal `__. License: `Open Government License `__ The columns of the data table are longitude, latitude, total-field magnetic anomaly (nanoTesla), observation height relative to the WGS84 datum (in meters), survey area, and line number and line segment for each data point. Latitude, longitude, and elevation data converted from original OSGB36 (epsg:27700) coordinate system to WGS84 (epsg:4326) using to_crs function in GeoPandas. See the original data for more processing information. If the file isn't already in your data directory, it will be downloaded automatically. .. GENERATED FROM PYTHON SOURCE LINES 32-70 .. image:: /sample_data/images/sphx_glr_britain_magnetic_001.png :alt: Magnetic data from Great Britain :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out Out: .. code-block:: none survey_area line-number-segment ... altitude_m total_field_anomaly_nt 0 CA55_NORTH FL1-1 ... 842.0 62 1 CA55_NORTH FL1-1 ... 713.0 56 2 CA55_NORTH FL1-1 ... 364.0 30 3 CA55_NORTH FL1-1 ... 364.0 31 4 CA55_NORTH FL1-1 ... 370.0 44 ... ... ... ... ... ... 541503 HG65 FL-3(TL10-24)-1 ... 1084.0 64 541504 HG65 FL-3(TL10-24)-1 ... 1098.0 74 541505 HG65 FL-3(TL10-24)-1 ... 1088.0 94 541506 HG65 FL-3(TL10-24)-1 ... 1077.0 114 541507 HG65 FL-3(TL10-24)-1 ... 1064.0 120 [541508 rows x 6 columns] | .. code-block:: default import matplotlib.pyplot as plt import cartopy.crs as ccrs import verde as vd import harmonica as hm import numpy as np # Fetch the data in a pandas.DataFrame data = hm.datasets.fetch_britain_magnetic() print(data) # Plot the observations in a Mercator map using Cartopy fig = plt.figure(figsize=(7.5, 10)) ax = plt.axes(projection=ccrs.Mercator()) ax.set_title("Magnetic data from Great Britain", pad=25) maxabs = np.percentile(data.total_field_anomaly_nt, 99) tmp = ax.scatter( data.longitude, data.latitude, c=data.total_field_anomaly_nt, s=0.001, cmap="seismic", vmin=-maxabs, vmax=maxabs, transform=ccrs.PlateCarree(), ) plt.colorbar( tmp, ax=ax, label="total field magnetic anomaly [nT]", orientation="vertical", aspect=50, shrink=0.7, pad=0.1, ) ax.set_extent(vd.get_region((data.longitude, data.latitude))) ax.gridlines(draw_labels=True) ax.coastlines(resolution="50m") plt.show() .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 6.953 seconds) .. _sphx_glr_download_sample_data_britain_magnetic.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: britain_magnetic.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: britain_magnetic.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_