Spaces:
Sleeping
Sleeping
docs
Browse files
app.R
CHANGED
@@ -14,13 +14,21 @@ taxa <- open_dataset("https://minio.carlboettiger.info/public-inat/taxonomy/taxa
|
|
14 |
recursive = FALSE) |> rename(taxon_id = id)
|
15 |
cache <- tempfile(fileext = ".json")
|
16 |
|
17 |
-
|
|
|
|
|
18 |
ui <- page_sidebar(
|
19 |
title = "iNaturalist Rangemaps",
|
|
|
|
|
|
|
|
|
|
|
20 |
shinybusy::add_busy_spinner(),
|
21 |
sidebar = sidebar(
|
22 |
card(
|
23 |
-
|
|
|
24 |
varSelectInput("rank", NULL, taxa, selected = "class"),
|
25 |
textInput("taxon", NULL, "Aves")
|
26 |
),
|
@@ -31,7 +39,7 @@ ui <- page_sidebar(
|
|
31 |
)
|
32 |
)
|
33 |
|
34 |
-
|
35 |
server <- function(input, output, session) {
|
36 |
# observeEvent(input$map_bbox, { }) # We can react to any zoom/pan on the map
|
37 |
|
|
|
14 |
recursive = FALSE) |> rename(taxon_id = id)
|
15 |
cache <- tempfile(fileext = ".json")
|
16 |
|
17 |
+
|
18 |
+
|
19 |
+
###### User interface ######
|
20 |
ui <- page_sidebar(
|
21 |
title = "iNaturalist Rangemaps",
|
22 |
+
markdown("Visualize species richness from [iNaturalist Range map datasets](https://www.inaturalist.org/pages/range_maps).
|
23 |
+
Pan & zoom the map over the desired area and hit 'map richness', or draw the desired area with the draw tool.
|
24 |
+
Filter by specific taxonomic ranks or view all 100,293 mapped species.
|
25 |
+
Note that larger areas will be slower to compute. (Area selections that overlap the antimerdian may create visual artefacts).
|
26 |
+
"),
|
27 |
shinybusy::add_busy_spinner(),
|
28 |
sidebar = sidebar(
|
29 |
card(
|
30 |
+
markdown("Filter by taxonomic group or toggle off to see all species."),
|
31 |
+
input_switch("filter", "filter taxa:", value = TRUE),
|
32 |
varSelectInput("rank", NULL, taxa, selected = "class"),
|
33 |
textInput("taxon", NULL, "Aves")
|
34 |
),
|
|
|
39 |
)
|
40 |
)
|
41 |
|
42 |
+
###### Server ######
|
43 |
server <- function(input, output, session) {
|
44 |
# observeEvent(input$map_bbox, { }) # We can react to any zoom/pan on the map
|
45 |
|