Gallery
=======

Here's a list of examples on how to use xarray. We will be adding more examples soon.
Contributions are highly welcomed and appreciated. So, if you are interested in contributing, please consult the
:doc:`contributing` guide.



Notebook Examples
-----------------

.. panels::
    :column: text-center col-lg-6 col-md-6 col-sm-12 col-xs-12 p-2
    :card: +my-2
    :img-top-cls: w-75 m-auto p-2
    :body: d-none

    ---
    :img-top: _static/thumbnails/toy-weather-data.png
    ++++
    .. link-button:: examples/weather-data
        :type: ref
        :text: Toy weather data
        :classes: btn-outline-dark btn-block stretched-link

    ---
    :img-top: _static/thumbnails/monthly-means.png
    ++++
    .. link-button:: examples/monthly-means
        :type: ref
        :text: Calculating Seasonal Averages from Timeseries of Monthly Means
        :classes: btn-outline-dark btn-block stretched-link

    ---
    :img-top: _static/thumbnails/area_weighted_temperature.png
    ++++
    .. link-button:: examples/area_weighted_temperature
        :type: ref
        :text: Compare weighted and unweighted mean temperature
        :classes: btn-outline-dark btn-block stretched-link

    ---
    :img-top: _static/thumbnails/multidimensional-coords.png
    ++++
    .. link-button:: examples/multidimensional-coords
        :type: ref
        :text: Working with Multidimensional Coordinates
        :classes: btn-outline-dark btn-block stretched-link

    ---
    :img-top: _static/thumbnails/visualization_gallery.png
    ++++
    .. link-button:: examples/visualization_gallery
        :type: ref
        :text: Visualization Gallery
        :classes: btn-outline-dark btn-block stretched-link

    ---
    :img-top: _static/thumbnails/ROMS_ocean_model.png
    ++++
    .. link-button:: examples/ROMS_ocean_model
        :type: ref
        :text: ROMS Ocean Model Example
        :classes: btn-outline-dark btn-block stretched-link

    ---
    :img-top: _static/thumbnails/ERA5-GRIB-example.png
    ++++
    .. link-button:: examples/ERA5-GRIB-example
        :type: ref
        :text: GRIB Data Example
        :classes: btn-outline-dark btn-block stretched-link

    ---
    :img-top: _static/dataset-diagram-square-logo.png
    ++++
    .. link-button:: examples/apply_ufunc_vectorize_1d
        :type: ref
        :text: Applying unvectorized functions with apply_ufunc
        :classes: btn-outline-dark btn-block stretched-link


.. toctree::
    :maxdepth: 1
    :hidden:

    examples/weather-data
    examples/monthly-means
    examples/area_weighted_temperature
    examples/multidimensional-coords
    examples/visualization_gallery
    examples/ROMS_ocean_model
    examples/ERA5-GRIB-example
    examples/apply_ufunc_vectorize_1d


External Examples
-----------------


.. panels::
    :column: text-center col-lg-6 col-md-6 col-sm-12 col-xs-12 p-2
    :card: +my-2
    :img-top-cls: w-75 m-auto p-2
    :body: d-none

    ---
    :img-top: _static/dataset-diagram-square-logo.png
    ++++
    .. link-button:: https://corteva.github.io/rioxarray/stable/examples/examples.html
        :type: url
        :text: Managing raster data with rioxarray
        :classes: btn-outline-dark btn-block stretched-link

    ---
    :img-top: https://avatars.githubusercontent.com/u/60833341?s=200&v=4
    ++++
    .. link-button:: https://gallery.pangeo.io/
        :type: url
        :text: Xarray and dask on the cloud with Pangeo
        :classes: btn-outline-dark btn-block stretched-link

    ---
    :img-top: _static/dataset-diagram-square-logo.png
    ++++
    .. link-button:: https://examples.dask.org/xarray.html
        :type: url
        :text: Xarray with Dask Arrays
        :classes: btn-outline-dark btn-block stretched-link
