Skip to contents

A dataset containing example sampling sites from well-known Wisconsin lakes. These coordinates are useful for testing with real lake boundaries from OpenStreetMap.

Usage

wisconsin_lakes

Format

A data frame with 8 rows and 4 variables:

Site

Unique site identifier

lake.name

Name of the lake

latitude

Latitude in decimal degrees (WGS84)

longitude

Longitude in decimal degrees (WGS84)

Source

Synthetic data based on real lake locations

Details

The dataset includes sites from three Wisconsin lakes:

  • Lake Mendota (3 sites) - Madison's largest lake, well-studied

  • Lake Monona (2 sites) - Connected to Mendota via Yahara River

  • Geneva Lake (3 sites) - Popular recreational lake in SE Wisconsin

Examples

# Load the dataset
data(wisconsin_lakes)

# View the data
head(wisconsin_lakes)
#>           Site    lake.name latitude longitude
#> 1    Mendota_N Lake Mendota  43.1125  -89.4234
#> 2    Mendota_S Lake Mendota  43.0756  -89.4012
#> 3 Mendota_Deep Lake Mendota  43.0995  -89.4045
#> 4     Monona_1  Lake Monona  43.0634  -89.3612
#> 5     Monona_2  Lake Monona  43.0589  -89.3789
#> 6     Geneva_E  Geneva Lake  42.5912  -88.4312

# Use with lakefetch (requires internet connection)
# \donttest{
sites <- load_sites(wisconsin_lakes)
#>   Loaded 8 rows with columns: Site, lake.name, latitude, longitude
#>   Using columns: Latitude = latitude, Longitude = longitude
#>   Preserved lake name column: lake.name
#>   Final valid samples: 8
#>   Detected location from column 'lake.name': 3 lakes
lake_data <- get_lake_boundary(sites)
#> Converting to spatial format...
#> Spherical geometry (s2) switched off
#> Downloading lake boundaries from OpenStreetMap...
#>   Site spread is 1 degrees - querying 5 site clusters
#>     Found 117 polygons
#>     Found 5 multipolygons
#>     Found 97 polygons
#>     Found 3 multipolygons
#>     Found 198 polygons
#>     Found 17 multipolygons
#>     Found 142 polygons
#>     Found 15 multipolygons
#>     Found 71 polygons
#>     Found 6 multipolygons
#>   Download complete in 2.9 minutes
#>   Combining results...
#>   Total water bodies found: 671
#>   Auto-detected UTM Zone: 16N
#>   Transforming to UTM for analysis...
#>   Processing lake polygons...
#> Warning: repeating attributes for all sub-geometries for which they may not be constant
#> Warning: repeating attributes for all sub-geometries for which they may not be constant
#>   Filtered 44 water bodies < 1e-04 km2
#>   Deduplicating 210 duplicate lake entries...
#>   Processed 417 unique lake polygons
#>   Total area: 95.66 km2
#> Spherical geometry (s2) switched on
results <- fetch_calculate(sites, lake_data)
#> Effective fetch method: top3
#> Using default depth: 10 m
#> Assigning sites to lakes...
#>   Checking direct intersections...
#>     4 sites matched directly
#>   Checking 4 unmatched sites with 100m tolerance...
#>     0 additional sites matched within tolerance
#>   Trying name-based matching using 'lake.name' column...
#>     Matched 1 sites to 'Lake Mendota' via name matching from 'Lake Mendota'
#>     Matched 1 sites to 'Geneva Lake' via name matching from 'Geneva Lake'
#> Warning: Skipped 2 site(s) named 'Geneva Lake': too far from OSM lake 'Geneva Lake' (>500m). Site(s) may be on a different water body. Sites: Geneva_W_7, Geneva_Center_8
#>   Site assignment summary:
#>     Matched: 6/8
#>     Unmatched: 2
#>     Unmatched sites claim to be in: Geneva Lake
#>     Unmatched coordinate range:
#>       Lat: 4715662.0902 to 4716097.5342
#>       Lon: 375904.1842 to 378924.2756
#>     TIP: Try lakefetch_options(gps_tolerance_m = 100) for larger buffer
#>     TIP: Check if the lake exists in OpenStreetMap at openstreetmap.org
#>   Sites per lake:
#>     Lake Monona: 2 sites
#>     Lake Mendota: 3 sites
#>     Geneva Lake: 1 sites
#> Calculating fetch for multiple lakes...
#>   Buffering sites 10m inward
#>   Angle resolution: 5 degrees
#> Warning: Skipping 2 sites not matched to any lake: Geneva_W_7, Geneva_Center_8
#> Processing 3 lake(s)...
#> Using parallel processing with 3 cores for 3 lakes
#> Fetch calculation complete.
#> Adding lake context (NHD integration)...
#>   Fetching NHD waterbodies...
#>     Found 584 NHD waterbodies
#>   Processing lake: 3361036
#> Warning: attribute variables are assumed to be spatially constant throughout all geometries
#> Warning: attribute variables are assumed to be spatially constant throughout all geometries
#>     Found 1 outlet(s) and 5 inlet(s)
#> Warning: st_centroid assumes attributes are constant over geometries
#>   Processing lake: 1997948
#> Warning: attribute variables are assumed to be spatially constant throughout all geometries
#> Warning: attribute variables are assumed to be spatially constant throughout all geometries
#>     Found 1 outlet(s) and 4 inlet(s)
#> Warning: st_centroid assumes attributes are constant over geometries
#>   Processing lake: 7943245
#>     Found 1 outlet(s) and 5 inlet(s)
#> Warning: st_centroid assumes attributes are constant over geometries
#> Lake context complete.
# }