{ "cells": [ { "cell_type": "markdown", "id": "2d8efa00", "metadata": { "papermill": { "duration": 0.012055, "end_time": "2024-07-01T13:29:41.921899", "exception": false, "start_time": "2024-07-01T13:29:41.909844", "status": "completed" }, "tags": [] }, "source": [ "# Metadata table" ] }, { "cell_type": "code", "execution_count": 1, "id": "3f9ec3fa", "metadata": { "execution": { "iopub.execute_input": "2024-07-01T13:29:41.935389Z", "iopub.status.busy": "2024-07-01T13:29:41.934587Z", "iopub.status.idle": "2024-07-01T13:29:41.956141Z", "shell.execute_reply": "2024-07-01T13:29:41.955007Z" }, "papermill": { "duration": 0.031068, "end_time": "2024-07-01T13:29:41.958385", "exception": false, "start_time": "2024-07-01T13:29:41.927317", "status": "completed" }, "tags": [ "remove-input" ] }, "outputs": [], "source": [ "# NO CODE\n", "from json2html import json2html\n", "import json, re\n", "from IPython.display import HTML" ] }, { "cell_type": "code", "execution_count": 2, "id": "b327c060", "metadata": { "execution": { "iopub.execute_input": "2024-07-01T13:29:41.972924Z", "iopub.status.busy": "2024-07-01T13:29:41.972382Z", "iopub.status.idle": "2024-07-01T13:29:41.977344Z", "shell.execute_reply": "2024-07-01T13:29:41.976120Z" }, "papermill": { "duration": 0.014751, "end_time": "2024-07-01T13:29:41.979494", "exception": false, "start_time": "2024-07-01T13:29:41.964743", "status": "completed" }, "tags": [ "parameters", "remove-input" ] }, "outputs": [], "source": [ "# NO CODE\n", "# PARAMETERS\n", "path = './meta/environment/meteocat_xema'" ] }, { "cell_type": "code", "execution_count": 3, "id": "a017f9e2", "metadata": { "execution": { "iopub.execute_input": "2024-07-01T13:29:41.994658Z", "iopub.status.busy": "2024-07-01T13:29:41.993929Z", "iopub.status.idle": "2024-07-01T13:29:42.001135Z", "shell.execute_reply": "2024-07-01T13:29:42.000215Z" }, "papermill": { "duration": 0.018258, "end_time": "2024-07-01T13:29:42.004580", "exception": false, "start_time": "2024-07-01T13:29:41.986322", "status": "completed" }, "tags": [ "injected-parameters" ] }, "outputs": [], "source": [ "# Parameters\n", "path = \"./meta/environment/meteocat_xema\"\n" ] }, { "cell_type": "code", "execution_count": 4, "id": "8498b8b6", "metadata": { "execution": { "iopub.execute_input": "2024-07-01T13:29:42.021047Z", "iopub.status.busy": "2024-07-01T13:29:42.020378Z", "iopub.status.idle": "2024-07-01T13:29:42.045813Z", "shell.execute_reply": "2024-07-01T13:29:42.044568Z" }, "papermill": { "duration": 0.037425, "end_time": "2024-07-01T13:29:42.049207", "exception": false, "start_time": "2024-07-01T13:29:42.011782", "status": "completed" }, "tags": [ "remove-input", "full-width" ] }, "outputs": [ { "data": { "text/html": [ "
$schema../schema.json
@context
@vocabhttps://schema.org/
qudthttp://qudt.org/schema/qudt/
xsdhttp://www.w3.org/2001/XMLSchema#
@typeDataCatalog
namemeteocat_xema
conditionsOfAccessPrivate
url./notebooks/metecat_xema.py
descriptionWeather station data of the XEMA network of Meteorological Service of Catalonia (Meteocat). Measurement variables are coded by integer numbers and metadata should be used to recover measurement variable information. Temporal coverage depends on the selected weather station. This dataset is not intended for general public access since the original row dataset is freely distributed by Meteocat
licenseFree of charge, worldwide, non-exclusive, royalty free and perpetual. See https://www.meteo.cat/wpweb/avis-legal/
citation
temporalCoverage../..
spatialCoverage
@typePlace
nameCatalonia
sameAshttps://www.wikidata.org/wiki/Q5705
hasPart
  • @typeDataset
    namemeteocat_xema_data
    descriptionMeteorological data recorded at all stations of the Network of Automatic Meteorological Stations (XEMA) of the Meteorological Service of Catalonia. This base date contains variables measured less frequently than daily, usually semi-hourly. The entire dataset could be downloaded as CSV file but because of its large size in-memory filtering could be difficult if it is not loaded into SQL database first. Data are even available within Socrata API access which allows to filter by station, variable, time range, etc.
    distribution
    • @typeDataDownload
      nametransparenciacatalunya_api
      descriptionDistribution of the entire dataset within CSV download
      encodingFormatCSV
      workExample./notebooks/meteocat_xema.py
      contentUrl
      • https://analisi.transparenciacatalunya.cat/api/views/nzvn-apee/rows.csv?accessType=DOWNLOAD&sorting=true
      contentSize28GB
    • @typeDataDownload
      namesocrata_api
      descriptionDistribution from Socrata API
      encodingFormatJSON
      workExample./notebooks/meteocat_xema.py
      contentUrl
      • https://analisi.transparenciacatalunya.cat/resource/nzvn-apee.json
      contentSize
    variableMeasured
    • @typePropertyValue
      nameid
      descriptionIdentification code. Example: 'C6010101100030'
      qudt:dataTypexsd:string
    • @typePropertyValue
      namecodi_estacio
      descriptionWeather station identification code. Example: 'KP'
      qudt:dataTypexsd:string
    • @typePropertyValue
      namecodi_variable
      descriptionWeather measurement identification code. Example: 35
      qudt:dataTypexsd:int
    • @typePropertyValue
      namedata_lectura
      descriptionDate and Initial Time of Reading (records are labeled on the front). Time is provided in Universal Time (T.U.). Example: '2020-12-07T18:30:00.000'
      qudt:dataTypexsd:dateTime
    • @typePropertyValue
      namedata_extrem
      descriptionDate and Time when the maximum or minimum value was recorded. The time is provided in Universal Time (T.U.). This field only appears in extreme variables. Example: '2019-10-29T16:30:00.000'
      qudt:dataTypexsd:dateTime
    • @typePropertyValue
      namevalor_lectura
      descriptionValue of the meteorological variable
      qudt:dataTypexsd:float
    • @typePropertyValue
      namecodi_estat
      descriptionAttribute that reports the result of the validation process. Possible attributes are: blank (the data did not start the validation process), T (the validation process started but did not end), V (valid data). Invalid values ​​are not displayed
      qudt:dataTypexsd:string
    • @typePropertyValue
      namecodi_base
      descriptionTime base on which the weather variable was measured. The time base can be HO (hourly) or SH (semi-hourly)
      qudt:dataTypexsd:string
  • @typeDataset
    namemeteocat_xema_stations
    descriptionTable with the metadata associated with each of the stations of the Network of Automatic Meteorological Stations (XEMA), integrated into the Network of Meteorological Equipment of the Generalitat de Catalunya (Xemec), of the Meteorological Service of Catalonia. Each station is identified by a code.
    distribution
    • @typeDataDownload
      nametransparenciacatalunya_api
      descriptionDistribution by CSV download
      encodingFormatCSV
      workExample./notebooks/meteocat_xema.py
      contentUrl
      • https://analisi.transparenciacatalunya.cat/api/views/yqwd-vj5e/rows.csv?accessType=DOWNLOAD&sorting=true
      contentSize41kB
    • @typeDataDownload
      namesocrata_api
      descriptionDistribution from Socrata API
      encodingFormatJSON
      workExample./notebooks/meteocat_xema.py
      contentUrl
      • https://analisi.transparenciacatalunya.cat/resource/yqwd-vj5e.json
      contentSize51kB
    variableMeasured
    • @typePropertyValue
      namecodi_estacio
      descriptionIdentification code of weather station
      qudt:dataTypexsd:string
    • @typePropertyValue
      namenom_estacio
      descriptionName of weather station
      qudt:dataTypexsd:string
    • @typePropertyValue
      namecodi_tipus
      descriptionType of weather station. A: Automatic type station
      qudt:dataTypexsd:string
    • @typePropertyValue
      namelatitud
      descriptionLatitude coordinate. WSG84 reference system
      unitTextdegrees
      qudt:dataTypexsd:float
    • @typePropertyValue
      namelongitud
      descriptionLongitude coordinate. WSG84 reference system
      unitTextdegrees
      qudt:dataTypexsd:float
    • @typePropertyValue
      namegeocoded_column
      descriptionGeoreference paint coordinates
      qudt:dataTypexsd:string
    • @typePropertyValue
      nameemplacament
      descriptionSite or place location of the station
      qudt:dataTypexsd:string
    • @typePropertyValue
      namealtitud
      descriptionAltitude
      unitTextmeters
      qudt:dataTypexsd:int
    • @typePropertyValue
      namecodi_municipi
      descriptionMunicipality INE code (NUTS level 5)
      qudt:dataTypexsd:int
    • @typePropertyValue
      namenom_municipi
      descriptionName of municipality
      qudt:dataTypexsd:string
    • @typePropertyValue
      namecodi_comarca
      descriptionIdentification code for comarca (NUTS level 4)
      qudt:dataTypexsd:string
    • @typePropertyValue
      namenom_comarca
      descriptionName of comarca
      qudt:dataTypexsd:string
    • @typePropertyValue
      namecodi_provincia
      descriptionIdentification code for province (NUTS level 3)
      qudt:dataTypexsd:string
    • @typePropertyValue
      namenom_provincia
      descriptionProvince name
      qudt:dataTypexsd:string
    • @typePropertyValue
      namecodi_xarxa
      descriptionIdentification code of the station network
      qudt:dataTypexsd:string
    • @typePropertyValue
      namenom_xarxa
      descriptionName of the station network
      qudt:dataTypexsd:string
    • @typePropertyValue
      namecodi_estat_ema
      descriptionIdentifier code of the state associated with each station in a period of time (1:dissembled, 2:operational)
      qudt:dataTypexsd:int
    • @typePropertyValue
      namenom_estat_ema
      descriptionName of the state associated with each station over a period of time
      qudt:dataTypexsd:string
    • @typePropertyValue
      namedata_inici
      descriptionDate of commissioning of the station
      qudt:dataTypexsd:dateTime
    • @typePropertyValue
      namedata_fi
      descriptionStation dismantling date (only if the station is not operational)
      qudt:dataTypexsd:dateTime
    • @typePropertyValue
      name:@computed_region_bh64_c7uy
      description
      qudt:dataTypexsd:int
    • @typePropertyValue
      name:@computed_region_wvic_k925
      description
      qudt:dataTypexsd:int
  • @typeDataset
    namemeteocat_xema_variables
    descriptionTable with the metadata associated with each of the variables of the Network of Automatic Meteorological Stations (XEMA), integrated into the Network of Meteorological Equipment of the Generalitat de Catalunya (Xemec), of the Meteorological Service of Catalonia. Each variable is identified by a code.
    distribution
    • @typeDataDownload
      nametransparenciacatalunya_api
      descriptionDistribution by CSV download
      encodingFormatCSV
      workExample./notebooks/meteocat_xema.py
      contentUrl
      • https://analisi.transparenciacatalunya.cat/api/views/4fb2-n3yi/rows.csv?accessType=DOWNLOAD&sorting=true
      contentSize2kB
    • @typeDataDownload
      namesocrata_api
      descriptionDistribution from Socrata API
      encodingFormatJSON
      workExample./notebooks/meteocat_xema.py
      contentUrl
      • https://analisi.transparenciacatalunya.cat/resource/4fb2-n3yi.json
      contentSize4kB
    variableMeasured
    • @typePropertyValue
      namecodi_variable
      descriptionIdentifier code of each variable
      qudt:dataTypexsd:int
    • @typePropertyValue
      namenom_variable
      descriptionName of each variable
      qudt:dataTypexsd:string
    • @typePropertyValue
      nameunitat
      descriptionUnit of measurement of variables
      qudt:dataTypexsd:string
    • @typePropertyValue
      nameacronim
      descriptionAcronym of the variable
      qudt:dataTypexsd:string
    • @typePropertyValue
      namecodi_tipus_var
      descriptionVariable type code
      qudt:dataTypexsd:string
    • @typePropertyValue
      namedecimals
      descriptionNumber of decimal numbers
      qudt:dataTypexsd:int
measurementTechnique
  • Automatic weather station
creator
  • @typeOrganization
    @idSMC
    nameServei Meteorològic de Catalunya (Meteocat)
    identifierCIF:ESQ0801167H
    contactPoint
    @typeContactPoint
    emailsmc.meteocat@gencat.cat
    urlhttps://www.meteo.cat/
" ], "text/plain": [ "" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# NO CODE\n", "# FULL WIDTH\n", "with open(f'{path}.json') as f:\n", " data = json.load(f)\n", "\n", "table = json2html.convert(json=data, clubbing=False)\n", "table_sub = re.sub('', '', table)\n", "\n", "HTML(table_sub)\n", "\n", "# Run the following in the command line to build a html table\n", "# $ jupyter nbconvert --to html --no-input --no-prompt build_tables.ipynb\n" ] }, { "cell_type": "code", "execution_count": null, "id": "9dd74ea0", "metadata": { "papermill": { "duration": 0.006222, "end_time": "2024-07-01T13:29:42.065114", "exception": false, "start_time": "2024-07-01T13:29:42.058892", "status": "completed" }, "tags": [] }, "outputs": [], "source": [] } ], "metadata": { "interpreter": { "hash": "524d3359b179f3b444361f48db8ae048bd8c237924fac1cd48a4c6f8144f6452" }, "kernelspec": { "display_name": "Python 3.7.10 64-bit ('scidb': conda)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.10.4" }, "metadata": { "interpreter": { "hash": "e3961729dbf4ff77740ff872c9a3eef08621b5b434e3d8d81026af4505918c74" } }, "papermill": { "default_parameters": {}, "duration": 1.61167, "end_time": "2024-07-01T13:29:42.399032", "environment_variables": {}, "exception": null, "input_path": "build_info.ipynb", "output_path": "./meta_ipynb/meteocat_xema.ipynb", "parameters": { "path": "./meta/environment/meteocat_xema" }, "start_time": "2024-07-01T13:29:40.787362", "version": "2.3.4" } }, "nbformat": 4, "nbformat_minor": 5 }