Skip to content

Commit

Permalink
docs(adaptive hotspot example)
Browse files Browse the repository at this point in the history
  • Loading branch information
gottacatchenall committed Jan 24, 2025
1 parent 26f3e06 commit d79a017
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions docs/src/samplers/adaptivehotspot.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Adaptive Hotspot


```@docs; canonical=false
AdaptiveHotspot
```

## Example

### Using a raster

First, load the packages we will use for this example

```@example 1
using BiodiversityObservationNetworks
using CairoMakie
using GeoMakie
using NeutralLandscapes
import SpeciesDistributionToolkit as SDT
```

Now we'll generate a synthetic uncertainty layer using
[`NeutralLandscapes.jl`](http://docs.ecojulia.org/NeutralLandscapes.jl/dev/).


```@example 1
uncertainty = rand(MidpointDisplacement(), (100, 100))
```

Let's plot it

```@example 1
heatmap(uncertainty)
```

and now we sample a BON

```@example 1
bon = sample(AdaptiveHotspot(), uncertainty)
```

and plot it

```@example 1
f = Figure()
bonplot(f[1,1], bon, uncertainty)
f
```

0 comments on commit d79a017

Please sign in to comment.