## ----setup, include=FALSE----------------------------------------------------- knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.width = 7, fig.height = 4, dpi = 96, message = FALSE, warning = FALSE, fig.alt = "Figure generated by tikatuwq package" ) ## ----setup-package------------------------------------------------------------ library(tikatuwq) library(dplyr) data("wq_demo", package = "tikatuwq") # Inspect structure str(wq_demo) head(wq_demo) ## ----read-data, eval=FALSE---------------------------------------------------- # # Example: reading from a CSV file # # df <- read_wq("path/to/your/data.csv") ## ----validate-data------------------------------------------------------------ df <- wq_demo # Validate required columns df <- validate_wq(df) # Check structure str(df) ## ----censored-values---------------------------------------------------------- # Example with censored values # If your CSV contains values like "<0.01", "% dplyr::select(data, ponto, turbidez, od, dbo, ph) %>% pivot_longer(cols = c(turbidez, od, dbo, ph), names_to = "parametro", values_to = "valor") # Heatmap p4 <- plot_heatmap(df_long) print(p4) ## ----generate-analysis-------------------------------------------------------- # Generate analytical text analysis_text <- generate_analysis( df_iqa, classe_conama = "2", incluir_tendencia = FALSE, # Set TRUE if you have temporal data contexto = list(river = "Demo River", period = "2025") ) cat(paste(analysis_text, collapse = "\n\n")) ## ----render-report, eval=FALSE------------------------------------------------ # # Generate HTML report (requires rmarkdown) # # report_path <- render_report( # # df_iqa, # # meta = list(river = "Demo River", period = "2025"), # # output_dir = tempdir() # # ) # # # # # Open in browser # # browseURL(report_path)