---
title: "Monitoring-network sensitivity and candidate locations"
description: "Assess leave-one-well influence, thinning consequences, and constrained candidate-location rankings."
output: rmarkdown::html_vignette
vignette: >
  %\VignetteIndexEntry{Monitoring-network sensitivity and candidate locations}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
---

```{r setup}
library(potentiomap)
data("synthetic_wells")
data("synthetic_candidate_sites")
p <- ps_make_points(synthetic_wells[1:12, ], "x", "y", "gw_elevation",
                    "well_id", "EPSG:26916")
```

```{r network}
thin <- ps_network_thinning(p, retain = 0.75, repeats = 2,
                            method = "IDW", grid_res = 400, seed = 3)
thin$summary
candidates <- terra::vect(subset(synthetic_candidate_sites, !excluded),
                          geom = c("x", "y"), crs = "EPSG:26916")
design <- ps_candidate_network(p, candidates, n_select = 2)
design$selected_sequence
```

Influence and thinning are conditional on the observed network and method.
Candidate ranking is sequential and greedy, not globally optimal or a claim
that a location is drillable.
