class_docstr: Data storage and retrieval functionality for Earthlab.
  
  An object of this class is available upon importing earthpy as
  ``earthpy.data`` that writes data files to the path:
  ``~/earth-analytics/data/``.
  
  Parameters
  ----------
  path : string | None
      The path where data is stored. NOTE: this defaults to the directory
      ``~/earth-analytics/data/``.
  
  Examples
  --------
  List datasets that are available for download, using default object:
  
      >>> import earthpy as et
      >>> et.data
      Available Datasets: ['california-rim-fire', ...]
  
  Specify a custom directory for data downloads:
  
      >>> et.data.path = "."
      >>> et.data
      Available Datasets: ['california-rim-fire', ...]
docstr: Download and extract a compressed archive.
  
  This function downloads and extracts compressed directories to
  a local directory.
  
  Parameters
  ----------
  path : str
      Destination path of downloaded file.
  r: requests.models.Response
      URL response that can be used to get the data.
  kind : str
      Kind of file. Must be one of ALLOWED_FILE_TYPES.
  verbose : bool
      Whether to print verbose output while downloading files.
  
  
  Returns
  -------
  None
docstr_tok: ["Download","and","extract","a","compressed","archive",".","This","function","downloads","and","extracts","compressed","directories","to","a","local","directory",".","Parameters","--","--","--","--","--","path",":","str","Destination","path","of","downloaded","file",".","r",":","requests.models.Response","URL","response","that","can","be","used","to","get","the","data",".","kind",":","str","Kind","of","file",".","Must","be","one","of","ALLOWED_FILE_TYPES",".","verbose",":","bool","Whether","to","print","verbose","output","while","downloading","files",".","Returns","--","--","--","-","None"]
code: def _download_and_extract(self, path, r, kind, verbose):
      """Download and extract a compressed archive.
  
      This function downloads and extracts compressed directories to
      a local directory.
  
      Parameters
      ----------
      path : str
          Destination path of downloaded file.
      r: requests.models.Response
          URL response that can be used to get the data.
      kind : str
          Kind of file. Must be one of ALLOWED_FILE_TYPES.
      verbose : bool
          Whether to print verbose output while downloading files.
  
  
      Returns
      -------
      None
  
      """
      file_like_object = io.BytesIO(r.content)
      if kind == "zip":
          archive = zipfile.ZipFile(file_like_object)
      if kind == "tar":
          archive = tarfile.open(fileobj=file_like_object)
      if kind == "tar.gz":
          archive = tarfile.open(fileobj=file_like_object, mode="r:gz")
      os.makedirs(path, exist_ok=True)
      archive.extractall(path)
      if verbose is True:
          print("Extracted output to {}".format(path))
  
file_path: earthpy/earthpy/io.py
imports: import io
  import os
  import os.path
  import re
  import requests
  import tarfile
  import zipfile
  import earthpy
label_desc: Use image node_id 5 for calling the Data obj's underlying member method code with example usage: obj._download_and_extract(path, r, kind, verbose) without return types