|
2 | 2 | output: github_document |
3 | 3 | --- |
4 | 4 |
|
5 | | -## metaMapWidget: R Wrapper for the meta-map-widget Leaflet widget |
6 | | - |
7 | | -```{r} |
8 | | -library(metaMapWidgetR) |
9 | | -df <- tibble::tibble( |
10 | | - latitude = runif(20, min = 34.0, max = 45.0), |
11 | | - longitude = runif(20, min = -120.0, max = -75.0), |
12 | | - name = paste("Sample", 1:20), |
13 | | - color_by = c(rep('type;proportion_infected;comically_small_test_column', 10), rep('type', 10)), |
14 | | - type = sample(c("Nursery", "Forest", "Urban", "Farm"), 20, replace = TRUE), |
15 | | - proportion_infected = runif(20), |
16 | | - comically_small_test_column = sample(c(0.000001898, 0.0000000023678876, 0.0024), 20, replace = TRUE) |
17 | | -) |
18 | | -print(df) |
19 | | -
|
20 | | -example_data_path <- system.file('extdata', 'data.csv', package = 'metaMapWidgetR') |
21 | | -
|
22 | | -meta_map_widget(df) |
23 | | -meta_map_widget(example_data_path) |
| 5 | +```{r setup, include=FALSE} |
| 6 | +knitr::opts_chunk$set(message = FALSE, warning = FALSE) |
24 | 7 | ``` |
25 | 8 |
|
| 9 | +# metaMapWidget: R Wrapper for the meta-map-widget Leaflet widget |
26 | 10 |
|
| 11 | +This package allows users to view the locations of custom data samples and their various attributes using an interactive map widget. The widget may be embedded in Rmd/Quarto documents. |
27 | 12 |
|
| 13 | +## Installation |
28 | 14 |
|
29 | | -```{r} |
30 | | -library(rgbif) |
31 | | -occ_data <- occ_search(scientificName = "Bombus franklini") |
32 | | -occ_table <- occ_data$data |
33 | | -occ_table$latitude <- occ_table$decimalLatitude |
34 | | -occ_table$longitude <- occ_table$decimalLongitude |
35 | | -meta_map_widget(occ_table) |
| 15 | +For now, metaMapWidgetR is only available on Github and can be installed with devtools: |
| 16 | + |
| 17 | +```{r eval=FALSE} |
| 18 | +devtools::install_github('grunwaldlab/metaMapWidgetR') |
36 | 19 | ``` |
37 | 20 |
|
| 21 | +```{r child='vignettes/articles/quickstart.Rmd'} |
| 22 | +``` |
0 commit comments