Commit d2ae8b73 authored by Sabine Schröder's avatar Sabine Schröder
Browse files

working on shared tables directly created from ontology

parent 3e3bfe2c
#!/bin/bash
# ################################
#
# script to create tables needed for documentation
#
# author: Sabine Schröder (s.schroeder@fz-juelich.de)
# date: 2022-10-19
#
# ################################
# example, how to get links from satellite data page
curl https://toar-data.org/satellite-data/ | grep h2 | grep https
# --> Amirpasha: please edit link from http://cci.esa.int/data to https://cci.esa.int/data
......@@ -72,6 +72,7 @@ html_logo = '../../../logos/TOAR-DataBase.png'
# A workaround for the responsive tables always having annoying scrollbars.
def setup(app):
app.add_css_file("css/no_scrollbars.css")
app.add_css_file("css/mytable.css")
# -- Options for pdf output -------------------------------------------------
......
../../../static/tables/station_location.md
\ No newline at end of file
../../../static/tables/toar1_category.md
\ No newline at end of file
../../../static/tables/type.md
\ No newline at end of file
......@@ -71,7 +71,7 @@ In order to control the database queries and hence the response of the TOAR REST
Response Format
~~~~~~~~~~~~~~~
The default response format is json. You can control the format with the ``format=`` option in the data and ontology queries. Currently, `json <https://www.json.org/json-en.html>`_ , `csv <https://en.wikipedia.org/wiki/Comma-separated_values>`_, and `html <https://html.spec.whatwg.org/>`_ are supported.
The default response format is json. You can control the format with the ``format=`` option in the data and ontology queries. Currently, `json <https://www.json.org/json-en.html>`_ and `csv <https://en.wikipedia.org/wiki/Comma-separated_values>`_ are supported.
~~~~~~~~~~~~~~
Error Messages
......@@ -135,7 +135,7 @@ Time Series
limit=<integer: count>
station_code=<station code1>,....
variable_id=<integer: variable identifier in TOAR BD>
format=<string> (json|csv|html)
format=<string> (json|csv)
Response:
Each query result consists of all fields of time series metadata.
......@@ -331,4 +331,4 @@ The base URL for the statistics package, a web-service for the calculation of va
.. rubric:: Footnotes
.. [#f6] e.g. https://restfulapi.net/ or https://mlsdev.com/blog/81-a-beginner-s-tutorial-for-understanding-restful-api
\ No newline at end of file
.. [#f6] e.g. https://restfulapi.net/ or https://mlsdev.com/blog/81-a-beginner-s-tutorial-for-understanding-restful-api
......@@ -12,8 +12,12 @@ Datasets (“series”) in the TOAR database are limited to ground-level measure
The TOAR-II activity pledges to adhere to the principles of COPDESS (https://copdess.org/) and the TOAR data infrastructure has been designed to support the emerging best practices for data sharing in the Earth and Space Sciences. The TOAR data team strives to operate its services including the TOAR database at the highest possible level of FAIRness (see https://www.force11.org/group/fairgroup/fairprinciples). A detailed assessment of the TOAR data service FAIRness can be found in :numref:`fair-data` of this document.
In order to serve the database’s main purpose to provide “easily accessible, documented data on ozone mixing ratios, exposure and dose metrics at thousands of measurement sites around the world freely accessible for research on the global-scale impact of ozone on climate, human health and crop/ecosystem productivity”, all data in the TOAR database version 2 are openly accessible and can be used, modified and re-distributed under the Creative Commons (CC) BY license (i.e. “by attribution”; see https://creativecommons.org/licenses/by/4.0/) [#f2]_ .
In order to serve the database’s main purpose to provide “easily accessible, documented data on ozone mixing ratios, exposure and dose metrics at thousands of measurement sites around the world freely accessible for research on the global-scale impact of ozone on climate, human health and crop/ecosystem productivity”, all data in the TOAR database version 2 are openly accessible and can be used, modified and re-distributed under the Creative Commons (CC) BY license (i.e. “by attribution”; see https://creativecommons.org/licenses/by/4.0/) [#f2]_ .
.. raw:: latex
\newpage
Access to TOAR data is provided through one of three main channels:
* a Representational State Transfer (REST) Application Programming Interface (API) at https://toar-data.fz-juelich.de/api/v2/ [#f3]_ ,
......@@ -29,7 +33,7 @@ If you are using or re-distributing data from the TOAR database, please adhere t
.. _figure-data-use-policy:
.. figure:: ./images/data-use-policy.jpg
.. figure:: ./images/data-use-policy.png
TOAR Data Use Policy
......@@ -48,4 +52,4 @@ If you are using or re-distributing data from the TOAR database, please adhere t
.. [#f4] At the time of writing the GUI to access data from the TOAR database version 2 is still under development. Version 1 of the GUI, i.e. the JOIN web interface, can be reached at https://toar-data.fz-juelich.de/gui/v1/
.. [#f5] The primary data provided by individual research teams or air quality agencies. B2SHARE data publications include a DOI which shall be used to properly cite such datasets.
\ No newline at end of file
.. [#f5] The primary data provided by individual research teams or air quality agencies. B2SHARE data publications include a DOI which shall be used to properly cite such datasets.
......@@ -91,9 +91,9 @@ While the main purpose of the TOAR V2 database is to provide ground-level ozone
Within the TOAR V2 database we store the following information about each variable:
* Name: a short name to identify the variable (see :numref:`table-variables`, left column)
* Variable Name: a short name to identify the variable (see :numref:`table-variables`, left column)
* Longname: a more descriptive name of the variable (see :numref:`table-variables`, middle column)
* Variable long name: a more descriptive name of the variable (see :numref:`table-variables`, middle column)
* Displayname: a variant of the variable name that is recommended for plotting
......@@ -126,20 +126,13 @@ Geographical coordinates are saved as a PostGIS POINT location with lat and lon
.. _table-country:
.. table:: country, state, and timezone
+--------------+----------+----------------------------------------------------------+
| **Name** | **Type** | **Description** |
+==============+==========+==========================================================+
| country | string | | The country, where the station resides, |
| | | | or which operates the station (e.g. in Antarctica) |
| | | | (see controlled vocabulary: Country Code) |
+--------------+----------+----------------------------------------------------------+
| state | string | The state or province, where the station resides |
+--------------+----------+----------------------------------------------------------+
| timezone | string | Station timezone (see controlled vocabulary: Timezone) |
+--------------+----------+----------------------------------------------------------+
.. csv-table:: country, state, and timezone
:header: "**Name**", "**Description**"
:class: longtable
:file: csv/station_location.md
:widths: 30 70
:delim: |
.. _subsection-toar1-category:
......@@ -153,30 +146,13 @@ The table below summarizes the criteria which we employed in the “toar1_catego
.. _table-toar1-criteria:
.. table:: Summary of criteria for the toar1_category (see [#f1]_ ). For details on the specific geospatial variables, see :numref:`subsection-geospacial-data`
+-------------------------------------------------------------------------------+-------------------------------------+
| **geospatial criteria** | **toar1_category value** |
+===============================================================================+=====================================+
| | population_density > 15000 | urban |
| | AND nightlight_1km >= 60 | |
| | AND max_nightlight_25km = 63 | |
+-------------------------------------------------------------------------------+-------------------------------------+
| | omi_no2_column <= 8 | rural, low elevation |
| | AND nightlight_5km <= 25 | |
| | AND population_density <= 3000 | |
| | AND google_alt <= 1500 | |
| | AND etopo_relative_alt <= 500 | |
| | |
+-------------------------------------------------------------------------------+-------------------------------------+
| | omi_no2_column <= 8 | rural, high elevation |
| | AND nightlight_5km <= 25 | |
| | AND population_density <= 3000 | |
| | AND (google_alt > 1500 OR (google_alt > 800 AND etopo_relative_alt > 500)) | |
+-------------------------------------------------------------------------------+-------------------------------------+
| all others | unclassified |
+-------------------------------------------------------------------------------+-------------------------------------+
.. csv-table:: Summary of criteria for the toar1_category (see [#f1]_ ). For details on the specific geospatial variables, see :numref:`subsection-geospacial-data`
:header: "**toar1_category value**", "**geospatial criteria**"
:class: longtable
:file: csv/toar1_category.md
:widths: 30 70
:delim: |
*We are planning* to use cluster techniques to define a more objective set of station classes for the second TOAR assessment. First, preliminary results appear promising, but it should be noted that even with such techniques there will always be some subjective moment regarding, for example, the number of clusters that are “meaningful”, or the evaluation of the separation, i.e. the criteria used to measure “success”. Depending on the outcomes of this effort, a “toar2_category” may be added to the TOAR database at a later stage.
.. _subsection-eu-station-characterisation:
......@@ -189,39 +165,12 @@ Since 2018, the rules for reporting air quality data including the metadata desc
.. _table-station-type:
.. table:: Station classification in relation to prominent emission sources (Decision Annex II D(ii), item 22) (see also: http://dd.eionet.europa.eu/vocabulary/aq/stationclassification for an electronic version)
+-------------------+---------------------------------------------------------------------------------------------+
| **station_type** | **description** |
+===================+=============================================================================================+
| traffic | Located in close proximity to a single major road |
+-------------------+---------------------------------------------------------------------------------------------+
| | .. raw:: html |
| | |
| industrial | Located in close proximity to a single industrial source or industrial area. <br> |
| | A wide range of industrial sources can be considered here, including <br> |
| | |
| | <ul> |
| | <li> thermal power generation |
| | <li> district heating plants |
| | <li> refineries |
| | <li> waste incineration/treatment plants, dump sites |
| | <li> mining, including gravel, oil, natural gas |
| | <li> airports |
| | <li> ports </ul) |
| | |
+-------------------+---------------------------------------------------------------------------------------------+
| | .. raw:: html |
| | |
| background | Any location with is neither to be classified as “traffic” or “industrial”. <br> |
| | Located such that its pollution levels are representative of the average <br> |
| | exposure of the general population (or vegetation and natural ecosystems) <br> |
| | within the type of area under assessment. The pollution level should not be <br> |
| | dominated by a single source type (e.g. traffic), unless that source type is <br> |
| | typical within the area under assessment. The station should usually be <br> |
| | representative of a wider area of at least several square kilometres. |
| | |
+-------------------+---------------------------------------------------------------------------------------------+
.. csv-table:: Station classification in relation to prominent emission sources (Decision Annex II D(ii), item 22) (see also: http://dd.eionet.europa.eu/vocabulary/aq/stationclassification for an electronic version)
:header: "**station_type**", "**description**"
:class: longtable
:file: csv/type.md
:widths: 30 70
:delim: |
.. _table-station-type-of-area:
......@@ -277,6 +226,7 @@ To allow for more refined analyses of air quality data, version 2 of the TOAR da
.. _table-stationmetaglobal:
.. csv-table:: StationmetaGlobal - TOAR database fields of geospatial information for the characterisation of measurement sites
:header: "**Name**", "**Type**", "**Description**"
:class: longtable
:file: csv/stationmetaglobal.md
:widths: 42 7 51
......
table .line-block { margin-bottom: 0; }
country | The country, where the station resides, or which operates the station (e.g. in Antarctica) (see controlled vocabulary: Country Code)
state | The state or province, where the station resides
timezone | Station timezone (see controlled vocabulary: Timezone)
Name | Type | Description
mean_srtm_alt_90m_year1994 | number | mean value within a radius of 90 m around station location of the following data of the year 1994: {'units': 'm', 'data_source': 'NASA Shuttle Radar Topographic Mission (SRTM)', 'citation': 'Jarvis, A., H.I. Reuter, A. Nelson, E. Guevara, 2008, Hole-filled SRTM for the globe Version 4, available from the CGIAR-CSI SRTM 90m Database (http://srtm.csi.cgiar.org).'}
mean_srtm_alt_1km_year1994 | number | mean value within a radius of 1 km around station location of the following data of the year 1994: {'units': 'm', 'data_source': 'NASA Shuttle Radar Topographic Mission (SRTM)', 'citation': 'Jarvis, A., H.I. Reuter, A. Nelson, E. Guevara, 2008, Hole-filled SRTM for the globe Version 4, available from the CGIAR-CSI SRTM 90m Database (http://srtm.csi.cgiar.org).'}
max_srtm_relative_alt_5km_year1994 | number | maximum value within a radius of 5 km around station location with relative altitude of the following data of the year 1994: {'units': 'm', 'data_source': 'NASA Shuttle Radar Topographic Mission (SRTM)', 'citation': 'Jarvis, A., H.I. Reuter, A. Nelson, E. Guevara, 2008, Hole-filled SRTM for the globe Version 4, available from the CGIAR-CSI SRTM 90m Database (http://srtm.csi.cgiar.org).'}
......
Urban | "| is defined as:
| station_population_density >= 15000 and
| station_nightlight_1km >= 60 and
| station_max_nightlight_25km == 63"
RuralLowElevation | "| station_omi_no2_column <= 8 and
| station_nightlight_5km <= 25 and
| station_population_density <= 3000 and
| station_max_population_density_5km <= 30000 and
| station_google_alt <= 1500 and
| station_etopo_relative_alt < 500"
RuralHighElevation | "| station_omi_no2_column <= 8 and
| station_nightlight_5km <= 25 and
| station_population_density <= 3000 and
| (station_google_alt > 1500 or (station_google_alt > 800 and station_etopo_relative_alt < 500))"
Unclassified | no classification given
Traffic | "| Located in close proximity to a single major road."
Industrial | "| Located in close proximity to a single industrial source or industrial area.
| A wide range of industrial sources can be considered here, including
| - thermal power generation
| - district heating plants
| - refineries
| - waste incineration/treatment plants, dump sites
| - mining, including gravel, oil, natural gas
| - airports
| - ports."
Background | "| Any location with is neither to be classified as “traffic” or “industrial”. Located such that its pollution levels are representative of the average exposure of the general population (or vegetation and natural ecosystems) within the type of area under assessment. The pollution level should not be dominated by a single source type (e.g. traffic), unless that source type is typical within the area under assessment. The station should usually be representative of a wider area of at least several square kilometres."
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment