https://github.com/52north/sos4py

https://github.com/52north/sos4py

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.9%) to scientific vocabulary
Last synced: 11 months ago · JSON representation

Repository

Basic Info
  • Host: GitHub
  • Owner: 52North
  • License: apache-2.0
  • Language: Python
  • Default Branch: master
  • Size: 1.68 MB
Statistics
  • Stars: 4
  • Watchers: 13
  • Forks: 5
  • Open Issues: 3
  • Releases: 3
Created about 6 years ago · Last pushed over 1 year ago
Metadata Files
Readme Changelog Contributing License Authors

README.md

sos4py

version

sos4py is a convenience layer for Python environment to access services, extract data, and allow querying from SOS instances.

  • Free software: Apache Software License 2.0

Features

  • Allows connection to an SOS service using OWSLib.

  • Explore and summarize service capabilities, sensor metadata, offerings, observed properties, available phenomena and features of interest.

  • Query requests to an SOS service for Get Data Availability.

  • Query requests to an SOS service for getting observation data.

  • Query requests to an SOS service for getting observation site data.

Usage

EXAMPLES OF THE PACKAGE CAN BE SEEN:: https://github.com/52North/sos4py/tree/master/examples

Connecting to an SOS service:

Description

Method to connect to a Sensor Observation Service. The result is an instance of sos200 which inherits from SensorObservationService200 of OWSLib (https://github.com/geopython/OWSLib/blob/master/owslib/swe/observation/sos200.py)

Usage

 ``def connection_sos(url,
 xml=None,
 username=None,
 password=None,):``

Parameters

url : str
  url of the SOS.

xml : str
  Xml file path.

username : str
  Username to access the SOS service.

password : str
  User password to access the SOS service.

Example

``from sos4py.main import connection_sos``

``service = connection_sos('http://sensorweb.demo.52north.org/52n-sos-webapp/sos/kvp')``

Get capabilities functions (summaries):

Description

Summary methods to retrieve metadata of sensors.

Usage

def sosServiceIdentification(): The identification section of a SOS v2.0 capabilities document. This function queries the identification metadata available and returns the data as a pandas Series dataframe.

def sosProvider(): The provider section of an SOS v2.0 capabilities document. This function queries the provider metadata available and returns the data as a pandas Series dataframe.

def sosOperationsMetadata(): Elements in an OperationsMetadata object.This function queries the operations available of a SOS v2.0 capabilities document and returns the data as a pandas Series dataframe.

def sosOfferings(): Explore offerings section of an SOS v2.0 capabilities document. This function queries the offerings and returns the data as a pandas Series dataframe.

def sosPhenomena(): Queries a SOS v2.0 for all its phenomena. Returns a list of the phenomena ids.

def sosFeaturesOfInterest(): Queries a SOS v2.0 for all its features of interest. Returns a list of the feature of interest ids.

Examples

``from sos4py.main import connection_sos``

``service = connection_sos('http://sensorweb.demo.52north.org/52n-sos-webapp/sos/kvp')``

``service.sosServiceIdentification()``

``service.sosProvider()``

``service.sosOperationsMetadata()``

``service.sosOfferings()``

``service.phenomena()``

Get Data Availability function:

Description

Method to get information on data availability.

Usage

def get_data_availability(object, procedures=None, observedProperties=None, featuresOfInterest=None, offerings=None, method=None, **kwargs):

Parameters

object : str
  Xml file path.

procedures : list of str
  Query the data based on the availability of the indicated procedures.

observedProperties: list of str
  Query the data based on the availability of the indicated observed properties.

featuresOfInterest : list of str
  Query the data based on the availability of the indicated features of interest.

offerings : list of str
  Query the data based on the availability of the indicated offerings.

method : str
  'Get' or 'Post' request parameter.

Examples

  ``service.get_data_availability()``

  ``service.get_data_availability(procedures=['http://www.52north.org/test/procedure/6'], 
  featuresOfInterest=['http://www.52north.org/test/featureOfInterest/6'])``

Get sites function:

Description

Method to retrieve sites from an SOS. The result is a GeoDataFrame.

Usage

def get_sites(self, include_phenomena=False)

Parameters

include_phenomena : boolean, optional
  Whether or not flags for the existance of phenomenona (e.g. water temperature) should be included (default is False)

Examples

  ``service.get_sites()``

  ``service.get_sites(include_phenomena = True)``

Get data function:

Description

Method to get observation data from an SOS. The result is a DataFrame.

Usage

def get_data(self, sites=None, phenomena=None, procedures=None, begin=None, end=None)

Parameters

sites : non-empty list of str, optional
   observation sites/sensor locations

phenomena : non-empty list of str, optional
   phenomena, e.g. water temperature

procedures : non-empty list of str, optional
   measurement procedures of the observation, e.g. measurements in 2 m water depth

begin : str, optional if end is not provided
   begin of time period in the form 'YYYY-MM-DDThh:mm:ssZ', e.g. '2020-01-01T10:00:00Z'

end : str, optional if begin is not provided
   end of time period in the form 'YYYY-MM-DDThh:mm:ssZ', e.g. '2020-01-02T10:00:00Z'  

It is recommended to provide at least one of sites, phenomena or procedures. Otherwise the request may take very long.

Examples

  ``service.get_data()``

  ``service.get_data(sites=['Sensor location 1'],phenomena=['water temperature','salinity'])``

Funding organizations/projects

The development of sos4py was supported by several organizations and projects. Among other we would like to thank the following organisations and project

| Project/Logo | Description | | :-------------: | :------------- | | BMVImFundWaCoDis - Water management Copernicus services for the determination of substance inputs into waters and dams within the framework of environmental monitoring | The development of this version of sos4py was supported by the German Federal Ministry of of Transport and Digital Infrastructure research project WaCoDis (co-funded by the German Federal Ministry of Transport and Digital Infrastructure, programme mFund) | | BMBFFONAMultidisciplinary data acquisition as the key for a globally applicable water resource management (MuDak-WRM) | The development of this version of sos4py was supported by the German Federal Ministry of Education and Research research project MuDak-WRM (co-funded by the German Federal Ministry of Education and Research, programme FONA) |

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

Owner

  • Name: 52°North Spatial Information Research GmbH
  • Login: 52North
  • Kind: organization
  • Email: info@52north.org
  • Location: Münster

Advancing spatial information infrastructures to foster open science

GitHub Events

Total
  • Issues event: 2
  • Watch event: 1
  • Push event: 1
  • Pull request event: 2
  • Fork event: 1
Last Year
  • Issues event: 2
  • Watch event: 1
  • Push event: 1
  • Pull request event: 2
  • Fork event: 1

Committers

Last synced: over 3 years ago

All Time
  • Total Commits: 51
  • Total Committers: 5
  • Avg Commits per committer: 10.2
  • Development Distribution Score (DDS): 0.49
Top Committers
Name Email Commits
alchav06 4****6@u****m 26
Martin Pontius m****s@5****g 12
Martin Pontius 4****s@u****m 8
CarstenHollmann c****n@5****g 4
mattiagiupponi 5****i@u****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 11 months ago

All Time
  • Total issues: 3
  • Total pull requests: 9
  • Average time to close issues: over 1 year
  • Average time to close pull requests: 15 days
  • Total issue authors: 3
  • Total pull request authors: 6
  • Average comments per issue: 1.33
  • Average comments per pull request: 0.22
  • Merged pull requests: 5
  • Bot issues: 0
  • Bot pull requests: 2
Past Year
  • Issues: 1
  • Pull requests: 1
  • Average time to close issues: 23 days
  • Average time to close pull requests: 23 days
  • Issue authors: 1
  • Pull request authors: 1
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • whatnick (1)
  • legitishan (1)
  • spursbyte (1)
Pull Request Authors
  • CarstenHollmann (3)
  • dependabot[bot] (2)
  • legitishan (1)
  • MartinPontius (1)
  • whatnick (1)
  • mattiagiupponi (1)
Top Labels
Issue Labels
Pull Request Labels
dependencies (2)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 11 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 3
  • Total maintainers: 2
pypi.org: sos4py

sos4py is a convenience layer for Python environment to access services from SOS instances.

  • Versions: 3
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 11 Last month
Rankings
Dependent packages count: 10.1%
Forks count: 15.4%
Dependent repos count: 21.6%
Stargazers count: 25.1%
Average: 28.1%
Downloads: 68.4%
Maintainers (2)
Last synced: 11 months ago

Dependencies

requirements_dev.txt pypi
  • Sphinx ==1.8.5 development
  • bump2version ==0.5.11 development
  • coverage ==4.5.4 development
  • flake8 ==3.7.8 development
  • pip ==19.2.3 development
  • tox ==3.14.0 development
  • twine ==1.14.0 development
  • watchdog ==0.9.0 development
  • wheel ==0.33.6 development
setup.py pypi