.. image:: https://img.shields.io/pypi/v/viresclient :target: https://pypi.org/project/viresclient/ :alt: PyPI
.. image:: https://img.shields.io/conda/vn/conda-forge/viresclient :target: https://anaconda.org/conda-forge/viresclient :alt: Conda
.. image:: https://readthedocs.org/projects/viresclient/badge/?version=latest :target: http://viresclient.readthedocs.io/ :alt: Documentation Status
.. image:: https://zenodo.org/badge/138034133.svg :target: https://zenodo.org/badge/latestdoi/138034133
::
pip install viresclient
::
conda install -c conda-forge viresclient
viresclient is a Python package which connects to a VirES server, of which there are two: VirES for Swarm (https://vires.services) and VirES for Aeolus (https://aeolus.services), through the WPS interface. This package handles product requests and downloads, enabling easy access to data and models from ESA's Earth Explorer missions, Swarm and Aeolus. This service is provided for ESA by EOX. For enquiries about the service and problems with accessing your account, please email info@vires.services. For help with usage, please email ashley.smith@ed.ac.uk (for Swarm data) or raise an issue on GitHub
.
.. _viresclient: https://github.com/ESA-VirES/VirES-Python-Client
.. _WPS: http://www.opengeospatial.org/standards/wps
.. _Swarm: https://earth.esa.int/eogateway/missions/swarm
.. _Aeolus: https://earth.esa.int/eogateway/missions/aeolus
.. EOX: https://eox.at/category/vires/
.. raise an issue on GitHub
: https://github.com/ESA-VirES/VirES-Python-Client/issues
For code recipes and more, see Swarm Notebooks
& Aeolus Notebooks
. To start experimenting right away, viresclient is installed on the "Virtual Research Environment" (VRE), which is a managed Jupyter-based system provided for ESA by EOX. The service is free and open to all, accessible through your VirES account - check the notebooks to read more and get started.
.. Swarm Notebooks
: https://notebooks.vires.services
.. Aeolus Notebooks
: https://notebooks.aeolus.services
Data and models are processed on demand on the VirES server - a combination of measurements from any time interval can be accessed. These are the same data that can be accessed by the VirES GUI. viresclient handles the returned data to allow direct loading as a single pandas.DataFrame, or xarray.Dataset.
.. _pandas.DataFrame: https://pandas.pydata.org/pandas-docs/stable/dsintro.html#dataframe .. _xarray.Dataset: http://xarray.pydata.org/en/stable/data-structures.html#dataset
.. code-block:: python
from viresclient import SwarmRequest
request = SwarmRequest()
request.set_collection("SW_OPER_MAGA_LR_1B")
request.set_products( measurements=["F", "B_NEC"], models=["CHAOS-Core"], auxiliaries=["QDLat", "QDLon"], sampling_step="PT10S" )
data = request.get_between( start_time="2014-01-01T00:00", end_time="2014-01-01T01:00" )
ds = data.as_xarray()
::