@@ -32,8 +32,9 @@ def list_sample_data():
32
32
"mars_shape" : "Table of topographic signature of the hemispheric dichotomy of "
33
33
" Mars from Smith and Zuber (1996)" ,
34
34
"maunaloa_co2" : "Table of CO2 readings from Mauna Loa" ,
35
- "ocean_ridge_points" : "Table of ocean ridge points for the entire world" ,
36
35
"notre_dame_topography" : "Table 5.11 in Davis: Statistics and Data Analysis in Geology" ,
36
+ "ocean_ridge_points" : "Table of ocean ridge points for the entire world" ,
37
+ "rock_compositions" : "Table of rock sample compositions" ,
37
38
"usgs_quakes" : "Table of global earthquakes from the USGS" ,
38
39
}
39
40
return names
@@ -80,6 +81,7 @@ def load_sample_data(name):
80
81
81
82
# Dictionary of private load functions
82
83
load_func = {
84
+ "rock_compositions" : _load_rock_sample_compositions ,
83
85
"earth_relief_holes" : _load_earth_relief_holes ,
84
86
"maunaloa_co2" : _load_maunaloa_co2 ,
85
87
"notre_dame_topography" : _load_notre_dame_topography ,
@@ -360,6 +362,26 @@ def load_mars_shape(**kwargs):
360
362
return data
361
363
362
364
365
+ def _load_rock_sample_compositions ():
366
+ """
367
+ Loads a table of rock sample compositions.
368
+
369
+ Returns
370
+ -------
371
+ data : pandas.DataFrame
372
+ The data table with columns "water", "air", and "limestone".
373
+ """
374
+
375
+ fname = which ("@ternary.txt" , download = "c" )
376
+ return pd .read_csv (
377
+ fname ,
378
+ delim_whitespace = True ,
379
+ header = None ,
380
+ names = ["water" , "air" , "limestone" ],
381
+ usecols = (0 , 1 , 2 ),
382
+ )
383
+
384
+
363
385
def _load_notre_dame_topography ():
364
386
"""
365
387
Load Table 5.11 in Davis: Statistics and Data Analysis in Geology.
0 commit comments