Plotly and Python: Creating Interactive Heatmaps for Petrophysical & Geological Data

<p>Interpreting the subsurface requires understanding how geological and petrophysical data varies across a region. This often involves dealing with well log measurements and interpreted properties scattered across the area, which leads to the challenge of estimating the values between these measurements.</p> <p>One way that we can estimate the values (or fill in the gaps) is by using a geostatistical method called kriging. This method estimates and extrapolates data between observed measurements and predicts values at unmeasured locations.</p> <p><a href="https://towardsdatascience.com/utilising-pykrige-and-matplotlib-for-spatial-visualisation-of-geological-variations-a288b186bfd6" rel="noopener" target="_blank"><strong>In my previous article,</strong></a>&nbsp;we focused on using&nbsp;<a href="https://github.com/GeoStat-Framework/PyKrige" rel="noopener ugc nofollow" target="_blank"><strong>pykrige</strong></a>&nbsp;and&nbsp;<a href="https://matplotlib.org/" rel="noopener ugc nofollow" target="_blank"><strong>matplotlib</strong></a>&nbsp;to map and visualise geological variation across the Norwegian continental shelf. This article will take that visualisation further and make those plots interactive.</p> <h2><a href="https://towardsdatascience.com/utilising-pykrige-and-matplotlib-for-spatial-visualisation-of-geological-variations-a288b186bfd6?source=post_page-----701c22b32e4--------------------------------" rel="noopener follow" target="_blank">Utilising pykrige and matplotlib for Spatial Visualisation of Geological Variations</a></h2> <h3><a href="https://towardsdatascience.com/utilising-pykrige-and-matplotlib-for-spatial-visualisation-of-geological-variations-a288b186bfd6?source=post_page-----701c22b32e4--------------------------------" rel="noopener follow" target="_blank">Exploring Spatial Geological Variation from Well Log Measurements</a></h3> <p><a href="https://towardsdatascience.com/utilising-pykrige-and-matplotlib-for-spatial-visualisation-of-geological-variations-a288b186bfd6?source=post_page-----701c22b32e4--------------------------------" rel="noopener follow" target="_blank">towardsdatascience.com</a></p> <h1>Quick Recap on Using Pykrige</h1> <p>Before we use Plotly, we will quickly recap the code used in the previous article so that you are up to speed with the process.</p> <p>The first step is to import the libraries that we require. In this case, we need&nbsp;<a href="https://pandas.pydata.org/" rel="noopener ugc nofollow" target="_blank"><strong>pandas</strong></a>&nbsp;for loading our csv data,&nbsp;<a href="https://github.com/GeoStat-Framework/PyKrige" rel="noopener ugc nofollow" target="_blank"><strong>pykrige</strong></a>&nbsp;to carry out the interpolation between the data points, and&nbsp;<a href="https://numpy.org/" rel="noopener ugc nofollow" target="_blank"><strong>numpy</strong></a>&nbsp;to carry out a few mathematical operations.</p> <pre> import pandas as pd from pykrige import OrdinaryKriging import numpy as np df = pd.read_csv(&#39;Data/Xeek Force 2020/Xeek_2020_Balder_DTC_AVG.csv&#39;)</pre> <p><a href="https://towardsdatascience.com/plotly-and-python-creating-interactive-heatmaps-for-petrophysical-geological-data-701c22b32e4">Website</a></p>