Import Drillholes Data¶
In [1]:
Copied!
import geolime as geo
import geolime as geo
From Collar, Assay & Survey Files¶
Case 1 : With one Interval File → Assays only¶
In [3]:
Copied!
collar = geo.datasets.load("rocklea_dome/collar.csv")
assay = geo.datasets.load("rocklea_dome/assay.csv")
survey = geo.datasets.load("rocklea_dome/survey.csv")
hyperspec = geo.datasets.load("rocklea_dome/hyperspec.csv")
collar = geo.datasets.load("rocklea_dome/collar.csv")
assay = geo.datasets.load("rocklea_dome/assay.csv")
survey = geo.datasets.load("rocklea_dome/survey.csv")
hyperspec = geo.datasets.load("rocklea_dome/hyperspec.csv")
In [4]:
Copied!
collar.head()
collar.head()
Out[4]:
Hole_ID | X | Y | RL_AHD | Depth | |
---|---|---|---|---|---|
0 | RKD002 | 548314.8 | 7476791.8 | 467.4 | 45.2 |
1 | RKD004 | 548095.6 | 7476396.0 | 462.3 | 53.0 |
2 | RKD015 | 547905.0 | 7476800.0 | 470.0 | 41.0 |
3 | RKD005 | 547505.9 | 7475596.0 | 461.6 | 42.4 |
4 | RKD006 | 547698.1 | 7475588.5 | 458.6 | 42.5 |
In [5]:
Copied!
assay.head()
assay.head()
Out[5]:
Hole_ID | From | To | Sample_ID | Fe | Fe2o3 | P | S | SiO2 | Al2O3 | MnO | Mn | CaO | K2O | MgO | Na2O | TiO2 | LOI | LOI_100 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | RKC001 | 35.0 | 36.0 | 36.0 | 0.0 | 0 | 0 | 0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0 | 0 | 0.0 |
1 | RKC001 | 36.0 | 37.0 | 37.0 | 0.0 | 0 | 0 | 0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0 | 0 | 0.0 |
2 | RKC001 | 37.0 | 38.0 | 38.0 | 0.0 | 0 | 0 | 0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0 | 0 | 0.0 |
3 | RKC001 | 38.0 | 39.0 | 39.0 | 0.0 | 0 | 0 | 0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0 | 0 | 0.0 |
4 | RKC001 | 39.0 | 40.0 | 40.0 | 0.0 | 0 | 0 | 0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0 | 0 | 0.0 |
In [6]:
Copied!
survey.head()
survey.head()
Out[6]:
Hole_ID | Distance | Azi_mag | Dip | |
---|---|---|---|---|
0 | RKD002 | 0 | 0 | -90 |
1 | RKD015 | 0 | 0 | -90 |
2 | RKD005 | 0 | 0 | -90 |
3 | RKD006 | 0 | 0 | -90 |
4 | RKD004 | 0 | 0 | -90 |
In [7]:
Copied!
dh = geo.create_drillholes(
name="RCK",
collar=collar,
assays=assay,
survey=survey,
method="Tangential",
dip_convention="NEGATIVE"
)
dh = geo.create_drillholes(
name="RCK",
collar=collar,
assays=assay,
survey=survey,
method="Tangential",
dip_convention="NEGATIVE"
)
2024-10-30 13:34:09,680 [INFO] GeoLime Project - |GEOLIME|.drillholes_api.py : Following mapping has been identified: {
"HOLEID": "Hole_ID",
"X_COLLAR": "X",
"Y_COLLAR": "Y",
"Z_COLLAR": "RL_AHD",
"AZIMUTH": "Azi_mag",
"DEPTH_SURVEY": "Distance",
"DIP": "Dip",
"FROM": "From",
"TO": "To"
}
In [8]:
Copied!
geo.plot(dh, property="Fe", agg_method="mean", width=650, height=400)
geo.plot(dh, property="Fe", agg_method="mean", width=650, height=400)
Case 2 : With multiple Interval Files → Assays & HyperSpectral¶
In [9]:
Copied!
dh = geo.create_drillholes(
name="RCK",
collar=collar,
assays=[assay, hyperspec],
survey=survey,
method="Tangential",
dip_convention="NEGATIVE"
)
dh = geo.create_drillholes(
name="RCK",
collar=collar,
assays=[assay, hyperspec],
survey=survey,
method="Tangential",
dip_convention="NEGATIVE"
)
2024-10-30 13:34:11,328 [INFO] GeoLime Project - |GEOLIME|.drillholes_api.py : Following mapping has been identified: {
"HOLEID": "Hole_ID",
"X_COLLAR": "X",
"Y_COLLAR": "Y",
"Z_COLLAR": "RL_AHD",
"AZIMUTH": "Azi_mag",
"DEPTH_SURVEY": "Distance",
"DIP": "Dip",
"FROM": "From",
"TO": "To"
}
In [10]:
Copied!
geo.plot(dh, property="Fe", agg_method="mean", width=400, height=650)
geo.plot(dh, property="Fe", agg_method="mean", width=400, height=650)
Case 3 : Setting the name of the mandatory columns¶
By default GeoLime guesses the mapping of the mandatory columns for each columns based on the name of the columns. If one wants to directly provide the correct mapping, there is the name_dictionnary
argument.
In [11]:
Copied!
dh = geo.create_drillholes(
name="RCK",
collar=collar,
assays=[assay, hyperspec],
survey=survey,
method="Tangential",
dip_convention="NEGATIVE",
name_dictionary={
"HOLEID": "Hole_ID",
"X_COLLAR": "X",
"Y_COLLAR": "Y",
"Z_COLLAR": "RL_AHD",
"AZIMUTH": "Azi_mag",
"DEPTH_SURVEY": "Distance",
"DIP": "Dip",
"FROM": "From",
"TO": "To"
}
)
dh = geo.create_drillholes(
name="RCK",
collar=collar,
assays=[assay, hyperspec],
survey=survey,
method="Tangential",
dip_convention="NEGATIVE",
name_dictionary={
"HOLEID": "Hole_ID",
"X_COLLAR": "X",
"Y_COLLAR": "Y",
"Z_COLLAR": "RL_AHD",
"AZIMUTH": "Azi_mag",
"DEPTH_SURVEY": "Distance",
"DIP": "Dip",
"FROM": "From",
"TO": "To"
}
)
From A Desurveyed File¶
In [12]:
Copied!
desurveyed_df = geo.datasets.load("rocklea_dome/desurveyed_dh.csv")
desurveyed_df = geo.datasets.load("rocklea_dome/desurveyed_dh.csv")
In [13]:
Copied!
desurveyed_df.head()
desurveyed_df.head()
Out[13]:
FROM | TO | HOLEID | X_COLLAR | Y_COLLAR | Z_COLLAR | X_M | Y_M | Z_M | X_B | ... | LOI | Fe_ox_ai | hem_over_goe | kaolin_abundance | kaolin_composition | wmAlsmai | wmAlsmci | carbai3pfit | carbci3pfit | Depth | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 0 | 1 | RKC278 | 548001.3 | 7474002.1 | 453.5 | 548001.3 | 7474002.1 | 453.0 | 548001.3 | ... | NaN | 0.1290 | 891.13 | 0.0374 | 0.999 | NaN | NaN | NaN | NaN | 47 |
1 | 1 | 2 | RKC278 | 548001.3 | 7474002.1 | 453.5 | 548001.3 | 7474002.1 | 452.0 | 548001.3 | ... | NaN | 0.1460 | 892.68 | 0.0269 | 1.006 | NaN | NaN | NaN | NaN | 47 |
2 | 2 | 3 | RKC278 | 548001.3 | 7474002.1 | 453.5 | 548001.3 | 7474002.1 | 451.0 | 548001.3 | ... | NaN | 0.1650 | 895.24 | NaN | NaN | NaN | NaN | NaN | NaN | 47 |
3 | 3 | 4 | RKC278 | 548001.3 | 7474002.1 | 453.5 | 548001.3 | 7474002.1 | 450.0 | 548001.3 | ... | NaN | 0.1000 | 893.34 | NaN | NaN | 0.0545 | 2211.83 | NaN | NaN | 47 |
4 | 4 | 5 | RKC278 | 548001.3 | 7474002.1 | 453.5 | 548001.3 | 7474002.1 | 449.0 | 548001.3 | ... | NaN | 0.0445 | 910.32 | NaN | NaN | NaN | NaN | 0.111 | 2312.89 | 47 |
5 rows × 35 columns
In [14]:
Copied!
dh = geo.drillholes_from_dataframe(name="RCK", df=desurveyed_df)
dh = geo.drillholes_from_dataframe(name="RCK", df=desurveyed_df)
In [15]:
Copied!
geo.plot(dh, property="Fe_ox_ai", agg_method="mean", width=400, height=650)
geo.plot(dh, property="Fe_ox_ai", agg_method="mean", width=400, height=650)
From GeoLime File¶
Case 1 : Loading the entire File¶
In [16]:
Copied!
file_path = "../../../geolime/datasets/rocklea_dome/dh_hyper.geo"
file_path = "../../../geolime/datasets/rocklea_dome/dh_hyper.geo"
In [17]:
Copied!
dh = geo.read_file(file_path)
dh = geo.read_file(file_path)
In [18]:
Copied!
geo.plot(dh, property="Fe_pct", agg_method="mean", width=400, height=650)
geo.plot(dh, property="Fe_pct", agg_method="mean", width=400, height=650)
Case 2 : Loading only some properties¶
For memory management GeoLime allows to only load a subset of properties of the original object
In [19]:
Copied!
dh = geo.read_file(file_path, attributes=["Fe_pct"])
dh = geo.read_file(file_path, attributes=["Fe_pct"])
In [20]:
Copied!
dh.user_properties()
dh.user_properties()
Out[20]:
['Fe_pct']