d_convert_eaufrance: Convert eaufrance station files into a htsr sqlite base

d_convert_eaufranceR Documentation

Convert eaufrance station files into a htsr sqlite base

Description

Convert a eaufrance hydrological file into a htsr sqlite base. It regards the "basic" data file, which includes water level and discharge data. .

Usage

d_convert_eaufrance(eaufrance.dir, station.id, fsqname)

Arguments

eaufrance.dir

Full path of the folder were the eaufrance data base is extracted (character)

station.id

Id list of the stations to convert (character)

fsqname

Name of the returned sqlite data base without extension (character)

Details

The data base is build from selected stations in the "stations.tar" file available on the data.eaufrance web site : https://data.ofb.fr/catalogue/data-eaufrance/fre/catalog.search. This file must be first downloaded and extracted in the folder eaufrance.dir. For the extraction the R function untar() can be used.

Secondly, within the eaufrance.dir, the file stations/stations.csv give the full list of the available stations. One or more station ids must be chosen and included in the station.id list parameter. Another possibility is to consult the "Hydro Portail" (https://www.hydro.eaufrance.fr/rechercher/entites-hydrometriques) in order to select the station ids.

In the sqlite data base, the units of water level data is cm and of discharge data is m3/s.

Value

A sqlite database compatible with the htsr library.

Author(s)

P. Chevallier - Jul/Aug 2024


htsr documentation built on May 10, 2026, 1:07 a.m.