Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bump makie and rasters compat #23

Merged
merged 2 commits into from
Jan 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ GLM = "1.9.0"
GeoInterface = "1"
Loess = "0.6"
MLJBase = "1.7.0"
Makie = "0.20, 0.21"
Makie = "0.20, 0.21, 0.22"
PrettyTables = "2"
Rasters = "0.13"
Rasters = "0.13, 0.14"
ScientificTypesBase = "3"
Shapley = "0.1"
StatisticalMeasures = "0.1.5"
Expand Down
9 changes: 3 additions & 6 deletions docs/src/eucalyptus_regnans.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,12 @@ occurrences = thin(occurrences_raw.geometry, 5000)
## Background points
Next, we sample random points to use as background points.

From Rasters 0.12.1 on, this will be easier with Rasters.sample!

Let's plot both the occurrence and background points to see where _Eucalyptus regnans_ is found.

```@example test
using StatsBase
bg_indices = sample(findall(boolmask(bio_aus)), 500)
bg_points = DimPoints(bio_aus)[bg_indices]
using StatsBase # to active Rasters.sample
bg_data = Rasters.sample(bio_aus, 500; skipmissing = true, geometry = (X,Y))
bg_points = getproperty.(bg_data, :geometry)
fig, ax, pl = plot(bio_aus.bio1)
scatter!(ax, occurrences; color = :red)
scatter!(ax, bg_points; color = :grey)
Expand All @@ -54,7 +52,6 @@ SpeciesDistributionModels.jl has a [sdmdata](@ref) function to handle input data
```@example test
using SpeciesDistributionModels
p_data = extract(bio_aus, occurrences; skipmissing = true)
bg_data = bio_aus[bg_indices]
data = sdmdata(p_data, bg_data; resampler = CV(nfolds = 3))
```

Expand Down
Loading