Dashboard Data Example

Read data
# Load required libraries
library(tidyverse)
library(leaflet)
library(DT)
library(here)

# Read the data
df <- readr::read_delim(
  here("data/Discrete WQ - 10006.txt"),
  delim = "|"
) 
Filter data
filtered_data <- df %>%
  filter(ProgramName == "Florida Keys National Marine Sanctuary Water Quality Monitoring Project") %>%
  filter(ParameterName == "Total Nitrogen")

Map with Colored Points

create map with points colored by ResultValue
ggplot(filtered_data, aes(x = OriginalLongitude, y = OriginalLatitude, color = ResultValue)) +
  geom_point(alpha=0.1, shape=4) +
  scale_color_gradient(low = "blue", high = "red", limits = c(0, 1)) +
  theme_minimal()

Distribution of Values

Create histogram of ResultValue
ggplot(filtered_data, aes(x = ResultValue)) +
  geom_histogram(bins = 30) +
  theme_minimal()