mapaclust: Interactive map showing clusters location.

View source: R/mapaclust.R

mapaclustR Documentation

Interactive map showing clusters location.

Description

This function generates an interactive map of zone showing the samples location and cluster classification using the Compositional Data (CoDA) approach for the data treatment and a clr trasnformation (Aitchison, 1982).

Usage

mapaclust(
  Dataclust,
  crsprj = 4326,
  Area,
  Geology,
  Faults,
  mapout = FALSE,
  shp_field,
  Filename
)

Arguments

Dataclust

is a matrix that contains the hydrochemical composition of water samples and the assigned cluster using the waterclust function. ID, long, lat, source, Mg, Ca, Na,K,HCO3, Cl,SO4,NO3,NO2,Fe. All concentrations are in meq/l. Aditional chemical compounds must be added in columns after the Fe column concentration.

crsprj

is the coordinate reference system (CRS) of an object. Default value is EPSG 4326 for Coordenadas Geográficas WGS84.

Area

is a shape with the area of interest.

Geology

is a shape with the geology of the area of interest.

Faults

is a shape with the faults of the area of interest.

mapout

whether to render the map in the browser (TRUE) or the RStudio viewer (FALSE).

shp_field

is a character varible indicating the shape field name that contains the geological description to show in the map.

Filename

is a character varible to assign the file name to save the interactive map in HTML format.

Details

This function requires the matrix with the hydrochemical composition of water samples and cluster classification obtained using the waterclust function.

Value

Create a dynamic map showing the geographical distribution of water sample clusters.

create a dynamic map showing the geographical distribution of water sample clusters.

Author(s)

Adriana Piña appinaf@unal.edu.co
David Zamora dazamoraa@unal.edu.co

References

Aitchison, J. (1982). The Statistical Analysis of Compositional Data. Journal of the Royal Statistical Society. Series B (Methodological), 44(2), 139–177.

Examples

data(geological_units, faults, Area_data, Dataclust)
Fig_map <- mapaclust(Dataclust, crsprj = 4326, Area = Area_data, 
                 Geology = geological_units, Faults =faults, mapout = TRUE, 
                 shp_field = "SimboloUC", Filename = NULL)
Fig_map

AdrianaPina/HydroCODA documentation built on Feb. 1, 2023, 5:43 a.m.