@@ -123,3 +123,29 @@ def load_fractures_compilation():
123123 fname = which ("@fractures_06.txt" , download = "c" )
124124 data = pd .read_csv (fname , header = None , sep = r"\s+" , names = ["azimuth" , "length" ])
125125 return data [["length" , "azimuth" ]]
126+
127+
128+ def load_hotspots ():
129+ """
130+ Load a table with the locations, names, and suggested symbol sizes of
131+ hotspots.
132+
133+ This is the ``@hotspots.txt`` dataset used in the GMT tutorials, with data
134+ from Mueller, Royer, and Lawver, 1993, Geology, vol. 21, pp. 275-278. The
135+ main 5 hotspots used by Doubrovine et al. [2012] have symbol sizes twice
136+ the size of all other hotspots.
137+
138+ The data are downloaded to a cache directory (usually ``~/.gmt/cache``) the
139+ first time you invoke this function. Afterwards, it will load the data from
140+ the cache. So you'll need an internet connection the first time around.
141+
142+ Returns
143+ -------
144+ data : pandas.DataFrame
145+ The data table with columns "longitude", "latitude", "symbol_size", and
146+ "placename".
147+ """
148+ fname = which ("@hotspots.txt" , download = "c" )
149+ columns = ["longitude" , "latitude" , "symbol_size" , "place_name" ]
150+ data = pd .read_table (filepath_or_buffer = fname , sep = "\t " , skiprows = 3 , names = columns )
151+ return data
0 commit comments