Environmental Data Platform


Daily meteorological records - Climate Data Base detail

Go to full metadata


The Climate Database (CDB) contains meteorological time series of daily temperature (maximum, minimum and mean) and daily total precipitation for more than 250 station sites in Trentino – South Tyrol region. The data were collected from the regional meteorological networks of Bolzano and Trento Provinces and include open access records from several close sites in Austria. The spanned period is 1950 – 2021. Note that mean temperature is defined by averaging minimum and maximum values in all cases. The CDB was built in the framework of the Use-Case number 8 of the DPS4ESLAB project. Citation: Crespi, A. (2020). Daily meteorological records - Climate Data Base (Version 1.0) [Data set]. Eurac Research. https://doi.org/10.48784/B1NP-2628

climatology, meteorological observations, temperature, precipitation, cdb, Trentino - Alto Adige, Meteorological geographical features

CC-BY-4.0



1946-01-01T00:00:00 2020-12-31T00:00:00

WGS-84 (32632:EPSG)

Text, table


Snippet code
Copy to clipboard

import pandas as pd
import psycopg2

# establish connection using information supplied in documentation
conn = psycopg2.connect(host="XXXXXXXX",
                       database="XXXXXX",
                       user="XXXXXXX",
                       password="XXXXXXXX",
                       port=XXXXXXX)
cur = conn.cursor()

# get the metadata
query = """
SELECT * FROM metadata
"""
tbl_meta = pd.read_sql_query(query, conn)
tbl_meta.info()
tbl_meta.head()
Copy to clipboard

#To set up the connection, the following two packages are required.

library(DBI)
library(RPostgres)

#Using the tidyverse in R, we can circumvent the direct usage of SQL language, and can use the more user-friendly dplyr syntax. For this we need these packages.

library(dplyr)
library(dbplyr)

#For data wrangling and visualization we will use these packages.

library(sf)
library(lubridate)
library(ggplot2)
library(mapview)

#Set up the connection
#The following sets up the connection to the SQL database. This is currently only possible within the ScientificNet. The parameters are copied from the documentation.

conn <- dbConnect(Postgres(), 
                  dbname = "climate_data", 
                  host = "10.8.244.31", 
                  port = 5432, 
                  user = "climate_user",
                  password = "meteo_data")
##################################
#List the available tables.

dbListTables(conn)

#The daily values are stored in the table stations_data.
tbl(conn, "stations_data")

#The climatologies (averages for the period 1981-2010) values are stored in the table climatologies.
tbl(conn, "climatologies")

#And finally the metadata with the station locations and more info on the processing in metadata.
tbl(conn, "metadata")

##########################
#Additional examples for create map and plots are available at: http://edp-doc.eurac.edu/cdb_doc/notebooks/Access-CDB-R-ubuntu.html
##########################

Related docs
Name Description Link Date published Category
Connection to PostgreSQL database Necessary steps to connect to the PostgreSQL DB. Example with the Cimate Database. Available only inside ScientificNet Link June 10, 2021 Database