Commit bd7ab768 authored by Dorchies David's avatar Dorchies David
Browse files

docs: Aggregate documentation pby API

Closes #16
parent 549017d7
No related merge requests found
Pipeline #30391 passed with stages
in 2 minutes and 49 seconds
Showing with 309 additions and 278 deletions
+309 -278
% Generated by roxygen2: do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_hydrometrie_sites.R % Please edit documentation in R/get_hydrometrie.R
\name{get_hydrometrie_sites} \name{get_hydrometrie_obs_elab}
\alias{get_hydrometrie_obs_elab}
\alias{get_hydrometrie_observations_tr}
\alias{get_hydrometrie_sites} \alias{get_hydrometrie_sites}
\title{Retrieve hydrometric sites from API "Hydrométrie"} \alias{get_hydrometrie_stations}
\title{Retrieve data from API "Hydrométrie"}
\usage{ \usage{
get_hydrometrie_obs_elab(
params,
cfg = config::get(file = system.file("config.yml", package = "hubeau"))
)
get_hydrometrie_observations_tr(
params,
entities = "station",
cfg = config::get(file = system.file("config.yml", package = "hubeau"))
)
get_hydrometrie_sites( get_hydrometrie_sites(
params, params,
unique_site = TRUE, unique_site = TRUE,
cfg = config::get(file = system.file("config.yml", package = "hubeau")) cfg = config::get(file = system.file("config.yml", package = "hubeau"))
) )
get_hydrometrie_stations(
params,
code_sandre_reseau_station = FALSE,
cfg = config::get(file = system.file("config.yml", package = "hubeau"))
)
} }
\arguments{ \arguments{
\item{params}{a \link{list} the list of parameters of the queries and their values in the format \code{list(ParamName = "Param value", ...)}, use the function \link{get_available_params} for a list of the available parameters for a given operation in an API and see the API documentation for the complete list of available filter parameters} \item{params}{a \link{list} the list of parameters of the queries and their values in the format \code{list(ParamName = "Param value", ...)}, use the function \link{get_available_params} for a list of the available filter parameters for a given operation in an API and see the API documentation for their description}
\item{cfg}{a \link{config} object describing the configuration of the APIs. Use the internal package configuration by default
configuration}
\item{entities}{1-length \link{character} string filtering the rows of the returned value, possible values are: "station" for filtering on station rows, "site" for filtering on site rows, "both" for keeping all the rows}
\item{unique_site}{optional \link{logical}, if set to \code{FALSE} sites with several different locations produce one row by different location otherwise the first location found is used for fields \code{code_commune_site}, \code{libelle_commune}, \code{code_departement}, \code{code_region}, \code{libelle_region}, \code{libelle_departement}} \item{unique_site}{optional \link{logical}, if set to \code{FALSE} sites with several different locations produce one row by different location otherwise the first location found is used for fields \code{code_commune_site}, \code{libelle_commune}, \code{code_departement}, \code{code_region}, \code{libelle_region}, \code{libelle_departement}}
\item{cfg}{a \link{config} object Configuration of the communication. Use by default the internal package \item{code_sandre_reseau_station}{optional \link{logical} indicating if \code{code_sandre_reseau_station} field is included in the result; if so, one line is added by item and other fields are repeated}
configuration}
} }
\value{ \value{
a \link[tibble:tibble]{tibble::tibble} with all available parameters in columns and one row by device, year and usage. a \link[tibble:tibble]{tibble::tibble} with all available parameters in columns.
} }
\description{ \description{
See the API documentation for available filter parameters: \url{https://hubeau.eaufrance.fr/page/api-hydrometrie} Available endpoints are:
\itemize{
\item \code{get_hydrometrie_obs_elab} retrieves hydrometric elaborate observations (daily/monthly mean flow)
\item \code{get_hydrometrie_observations_tr} retrieves hydrometric "real time" observations ()
\item \code{get_hydrometrie_sites} retrieves hydrometric sites
\item \code{get_hydrometrie_stations} retrieves hydrometric stations
}
See the API documentation of each endpoint for available filter parameters:
\url{https://hubeau.eaufrance.fr/page/api-hydrometrie}
} }
\examples{ \examples{
# Retrieve the hydrometric sites in the department of Aube # Retrieve the hydrometric sites in the department of Aube
...@@ -31,4 +64,26 @@ get_hydrometrie_sites(list(code_departement = "10")) ...@@ -31,4 +64,26 @@ get_hydrometrie_sites(list(code_departement = "10"))
# The same operation returning 2 rows for the site 'H0203020' which has 2 different locations # The same operation returning 2 rows for the site 'H0203020' which has 2 different locations
get_hydrometrie_sites(list(code_departement = "10"), unique_site = FALSE) get_hydrometrie_sites(list(code_departement = "10"), unique_site = FALSE)
\dontrun{
# This function is currently (2021-12-23) unstable and can be unavailable
# (See https://github.com/BRGM/hubeau/issues/85)
# Retrieve the hydrometric stations in the department of Aube
get_hydrometrie_stations(list(code_departement = "10"))
}
# Which parameters are available for endpoint "obs_elab" of API "hydrometrie"?
get_available_params("hydrometrie", "obs_elab")
# Retrieve the hydrometric monthly mean flow at site 'H0203020'
get_hydrometrie_obs_elab(list(code_entite = "H0203020", grandeur_hydro_elab = "QmM"))
# Retrieve the hydrometric daily mean flow at site 'H0203020' of the last 30 days
get_hydrometrie_obs_elab(
list(code_entite = "H0203020",
date_debut_obs_elab = format(Sys.Date() -30, "\%Y-\%m-\%d"),
grandeur_hydro_elab = "QmJ"))
}
\seealso{
\link{doApiQuery} for more details on the API querying process.
} }
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_hydrometrie_obs_elab.R
\name{get_hydrometrie_obs_elab}
\alias{get_hydrometrie_obs_elab}
\title{Retrieve hydrometric elaborate observations from API "Hydrométrie"}
\usage{
get_hydrometrie_obs_elab(
params,
cfg = config::get(file = system.file("config.yml", package = "hubeau"))
)
}
\arguments{
\item{params}{a \link{list} the list of parameters of the queries and their values in the format \code{list(ParamName = "Param value", ...)}, use the function \link{get_available_params} for a list of the available parameters for a given operation in an API and see the API documentation for the complete list of available filter parameters}
\item{cfg}{a \link{config} object Configuration of the communication. Use by default the internal package
configuration}
}
\value{
a \link[tibble:tibble]{tibble::tibble} with all available parameters in columns and one row by time step and by station.
}
\description{
See the API documentation for available filter parameters: \url{https://hubeau.eaufrance.fr/page/api-hydrometrie#operations-hydrometrie-observationsElaborees}
}
\examples{
# Retrieve the hydrometric last real time observed discharge at station 'H020302002'
get_hydrometrie_obs_elab(list(code_entite = "H0203020", grandeur_hydro_elab = "QmM"))
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_hydrometrie_observations_tr.R
\name{get_hydrometrie_observations_tr}
\alias{get_hydrometrie_observations_tr}
\title{Retrieve hydrometric "real time" observations from API "Hydrométrie"}
\usage{
get_hydrometrie_observations_tr(
params,
entities = "station",
cfg = config::get(file = system.file("config.yml", package = "hubeau"))
)
}
\arguments{
\item{params}{a \link{list} the list of parameters of the queries and their values in the format \code{list(ParamName = "Param value", ...)}, use the function \link{get_available_params} for a list of the available parameters for a given operation in an API and see the API documentation for the complete list of available filter parameters}
\item{entities}{1-\link{character} string filtering the rows of the returned value, possible values are: "station" for filtering on station rows, "site" for filtering on site rows, "both" for keeping all the rows}
\item{cfg}{a \link{config} object Configuration of the communication. Use by default the internal package
configuration}
}
\value{
a \link[tibble:tibble]{tibble::tibble} with all available parameters in columns and one row by time step and by station.
If the query returns no records then the returned value is \link{NULL}.
}
\description{
See the API documentation for available filter parameters: \url{https://hubeau.eaufrance.fr/page/api-hydrometrie}
}
\examples{
# Retrieve the hydrometric last real time observed discharge at station 'H020302002'
get_hydrometrie_observations_tr(list(code_entite = "H0203020", grandeur_hydro = "Q"))
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_hydrometrie_stations.R
\name{get_hydrometrie_stations}
\alias{get_hydrometrie_stations}
\title{Retrieve hydrometric stations from API "Hydrométrie"}
\usage{
get_hydrometrie_stations(
params,
code_sandre_reseau_station = FALSE,
cfg = config::get(file = system.file("config.yml", package = "hubeau"))
)
}
\arguments{
\item{params}{a \link{list} the list of parameters of the queries and their values in the format \code{list(ParamName = "Param value", ...)}, use the function \link{get_available_params} for a list of the available parameters for a given operation in an API and see the API documentation for the complete list of available filter parameters}
\item{code_sandre_reseau_station}{optional \link{logical} indicating if \code{code_sandre_reseau_station} field is included in the result; if so, one line is added by item and other fields are repeated}
\item{cfg}{a \link{config} object Configuration of the communication. Use by default the internal package
configuration}
}
\value{
a \link[tibble:tibble]{tibble::tibble} with all available parameters in columns and one row by station.
}
\description{
See the API documentation for available filter parameters: \url{https://hubeau.eaufrance.fr/page/api-hydrometrie}
}
\examples{
\dontrun{
# This function is temporarily unavailable because of https://github.com/BRGM/hubeau/issues/85
# Retrieve the hydrometric stations in the department of Aube
get_hydrometrie_stations(list(code_departement = "10"))
}
}
% Generated by roxygen2: do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_indicateurs_services_services.R % Please edit documentation in R/get_indicateurs_services.R
\name{get_indicateurs_services_services} \name{get_indicateurs_services_communes}
\alias{get_indicateurs_services_communes}
\alias{get_indicateurs_services_indicateurs}
\alias{get_indicateurs_services_services} \alias{get_indicateurs_services_services}
\title{Retrieve performance indicators from drinking water supply and sanitation services at commune level} \title{Retrieve performance indicators from drinking water supply and sanitation services at commune level}
\usage{ \usage{
get_indicateurs_services_communes(
params,
cfg = config::get(file = system.file("config.yml", package = "hubeau"))
)
get_indicateurs_services_indicateurs(
params,
cfg = config::get(file = system.file("config.yml", package = "hubeau"))
)
get_indicateurs_services_services( get_indicateurs_services_services(
params, params,
cfg = config::get(file = system.file("config.yml", package = "hubeau")) cfg = config::get(file = system.file("config.yml", package = "hubeau"))
) )
} }
\arguments{ \arguments{
\item{params}{a \link{list} the list of parameters of the queries and their values in the format \code{list(ParamName = "Param value", ...)}, use the function \link{get_available_params} for a list of the available parameters for a given operation in an API and see the API documentation for the complete list of available filter parameters} \item{params}{a \link{list} the list of parameters of the queries and their values in the format \code{list(ParamName = "Param value", ...)}, use the function \link{get_available_params} for a list of the available filter parameters for a given operation in an API and see the API documentation for their description}
\item{cfg}{a \link{config} object Configuration of the communication. Use by default the internal package \item{cfg}{a \link{config} object describing the configuration of the APIs. Use the internal package configuration by default
configuration} configuration}
} }
\value{ \value{
a \link[tibble:tibble]{tibble::tibble} with all available parameters in columns.
}
\description{
Available endpoints are:
\itemize{
\item
}
See \link{get_available_params} and the API documentation for available filter parameters: \url{https://hubeau.eaufrance.fr/page/api-indicateurs-services}
}
\details{
\code{get_indicateurs_services_communes} returns a \link[tibble:tibble]{tibble::tibble} with one row by commune, by service and by year and the following columns:
\itemize{
\item "code_commune_insee": \link{character} identifier of the commune
\item "nom_commune": \link{character} name of the commune
\item "codes_service": \link{integer} identifier of the drinking water supply and/or sanitation service
\item "annee": \link{integer} year of the data
\item The following columns are the performance indicators flagged by their respective codes. The documentation of these codes can be found at this URL: \url{https://www.services.eaufrance.fr/indicateurs/indicateurs}.
}
a \link[tibble:tibble]{tibble::tibble} with one row by commune, by service and by year and the following columns: a \link[tibble:tibble]{tibble::tibble} with one row by commune, by service and by year and the following columns:
\itemize{ \itemize{
\item "code_commune_insee": \link{character} identifier of the commune
\item "nom_commune": \link{character} name of the commune
\item "codes_service": \link{integer} identifier of the drinking water supply and/or sanitation service
\item "annee": \link{integer} year of the data
\item The following columns are the performance indicators flagged by their respective codes. The documentation of these codes can be found at this URL: \url{https://www.services.eaufrance.fr/indicateurs/indicateurs}.
}
\code{get_indicateurs_services_indicateurs} returns a \link[tibble:tibble]{tibble::tibble} with one row by service and by year and the following columns:
\itemize{
\item "code_service": \link{character} identifier of the service
\item "nom_service": \link{character} name of the service
\item "numero_siren ": \link{character} SIREN identifier of the service
\item "type_collectivite": \link{character} kind of collectivity
\item "mode_gestion": \link{character} management mechanism of the service
\item "annee": \link{integer} year of the data
\item "indicateur": value of the indicator
\item "uri_indicateur": the link to the indicator documentation
}
\code{get_indicateurs_services_services} returns a \link[tibble:tibble]{tibble::tibble} with one row by commune, by service and by year and the following columns:
\itemize{
\item "code_service": \link{character} identifier of the service \item "code_service": \link{character} identifier of the service
\item "nom_service": \link{character} name of the service \item "nom_service": \link{character} name of the service
\item "code_commune_insee": \link{character} identifier of the commune \item "code_commune_insee": \link{character} identifier of the commune
...@@ -29,11 +82,17 @@ a \link[tibble:tibble]{tibble::tibble} with one row by commune, by service and b ...@@ -29,11 +82,17 @@ a \link[tibble:tibble]{tibble::tibble} with one row by commune, by service and b
\item The following columns are the performance indicators flagged by their respective codes. The documentation of these codes can be found at this URL: \url{https://www.services.eaufrance.fr/indicateurs/indicateurs}. \item The following columns are the performance indicators flagged by their respective codes. The documentation of these codes can be found at this URL: \url{https://www.services.eaufrance.fr/indicateurs/indicateurs}.
} }
} }
\description{
See the API documentation for available filter parameters: \url{https://hubeau.eaufrance.fr/page/api-indicateurs-services}
}
\examples{ \examples{
# Retrieve performance indicator time series of the services in Romilly-sur-Seine # Retrieve performance indicator time series in the commune of Romilly-sur-Seine
get_indicateurs_services_communes(list(code_commune = "10323"))
# Retrieve the drinking water withdrawal indicators of the year 2012 for all services
get_indicateurs_services_indicateurs(list(code_indicateur = "D102.0", annee = "2012"))
# Retrieve performance indicator time series of Romilly-sur-Seine with service details
get_indicateurs_services_services(list(code_commune = "10323")) get_indicateurs_services_services(list(code_commune = "10323"))
} }
\seealso{
\link{doApiQuery} for more details on the API querying process.
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_indicateurs_services_communes.R
\name{get_indicateurs_services_communes}
\alias{get_indicateurs_services_communes}
\title{Retrieve performance indicators from drinking water supply and sanitation services at commune level}
\usage{
get_indicateurs_services_communes(
params,
cfg = config::get(file = system.file("config.yml", package = "hubeau"))
)
}
\arguments{
\item{params}{a \link{list} the list of parameters of the queries and their values in the format \code{list(ParamName = "Param value", ...)}, use the function \link{get_available_params} for a list of the available parameters for a given operation in an API and see the API documentation for the complete list of available filter parameters}
\item{cfg}{a \link{config} object Configuration of the communication. Use by default the internal package
configuration}
}
\value{
a \link[tibble:tibble]{tibble::tibble} with one row by commune, by service and by year and the following columns:
\itemize{
\item "code_commune_insee": \link{character} identifier of the commune
\item "nom_commune": \link{character} name of the commune
\item "codes_service": \link{integer} identifier of the drinking water supply and/or sanitation service
\item "annee": \link{integer} year of the data
\item The following columns are the performance indicators flagged by their respective codes. The documentation of these codes can be found at this URL: \url{https://www.services.eaufrance.fr/indicateurs/indicateurs}.
}
}
\description{
See the API documentation for available filter parameters: \url{https://hubeau.eaufrance.fr/page/api-indicateurs-services}
}
\examples{
# Retrieve performance indicator time series of the services in Romilly-sur-Seine
get_indicateurs_services_communes(list(code_commune = "10323"))
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_indicateurs_services_indicateurs.R
\name{get_indicateurs_services_indicateurs}
\alias{get_indicateurs_services_indicateurs}
\title{Retrieve performance indicators from drinking water supply and sanitation services at commune level}
\usage{
get_indicateurs_services_indicateurs(
params,
cfg = config::get(file = system.file("config.yml", package = "hubeau"))
)
}
\arguments{
\item{params}{a \link{list} the list of parameters of the queries and their values in the format \code{list(ParamName = "Param value", ...)}, use the function \link{get_available_params} for a list of the available parameters for a given operation in an API and see the API documentation for the complete list of available filter parameters}
\item{cfg}{a \link{config} object Configuration of the communication. Use by default the internal package
configuration}
}
\value{
a \link[tibble:tibble]{tibble::tibble} with one row by commune, by service and by year and the following columns:
\itemize{
\item "code_commune_insee": \link{character} identifier of the commune
\item "nom_commune": \link{character} name of the commune
\item "codes_service": \link{integer} identifier of the drinking water supply and/or sanitation service
\item "annee": \link{integer} year of the data
\item The following columns are the performance indicators flagged by their respective codes. The documentation of these codes can be found at this URL: \url{https://www.services.eaufrance.fr/indicateurs/indicateurs}.
}
}
\description{
See the API documentation for available filter parameters: \url{https://hubeau.eaufrance.fr/page/api-indicateurs-services}
}
\examples{
# Retrieve the withdrawal time series of the devices located in Romilly-sur-Seine
get_indicateurs_services_indicateurs(list(code_indicateur = "D102.0", annee = "2012"))
}
% Generated by roxygen2: do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_niveaux_nappes_chroniques.R % Please edit documentation in R/get_niveaux_nappes.R
\name{get_niveaux_nappes_chroniques} \name{get_niveaux_nappes_stations}
\alias{get_niveaux_nappes_stations}
\alias{get_niveaux_nappes_chroniques} \alias{get_niveaux_nappes_chroniques}
\title{Retrieve piezometric archived time series from API "Piézométrie"} \alias{get_niveaux_nappes_chroniques_tr}
\title{Retrieve data from API "Piézométrie"}
\usage{ \usage{
get_niveaux_nappes_stations(
params,
cfg = config::get(file = system.file("config.yml", package = "hubeau"))
)
get_niveaux_nappes_chroniques( get_niveaux_nappes_chroniques(
params, params,
cfg = config::get(file = system.file("config.yml", package = "hubeau")) cfg = config::get(file = system.file("config.yml", package = "hubeau"))
) )
get_niveaux_nappes_chroniques_tr(
params,
cfg = config::get(file = system.file("config.yml", package = "hubeau"))
)
} }
\arguments{ \arguments{
\item{params}{a \link{list} the list of parameters of the queries and their values in the format \code{list(ParamName = "Param value", ...)}, use the function \link{get_available_params} for a list of the available parameters for a given operation in an API and see the API documentation for the complete list of available filter parameters} \item{params}{a \link{list} the list of parameters of the queries and their values in the format \code{list(ParamName = "Param value", ...)}, use the function \link{get_available_params} for a list of the available filter parameters for a given operation in an API and see the API documentation for their description}
\item{cfg}{a \link{config} object Configuration of the communication. Use by default the internal package \item{cfg}{a \link{config} object describing the configuration of the APIs. Use the internal package configuration by default
configuration} configuration}
} }
\value{ \value{
a \link[tibble:tibble]{tibble::tibble} with all available parameters in columns and one row by time step and by station. a \link[tibble:tibble]{tibble::tibble} with all available parameters in columns.
} }
\description{ \description{
The available endpoints are:
\itemize{
\item \code{get_niveaux_nappes_stations} retrieves list of piezometric stations
\item \code{get_nappes_chroniques} retrieves piezometric archived time series
\item \code{get_nappes_chroniques_tr} retrieves piezometric "real time" data
}
See the API documentation for available filter parameters: \url{https://hubeau.eaufrance.fr/page/api-piezometrie} See the API documentation for available filter parameters: \url{https://hubeau.eaufrance.fr/page/api-piezometrie}
} }
\examples{ \examples{
# Retrieve the hydrometric stations in the department of Aube
get_niveaux_nappes_stations(list(code_departement = "10"))
# Retrieve the archived observed piezometric level at station '07548X0009/F' (old BSS identifier) # Retrieve the archived observed piezometric level at station '07548X0009/F' (old BSS identifier)
# for the year 2020 # for the year 2020
df <- get_niveaux_nappes_chroniques(list(code_bss = "07548X0009/F", df <- get_niveaux_nappes_chroniques(list(code_bss = "07548X0009/F",
...@@ -31,4 +53,14 @@ df <- get_niveaux_nappes_chroniques(list(code_bss = "07548X0009/F", ...@@ -31,4 +53,14 @@ df <- get_niveaux_nappes_chroniques(list(code_bss = "07548X0009/F",
# Plot the water elevation (NGF) # Plot the water elevation (NGF)
plot(as.POSIXct(df$date_mesure), df$niveau_nappe_eau, type = "l") plot(as.POSIXct(df$date_mesure), df$niveau_nappe_eau, type = "l")
# For retrieving the last real time observed piezometric level
# at station 'BSS001VZGZ' (new BSS identifier)
df <- get_niveaux_nappes_chroniques_tr(list(bss_id = "BSS001VZGZ"))
# Plot the water elevation (NGF)
plot(as.POSIXct(df$date_mesure), df$niveau_eau_ngf, type = "l")
}
\seealso{
\link{doApiQuery} for more details on the API querying process.
} }
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_niveaux_nappes_chroniques_tr.R
\name{get_niveaux_nappes_chroniques_tr}
\alias{get_niveaux_nappes_chroniques_tr}
\title{Retrieve piezometric "real time" chroniques from API "Piézométrie"}
\usage{
get_niveaux_nappes_chroniques_tr(
params,
cfg = config::get(file = system.file("config.yml", package = "hubeau"))
)
}
\arguments{
\item{params}{a \link{list} the list of parameters of the queries and their values in the format \code{list(ParamName = "Param value", ...)}, use the function \link{get_available_params} for a list of the available parameters for a given operation in an API and see the API documentation for the complete list of available filter parameters}
\item{cfg}{a \link{config} object Configuration of the communication. Use by default the internal package
configuration}
}
\value{
a \link[tibble:tibble]{tibble::tibble} with all available parameters in columns and one row by time step and by station.
}
\description{
See the API documentation for available filter parameters: \url{https://hubeau.eaufrance.fr/page/api-piezometrie}
}
\examples{
# For retrieving the last real time observed piezometric level
# at station 'BSS001VZGZ' (new BSS identifier)
df <- get_niveaux_nappes_chroniques_tr(list(bss_id = "BSS001VZGZ"))
# Plot the water elevation (NGF)
plot(as.POSIXct(df$date_mesure), df$niveau_eau_ngf, type = "l")
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_niveaux_nappes_stations.R
\name{get_niveaux_nappes_stations}
\alias{get_niveaux_nappes_stations}
\title{Retrieve piezometric stations from API "Piézométrie"}
\usage{
get_niveaux_nappes_stations(
params,
cfg = config::get(file = system.file("config.yml", package = "hubeau"))
)
}
\arguments{
\item{params}{a \link{list} the list of parameters of the queries and their values in the format \code{list(ParamName = "Param value", ...)}, use the function \link{get_available_params} for a list of the available parameters for a given operation in an API and see the API documentation for the complete list of available filter parameters}
\item{cfg}{a \link{config} object Configuration of the communication. Use by default the internal package
configuration}
}
\value{
a \link[tibble:tibble]{tibble::tibble} with all available parameters in columns and one row by station.
}
\description{
See the API documentation for available filter parameters: \url{https://hubeau.eaufrance.fr/page/api-piezometrie}
}
\examples{
# Retrieve the hydrometric stations in the department of Aube
get_niveaux_nappes_stations(list(code_departement = "10"))
}
% Generated by roxygen2: do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_prelevements_chroniques.R % Please edit documentation in R/get_prelevements.R
\name{get_prelevements_chroniques} \name{get_prelevements_points_prelevement}
\alias{get_prelevements_points_prelevement}
\alias{get_prelevements_ouvrages}
\alias{get_prelevements_chroniques} \alias{get_prelevements_chroniques}
\title{Retrieve time series of withdrawals from API "Prélèvements en eau"} \title{Retrieve data from API "Prélèvements en eau"}
\usage{ \usage{
get_prelevements_points_prelevement(
params,
cfg = config::get(file = system.file("config.yml", package = "hubeau"))
)
get_prelevements_ouvrages(
params,
cfg = config::get(file = system.file("config.yml", package = "hubeau"))
)
get_prelevements_chroniques( get_prelevements_chroniques(
params, params,
cfg = config::get(file = system.file("config.yml", package = "hubeau")) cfg = config::get(file = system.file("config.yml", package = "hubeau"))
) )
} }
\arguments{ \arguments{
\item{params}{a \link{list} the list of parameters of the queries and their values in the format \code{list(ParamName = "Param value", ...)}, use the function \link{get_available_params} for a list of the available parameters for a given operation in an API and see the API documentation for the complete list of available filter parameters} \item{params}{a \link{list} the list of parameters of the queries and their values in the format \code{list(ParamName = "Param value", ...)}, use the function \link{get_available_params} for a list of the available filter parameters for a given operation in an API and see the API documentation for their description}
\item{cfg}{a \link{config} object Configuration of the communication. Use by default the internal package \item{cfg}{a \link{config} object describing the configuration of the APIs. Use the internal package configuration by default
configuration} configuration}
} }
\value{ \value{
a \link[tibble:tibble]{tibble::tibble} with all available parameters in columns and one row by device, year and usage. a \link[tibble:tibble]{tibble::tibble} with all available parameters in columns.
} }
\description{ \description{
Available endpoints are:
\itemize{
\item \code{get_prelevements_points_prelevement} retrieves withdrawal points
\item \code{get_prelevements_ouvrages} retrieves withdrawal devices
\item \code{get_prelevements_chroniques} retrieves time series of withdrawals
}
See the API documentation for available filter parameters: \url{https://hubeau.eaufrance.fr/page/api-prelevements-eau} See the API documentation for available filter parameters: \url{https://hubeau.eaufrance.fr/page/api-prelevements-eau}
} }
\examples{ \examples{
# Retrieve the withdrawal points located in Romilly-sur-Seine
get_prelevements_points_prelevement(list(code_commune_insee = "10323"))
# Retrieve the withdrawal devices located in Romilly-sur-Seine
get_prelevements_ouvrages(list(code_commune_insee = "10323"))
# Retrieve the withdrawal time series of the devices located in Romilly-sur-Seine # Retrieve the withdrawal time series of the devices located in Romilly-sur-Seine
get_prelevements_chroniques(list(code_commune_insee = "10323")) get_prelevements_chroniques(list(code_commune_insee = "10323"))
} }
\seealso{
\link{doApiQuery} for more details on the API querying process.
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_prelevements_ouvrages.R
\name{get_prelevements_ouvrages}
\alias{get_prelevements_ouvrages}
\title{Retrieve withdrawal devices from API "Prélèvements en eau"}
\usage{
get_prelevements_ouvrages(
params,
cfg = config::get(file = system.file("config.yml", package = "hubeau"))
)
}
\arguments{
\item{params}{a \link{list} the list of parameters of the queries and their values in the format \code{list(ParamName = "Param value", ...)}, use the function \link{get_available_params} for a list of the available parameters for a given operation in an API and see the API documentation for the complete list of available filter parameters}
\item{cfg}{a \link{config} object Configuration of the communication. Use by default the internal package
configuration}
}
\value{
a \link[tibble:tibble]{tibble::tibble} with all available parameters in columns and one row by device.
}
\description{
See the API documentation for available filter parameters: \url{https://hubeau.eaufrance.fr/page/api-prelevements-eau}
}
\examples{
# Retrieve the withdrawal devices located in Romilly-sur-Seine
get_prelevements_ouvrages(list(code_commune_insee = "10323"))
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_prelevements_points_prelevement.R
\name{get_prelevements_points_prelevement}
\alias{get_prelevements_points_prelevement}
\title{Retrieve withdrawal points from API "Prélèvements en eau"}
\usage{
get_prelevements_points_prelevement(
params,
cfg = config::get(file = system.file("config.yml", package = "hubeau"))
)
}
\arguments{
\item{params}{a \link{list} the list of parameters of the queries and their values in the format \code{list(ParamName = "Param value", ...)}, use the function \link{get_available_params} for a list of the available parameters for a given operation in an API and see the API documentation for the complete list of available filter parameters}
\item{cfg}{a \link{config} object Configuration of the communication. Use by default the internal package
configuration}
}
\value{
a \link[tibble:tibble]{tibble::tibble} with all available parameters in columns and one row by withdrawal point.
}
\description{
See the API documentation for available filter parameters: \url{https://hubeau.eaufrance.fr/page/api-prelevements-eau#/prelevements/prelevement}
}
\examples{
# Retrieve the withdrawal points located in Romilly-sur-Seine
get_prelevements_points_prelevement(list(code_commune_insee = "10323"))
}
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