Spaces:
Sleeping
Sleeping
:duck:
Browse files
test.R
CHANGED
@@ -1,4 +1,38 @@
|
|
1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
## Illustrate/test core app functionality without shiny
|
4 |
library(dplyr)
|
|
|
1 |
|
2 |
+
source("utils.R")
|
3 |
+
source("inat-ranges.R")
|
4 |
+
|
5 |
+
url <- "https://s3-west.nrp-nautilus.io/public-data/cache/inat/f0108ef86feababffeab3d2be6f09373.h3j"
|
6 |
+
#url <- "https://minio.carlboettiger.info/public-data/cache/inat/4fd3323845ee860b39609783566b2212.h3j"
|
7 |
+
|
8 |
+
url <- "https://minio.carlboettiger.info/public-data/cache/inat/f0108ef86feababffeab3d2be6f09373.h3j"
|
9 |
+
|
10 |
+
#x <- jsonlite::read_json(url)
|
11 |
+
|
12 |
+
m = maplibre(center = c(-110,37), zoom=3) |>
|
13 |
+
add_draw_control() |>
|
14 |
+
add_h3j_source("h3j_source",
|
15 |
+
url = url
|
16 |
+
) |>
|
17 |
+
add_fill_extrusion_layer(
|
18 |
+
id = "h3j_layer",
|
19 |
+
source = "h3j_source",
|
20 |
+
tooltip = "n",
|
21 |
+
fill_extrusion_color = viridis_pal("height"),
|
22 |
+
fill_extrusion_height = list(
|
23 |
+
"interpolate",
|
24 |
+
list("linear"),
|
25 |
+
list("zoom"),
|
26 |
+
0,
|
27 |
+
0, 1,
|
28 |
+
list("*", 100000, list("get", "height"))
|
29 |
+
),
|
30 |
+
fill_extrusion_opacity = 0.7
|
31 |
+
)
|
32 |
+
|
33 |
+
|
34 |
+
htmlwidgets::saveWidget(m, "test2.html")
|
35 |
+
|
36 |
|
37 |
## Illustrate/test core app functionality without shiny
|
38 |
library(dplyr)
|