viresclient


Nameviresclient JSON
Version 0.11.6 PyPI version JSON
download
home_pageNone
SummaryA Python client for interacting with a VirES server
upload_time2024-01-20 20:27:03
maintainerNone
docs_urlNone
authorNone
requires_python>=3.6
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
.. 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

 # Set up connection with server
 request = SwarmRequest()
 # Set collection to use
 # - See https://viresclient.readthedocs.io/en/latest/available_parameters.html
 request.set_collection("SW_OPER_MAGA_LR_1B")
 # Set mix of products to fetch:
 #  measurements (variables from the given collection)
 #  models (magnetic model predictions at spacecraft sampling points)
 #  auxiliaries (variables available with any collection)
 # Optionally set a sampling rate different from the original data
 request.set_products(
     measurements=["F", "B_NEC"],
     models=["CHAOS-Core"],
     auxiliaries=["QDLat", "QDLon"],
     sampling_step="PT10S"
 )
 # Fetch data from a given time interval
 # - Specify times as ISO-8601 strings or Python datetime
 data = request.get_between(
     start_time="2014-01-01T00:00",
     end_time="2014-01-01T01:00"
 )
 # Load the data as an xarray.Dataset
 ds = data.as_xarray()

::

 <xarray.Dataset>
 Dimensions:           (NEC: 3, Timestamp: 360)
 Coordinates:
 * Timestamp         (Timestamp) datetime64[ns] 2014-01-01 ... 2014-01-01T00:59:50
 Dimensions without coordinates: NEC
 Data variables:
   Spacecraft        (Timestamp) <U1 'A' 'A' 'A' 'A' 'A' ... 'A' 'A' 'A' 'A'
   Latitude          (Timestamp) float64 -1.229 -1.863 -2.496 ... 48.14 48.77
   Longitude         (Timestamp) float64 -14.12 -14.13 -14.15 ... 153.6 153.6
   Radius            (Timestamp) float64 6.878e+06 6.878e+06 ... 6.868e+06
   F                 (Timestamp) float64 2.287e+04 2.281e+04 ... 4.021e+04
   F_CHAOS-Core      (Timestamp) float64 2.287e+04 2.282e+04 ... 4.02e+04
   B_NEC             (Timestamp, NEC) float64 2.01e+04 -4.126e+03 ... 3.558e+04
   B_NEC_CHAOS-Core  (Timestamp, NEC) float64 2.011e+04 ... 3.557e+04
   QDLat             (Timestamp) float64 -11.99 -12.6 -13.2 ... 41.59 42.25
   QDLon             (Timestamp) float64 58.02 57.86 57.71 ... -135.9 -136.0
 Attributes:
   Sources:         ['SW_OPER_MAGA_LR_1B_20140101T000000_20140101T235959_050...
   MagneticModels:  ["CHAOS-Core = 'CHAOS-Core'(max_degree=20,min_degree=1)"]
   RangeFilters:    []




.. image:: https://github.com/ESA-VirES/Swarm-VRE/raw/master/docs/images/VRE_shortest_demo.gif


How to acknowledge VirES
------------------------

You can reference *viresclient* directly using the DOI of our zenodo_ record. VirES uses data from a number of different sources so please also acknowledge these appropriately.

.. _zenodo: https://doi.org/10.5281/zenodo.2554162

    | "We use the Python package, viresclient [1], to access [...] from ESA's VirES for Swarm service [2]"
    | [1] https://doi.org/10.5281/zenodo.2554162
    | [2] https://vires.services

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "viresclient",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "Ashley Smith <ashley.smith@ed.ac.uk>",
    "keywords": null,
    "author": null,
    "author_email": "Ashley Smith <ashley.smith@ed.ac.uk>",
    "download_url": "https://files.pythonhosted.org/packages/bd/ac/d5575998aa3d2356ee816a834c3f47ce43233cabd14071ec4b03d4225806/viresclient-0.11.6.tar.gz",
    "platform": null,
    "description": "\n.. image:: https://img.shields.io/pypi/v/viresclient\n   :target: https://pypi.org/project/viresclient/\n   :alt: PyPI\n\n.. image:: https://img.shields.io/conda/vn/conda-forge/viresclient\n   :target: https://anaconda.org/conda-forge/viresclient\n   :alt: Conda\n\n.. image:: https://readthedocs.org/projects/viresclient/badge/?version=latest\n    :target: http://viresclient.readthedocs.io/\n    :alt: Documentation Status\n\n.. image:: https://zenodo.org/badge/138034133.svg\n   :target: https://zenodo.org/badge/latestdoi/138034133\n\n::\n\n  pip install viresclient\n\n::\n\n  conda install -c conda-forge viresclient\n\nviresclient_ 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`_.\n\n.. _viresclient: https://github.com/ESA-VirES/VirES-Python-Client\n.. _WPS: http://www.opengeospatial.org/standards/wps\n.. _Swarm: https://earth.esa.int/eogateway/missions/swarm\n.. _Aeolus: https://earth.esa.int/eogateway/missions/aeolus\n.. _EOX: https://eox.at/category/vires/\n.. _`raise an issue on GitHub`: https://github.com/ESA-VirES/VirES-Python-Client/issues\n\nFor 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.\n\n.. _`Swarm Notebooks`: https://notebooks.vires.services\n.. _`Aeolus Notebooks`: https://notebooks.aeolus.services\n\nData 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_.\n\n.. _pandas.DataFrame: https://pandas.pydata.org/pandas-docs/stable/dsintro.html#dataframe\n.. _xarray.Dataset: http://xarray.pydata.org/en/stable/data-structures.html#dataset\n\n.. code-block:: python\n\n from viresclient import SwarmRequest\n\n # Set up connection with server\n request = SwarmRequest()\n # Set collection to use\n # - See https://viresclient.readthedocs.io/en/latest/available_parameters.html\n request.set_collection(\"SW_OPER_MAGA_LR_1B\")\n # Set mix of products to fetch:\n #  measurements (variables from the given collection)\n #  models (magnetic model predictions at spacecraft sampling points)\n #  auxiliaries (variables available with any collection)\n # Optionally set a sampling rate different from the original data\n request.set_products(\n     measurements=[\"F\", \"B_NEC\"],\n     models=[\"CHAOS-Core\"],\n     auxiliaries=[\"QDLat\", \"QDLon\"],\n     sampling_step=\"PT10S\"\n )\n # Fetch data from a given time interval\n # - Specify times as ISO-8601 strings or Python datetime\n data = request.get_between(\n     start_time=\"2014-01-01T00:00\",\n     end_time=\"2014-01-01T01:00\"\n )\n # Load the data as an xarray.Dataset\n ds = data.as_xarray()\n\n::\n\n <xarray.Dataset>\n Dimensions:           (NEC: 3, Timestamp: 360)\n Coordinates:\n * Timestamp         (Timestamp) datetime64[ns] 2014-01-01 ... 2014-01-01T00:59:50\n Dimensions without coordinates: NEC\n Data variables:\n   Spacecraft        (Timestamp) <U1 'A' 'A' 'A' 'A' 'A' ... 'A' 'A' 'A' 'A'\n   Latitude          (Timestamp) float64 -1.229 -1.863 -2.496 ... 48.14 48.77\n   Longitude         (Timestamp) float64 -14.12 -14.13 -14.15 ... 153.6 153.6\n   Radius            (Timestamp) float64 6.878e+06 6.878e+06 ... 6.868e+06\n   F                 (Timestamp) float64 2.287e+04 2.281e+04 ... 4.021e+04\n   F_CHAOS-Core      (Timestamp) float64 2.287e+04 2.282e+04 ... 4.02e+04\n   B_NEC             (Timestamp, NEC) float64 2.01e+04 -4.126e+03 ... 3.558e+04\n   B_NEC_CHAOS-Core  (Timestamp, NEC) float64 2.011e+04 ... 3.557e+04\n   QDLat             (Timestamp) float64 -11.99 -12.6 -13.2 ... 41.59 42.25\n   QDLon             (Timestamp) float64 58.02 57.86 57.71 ... -135.9 -136.0\n Attributes:\n   Sources:         ['SW_OPER_MAGA_LR_1B_20140101T000000_20140101T235959_050...\n   MagneticModels:  [\"CHAOS-Core = 'CHAOS-Core'(max_degree=20,min_degree=1)\"]\n   RangeFilters:    []\n\n\n\n\n.. image:: https://github.com/ESA-VirES/Swarm-VRE/raw/master/docs/images/VRE_shortest_demo.gif\n\n\nHow to acknowledge VirES\n------------------------\n\nYou can reference *viresclient* directly using the DOI of our zenodo_ record. VirES uses data from a number of different sources so please also acknowledge these appropriately.\n\n.. _zenodo: https://doi.org/10.5281/zenodo.2554162\n\n    | \"We use the Python package, viresclient [1], to access [...] from ESA's VirES for Swarm service [2]\"\n    | [1] https://doi.org/10.5281/zenodo.2554162\n    | [2] https://vires.services\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A Python client for interacting with a VirES server",
    "version": "0.11.6",
    "project_urls": {
        "homepage": "https://github.com/ESA-VirES/VirES-Python-Client"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "ab9c530564efc5b9776603d19f6968444010eeee4bb7a4f09f4a0cc5edd555dc",
                "md5": "c7c3e1c55f23bbfee451b7af0505f405",
                "sha256": "e72b6212117e0eab518df36343d53db65ae78e7a608c116955eae977c3886eba"
            },
            "downloads": -1,
            "filename": "viresclient-0.11.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c7c3e1c55f23bbfee451b7af0505f405",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 97163,
            "upload_time": "2024-01-20T20:27:01",
            "upload_time_iso_8601": "2024-01-20T20:27:01.343402Z",
            "url": "https://files.pythonhosted.org/packages/ab/9c/530564efc5b9776603d19f6968444010eeee4bb7a4f09f4a0cc5edd555dc/viresclient-0.11.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "bdacd5575998aa3d2356ee816a834c3f47ce43233cabd14071ec4b03d4225806",
                "md5": "bbef7365d44aa4eed6522e9dea44a3c7",
                "sha256": "5ccacae74f581c049c265fec02bd85e9c096ca476015f7aca19b3a06d42cf6da"
            },
            "downloads": -1,
            "filename": "viresclient-0.11.6.tar.gz",
            "has_sig": false,
            "md5_digest": "bbef7365d44aa4eed6522e9dea44a3c7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 217216,
            "upload_time": "2024-01-20T20:27:03",
            "upload_time_iso_8601": "2024-01-20T20:27:03.676579Z",
            "url": "https://files.pythonhosted.org/packages/bd/ac/d5575998aa3d2356ee816a834c3f47ce43233cabd14071ec4b03d4225806/viresclient-0.11.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-20 20:27:03",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ESA-VirES",
    "github_project": "VirES-Python-Client",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "viresclient"
}
        
Elapsed time: 0.18201s