Skip to content

Commit

Permalink
docs(simple random example w/ polygon)
Browse files Browse the repository at this point in the history
  • Loading branch information
gottacatchenall committed Jan 24, 2025
1 parent 6acdd57 commit 7c83ca4
Showing 1 changed file with 27 additions and 2 deletions.
29 changes: 27 additions & 2 deletions docs/src/samplers/simplerandom.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,32 @@
# Simple Random Sampling



```@docs; canonical=false
SimpleRandom
```

## Example

First, load the packages we will use for this example

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

Using a Polygon as the domain

```@example 1
num_nodes = 50
corsica = SDT.gadm("FRA", "Corse")
bon = sample(SimpleRandom(num_nodes), corsica)
```

Now plot

```@example 1
f = Figure(size=(500, 500))
bonplot(f[1,1], bon, corsica, axistype=GeoAxis)
f
```

0 comments on commit 7c83ca4

Please sign in to comment.