Skip to content

SWO Ecoplot

sknnr.datasets.load_swo_ecoplot

load_swo_ecoplot(return_X_y: Literal[False] = False, as_frame: Literal[False] = False) -> Dataset[NDArray[float64]]
load_swo_ecoplot(return_X_y: Literal[False] = ..., as_frame: Literal[True] = ...) -> Dataset[DataFrame]
load_swo_ecoplot(return_X_y: Literal[True] = ..., as_frame: Literal[False] = ...) -> tuple[NDArray[float64], NDArray[float64]]
load_swo_ecoplot(return_X_y: Literal[True] = ..., as_frame: Literal[True] = ...) -> tuple[DataFrame, DataFrame]
load_swo_ecoplot(return_X_y: bool = False, as_frame: bool = False) -> Dataset[NDArray[float64]] | Dataset[DataFrame] | tuple[NDArray[float64], NDArray[float64]] | tuple[DataFrame, DataFrame]

Load the southwest Oregon (SWO) USFS Region 6 Ecoplot dataset.

The dataset contains 3,005 plots with environmental, Landsat, and forest cover measurements. Ocular measurements of tree cover (COV) are categorized by major tree species present in southwest Oregon. All data were collected in 2000 and Landsat imagery processed through the CCDC algorithm was extracted for the same year.

Parameters:

Name Type Description Default
return_X_y bool

If True, return the data and target as NumPy arrays instead of a Dataset.

False
as_frame bool

If True, the data and target attributes of the returned Dataset will be DataFrames instead of NumPy arrays. The frame attribute will also be added as a DataFrame with the dataset index. Pandas must be installed for this option.

False

Returns:

Type Description
Dataset or tuple of ndarray

A Dataset object containing the data, target, and feature names. If return_X_y is True, return a tuple of data and target arrays instead.

Notes

These data are a subset of the larger USDA Forest Service Region 6 Ecoplot database, which holds 28,000 plots on Region 6 National Forests across Oregon and Washington. The larger database is managed by Patricia Hochhalter (USFS Region 6 Ecology Program) and used by permission. Ecoplots were originally used to develop plant association guides and are used for a wide array of applications. This subset represents plots that were collected in southwest Oregon in 2000.

Reference

Atzet, T, DE White, LA McCrimmon, PA Martinez, PR Fong, and VD Randall. 1996. Field guide to the forested plant associations of southwestern Oregon. USDA Forest Service. Pacific Northwest Region, Technical Paper R6-NR-ECOL-TP-17-96.

Source code in src/sknnr/datasets/_base.py
def load_swo_ecoplot(
    return_X_y: bool = False, as_frame: bool = False
) -> (
    Dataset[NDArray[np.float64]]
    | Dataset[pd.DataFrame]
    | tuple[NDArray[np.float64], NDArray[np.float64]]
    | tuple[pd.DataFrame, pd.DataFrame]
):
    """Load the southwest Oregon (SWO) USFS Region 6 Ecoplot dataset.

    The dataset contains 3,005 plots with environmental, Landsat, and forest cover
    measurements. Ocular measurements of tree cover (COV) are categorized by
    major tree species present in southwest Oregon.  All data were collected in 2000
    and Landsat imagery processed through the CCDC algorithm was extracted for the
    same year.

    Parameters
    ----------
    return_X_y : bool, default=False
        If True, return the data and target as NumPy arrays instead of a Dataset.
    as_frame : bool, default=False
        If True, the `data` and `target` attributes of the returned Dataset will be
        DataFrames instead of NumPy arrays. The `frame` attribute will also be added as
        a DataFrame with the dataset index. Pandas must be installed for this
        option.

    Returns
    -------
    Dataset or tuple of ndarray
        A Dataset object containing the data, target, and feature names. If return_X_y
        is True, return a tuple of data and target arrays instead.

    Notes
    -----
    These data are a subset of the larger USDA Forest Service Region 6 Ecoplot
    database, which holds 28,000 plots on Region 6 National Forests across Oregon
    and Washington.  The larger database is managed by Patricia Hochhalter (USFS Region
    6 Ecology Program) and used by permission.  Ecoplots were originally used to
    develop plant association guides and are used for a wide array of applications.
    This subset represents plots that were collected in southwest Oregon in 2000.

    Reference
    ---------
    Atzet, T, DE White, LA McCrimmon, PA Martinez, PR Fong, and VD Randall. 1996.
    Field guide to the forested plant associations of southwestern Oregon.
    USDA Forest Service. Pacific Northwest Region, Technical Paper R6-NR-ECOL-TP-17-96.
    """
    return load_dataset_from_csv_filenames(
        data_filename="swo_ecoplot_env.csv",
        target_filename="swo_ecoplot_spp.csv",
        return_X_y=return_X_y,
        as_frame=as_frame,
    )