.. datasets.load_sample_data:


pygmt.datasets.load_sample_data
===============================


.. code::

	pygmt.datasets.load_sample_data(name)
	


Chargez un exemple d'ensemble de données à partir du serveur GMT.

Les données sont téléchargées dans un répertoire cache (généralement `~/.gmt/cache`) la première fois que vous appelez cette fonction. Ensuite, il chargera les données du cache. Vous aurez donc besoin d'une connexion Internet la première fois.


Paramètres
----------

* **name** ( str ) – Nom du jeu de données à charger.

Retour
------

`pandas.DataFrame` ou `xarray.DataArray` – Exemple de jeu de données chargé en tant que `pandas.DataFrame` pour les données tabulaires ou `xarray.DataArray` pour les données raster.

Exemples
--------

.. code::

	from pprint import pprint
	from pygmt.datasets import list_sample_data, load_sample_data
	# use list_sample_data to see the available datasets
	pprint(list_sample_data(), width=120)  # noqa: W505
	{'bathymetry': 'Table of ship bathymetric observations off Baja California',
	 'earth_relief_holes': 'Regional 20 arc-minutes Earth relief grid with holes',
	 'fractures': 'Table of hypothetical fracture lengths and azimuths',
	 'hotspots': 'Table of locations, names, and symbol sizes of hotpots from Müller et al. (1993)',
	 'japan_quakes': 'Table of earthquakes around Japan from the NOAA NGDC database',
	 'mars_shape': 'Table of topographic signature of the hemispheric dichotomy of Mars from Smith and Zuber (1996)',
	 'maunaloa_co2': 'Table of CO2 readings from Mauna Loa',
	 'notre_dame_topography': 'Table 5.11 in Davis: Statistics and Data Analysis in Geology',
	 'ocean_ridge_points': 'Table of ocean ridge points for the entire world',
	 'rock_compositions': 'Table of rock sample compositions',
	 'usgs_quakes': 'Table of earthquakes from the USGS'}
	# load the sample bathymetry dataset
	data = load_sample_data("bathymetry")