def NDBI(ds):
    """
    Computes the Normalized Difference Built-up Index for an `xarray.Dataset`.
    The formula is (SWIR1 - NIR) / (SWIR1 + NIR).
    Values should be in the range [-1,1] for valid LANDSAT data (swir1 and nir are positive).

    This is a spectral index for which high values often indicate urban areas.
    Note that DBSI often performs better in arid and semi-arid environments, since
    NDBI does not differentiate bare soil from urban areas well.

    Parameters
    ----------
    ds: xarray.Dataset
        An `xarray.Dataset` that must contain 'swir1' and 'nir' `DataArrays`.

    Returns
    -------
    ndbi: xarray.DataArray
        An `xarray.DataArray` with the same shape as `ds` - the same coordinates in
        the same order.y
    """
    return (ds.swir1 - ds.nir) / (ds.swir1 + ds.nir)