-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(simple random example w/ polygon)
- Loading branch information
1 parent
6acdd57
commit 7c83ca4
Showing
1 changed file
with
27 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
``` |