Skip to content

Commit

Permalink
Fixed data references in loadData
Browse files Browse the repository at this point in the history
  • Loading branch information
amb26 committed Nov 11, 2024
1 parent 2c83b1a commit eba8377
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
7 changes: 0 additions & 7 deletions Galiano BioBlitz 2023.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@ knit: (function(inputFile, encoding) {

```{r, echo=FALSE, message=FALSE, warning=FALSE}
source("scripts/loadData.R")
library(tidyverse)
records <- read.csv("tabular_data/Galiano_Island_vascular_plant_records_consolidated-prepared.csv")
summary <- read.csv("tabular_data/Galiano_Tracheophyta_review_summary_reviewed_2024-10-07-assigned_revised.csv")
new <- summary %>% filter(str_detect(Reporting.Status, "new"))
confirmed <- summary %>% filter(Reporting.Status == 'confirmed')
reported <- summary %>% filter(Reporting.Status == 'reported')
observed <- summary %>% filter(Observation == 'observed')
```

## Community science contributions
Expand Down
12 changes: 6 additions & 6 deletions docs/Galiano-BioBlitz-2023.html
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2282,14 +2282,14 @@ <h1 class="title toc-ignore">Galiano BioBlitz 2023 outcomes: vascular
<div id="community-science-contributions" class="section level2">
<h2>Community science contributions</h2>
<p>Through the combined efforts of 25 individuals, the Hunterston Farms
naturalist community has now documented a total of 802 vascular plant
species. Based on search efforts over the last decade, 82 percent of the
historically reported plant diversity has been confirmed and 195 new
naturalist community has now documented a total of 191 vascular plant
species. Based on search efforts over the last decade, 97 percent of the
historically reported plant diversity has been confirmed and 16 new
species reports added to the list. Community members have now documented
85 percent of the plant diversity known to the region on
96 percent of the plant diversity known to the region on
iNaturalist.</p>
<div id="htmlwidget-91843466dcea8a9a24e3" style="width:672px;height:140px;" class="plotly html-widget"></div>
<script type="application/json" data-for="htmlwidget-91843466dcea8a9a24e3">{"x":{"visdat":{"2aa86ade3b7f":["function () ","plotlyVisDat"]},"cur_data":"2aa86ade3b7f","attrs":{"2aa86ade3b7f":{"x":{},"y":{},"orientation":"h","marker":{"color":"#5a96d2","line":{"color":"#5a96d2","width":1}},"name":"confirmed","alpha_stroke":1,"sizes":[10,100],"spans":[1,20],"type":"bar"},"2aa86ade3b7f.1":{"x":{},"y":{},"orientation":"h","marker":{"color":"#decb90","line":{"color":"#decb90","width":1}},"name":"historic","alpha_stroke":1,"sizes":[10,100],"spans":[1,20],"type":"bar","inherit":true},"2aa86ade3b7f.2":{"x":{},"y":{},"orientation":"h","marker":{"color":"#7562b4","line":{"color":"#7562b4","width":1}},"name":"new","alpha_stroke":1,"sizes":[10,100],"spans":[1,20],"type":"bar","inherit":true}},"layout":{"height":140,"margin":{"b":40,"l":60,"t":25,"r":10},"barmode":"stack","autosize":true,"showlegend":false,"xaxis":{"domain":[0,1],"automargin":true,"title":"Species Reporting Status"},"yaxis":{"domain":[0,1],"automargin":true,"title":"","showticklabels":false,"type":"category","categoryorder":"array","categoryarray":["records"]},"meta":{"mx_widgetId":"reportingStatus"},"hovermode":"closest"},"source":"A","config":{"modeBarButtonsToAdd":["hoverclosest","hovercompare"],"showSendToCloud":false,"displayModeBar":false,"responsive":true},"data":[{"x":[169],"y":["records"],"orientation":"h","marker":{"color":"#5a96d2","line":{"color":"#5a96d2","width":1}},"name":"confirmed","type":"bar","error_y":{"color":"rgba(31,119,180,1)"},"error_x":{"color":"rgba(31,119,180,1)"},"xaxis":"x","yaxis":"y","frame":null},{"x":[6],"y":["records"],"orientation":"h","marker":{"color":"#decb90","line":{"color":"#decb90","width":1}},"name":"historic","type":"bar","error_y":{"color":"rgba(255,127,14,1)"},"error_x":{"color":"rgba(255,127,14,1)"},"xaxis":"x","yaxis":"y","frame":null},{"x":[16],"y":["records"],"orientation":"h","marker":{"color":"#7562b4","line":{"color":"#7562b4","width":1}},"name":"new","type":"bar","error_y":{"color":"rgba(44,160,44,1)"},"error_x":{"color":"rgba(44,160,44,1)"},"xaxis":"x","yaxis":"y","frame":null}],"highlight":{"on":"plotly_click","persistent":false,"dynamic":false,"selectize":false,"opacityDim":0.20000000000000001,"selected":{"opacity":1},"debounce":0},"shinyEvents":["plotly_hover","plotly_click","plotly_selected","plotly_relayout","plotly_brushed","plotly_brushing","plotly_clickannotation","plotly_doubleclick","plotly_deselect","plotly_afterplot","plotly_sunburstclick"],"base_url":"https://plot.ly"},"evals":[],"jsHooks":[]}</script>
<div id="htmlwidget-8818f7c03a0dfee4a3ce" style="width:672px;height:140px;" class="plotly html-widget"></div>
<script type="application/json" data-for="htmlwidget-8818f7c03a0dfee4a3ce">{"x":{"visdat":{"a0f8b7c8c4":["function () ","plotlyVisDat"]},"cur_data":"a0f8b7c8c4","attrs":{"a0f8b7c8c4":{"x":{},"y":{},"orientation":"h","marker":{"color":"#5a96d2","line":{"color":"#5a96d2","width":1}},"name":"confirmed","alpha_stroke":1,"sizes":[10,100],"spans":[1,20],"type":"bar"},"a0f8b7c8c4.1":{"x":{},"y":{},"orientation":"h","marker":{"color":"#decb90","line":{"color":"#decb90","width":1}},"name":"historic","alpha_stroke":1,"sizes":[10,100],"spans":[1,20],"type":"bar","inherit":true},"a0f8b7c8c4.2":{"x":{},"y":{},"orientation":"h","marker":{"color":"#7562b4","line":{"color":"#7562b4","width":1}},"name":"new","alpha_stroke":1,"sizes":[10,100],"spans":[1,20],"type":"bar","inherit":true}},"layout":{"height":140,"margin":{"b":40,"l":60,"t":25,"r":10},"barmode":"stack","autosize":true,"showlegend":false,"xaxis":{"domain":[0,1],"automargin":true,"title":"Species Reporting Status"},"yaxis":{"domain":[0,1],"automargin":true,"title":"","showticklabels":false,"type":"category","categoryorder":"array","categoryarray":["records"]},"meta":{"mx_widgetId":"reportingStatus"},"hovermode":"closest"},"source":"A","config":{"modeBarButtonsToAdd":["hoverclosest","hovercompare"],"showSendToCloud":false,"displayModeBar":false,"responsive":true},"data":[{"x":[169],"y":["records"],"orientation":"h","marker":{"color":"#5a96d2","line":{"color":"#5a96d2","width":1}},"name":"confirmed","type":"bar","error_y":{"color":"rgba(31,119,180,1)"},"error_x":{"color":"rgba(31,119,180,1)"},"xaxis":"x","yaxis":"y","frame":null},{"x":[6],"y":["records"],"orientation":"h","marker":{"color":"#decb90","line":{"color":"#decb90","width":1}},"name":"historic","type":"bar","error_y":{"color":"rgba(255,127,14,1)"},"error_x":{"color":"rgba(255,127,14,1)"},"xaxis":"x","yaxis":"y","frame":null},{"x":[16],"y":["records"],"orientation":"h","marker":{"color":"#7562b4","line":{"color":"#7562b4","width":1}},"name":"new","type":"bar","error_y":{"color":"rgba(44,160,44,1)"},"error_x":{"color":"rgba(44,160,44,1)"},"xaxis":"x","yaxis":"y","frame":null}],"highlight":{"on":"plotly_click","persistent":false,"dynamic":false,"selectize":false,"opacityDim":0.20000000000000001,"selected":{"opacity":1},"debounce":0},"shinyEvents":["plotly_hover","plotly_click","plotly_selected","plotly_relayout","plotly_brushed","plotly_brushing","plotly_clickannotation","plotly_doubleclick","plotly_deselect","plotly_afterplot","plotly_sunburstclick"],"base_url":"https://plot.ly"},"evals":[],"jsHooks":[]}</script>
</div>
<div id="authors" class="section level2">
<h2>Authors</h2>
Expand Down
3 changes: 3 additions & 0 deletions scripts/loadData.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@ source("scripts/utils.R")
originalSummary <- read.csv("tabular_data/Galiano_Tracheophyta_review_summary_reviewed_2024-10-07-assigned_revised.csv")
filteredSummary <- read.csv("tabular_data/Galiano_Island_vascular_plant_records_consolidated-assigned-taxa.csv")

records <- read.csv("tabular_data/Galiano_Island_vascular_plant_records_consolidated-prepared.csv")

summary <- inner_join(x = originalSummary, y = filteredSummary, by = join_by(ID == id))

# Subset historic, confirmed and new records

new <- summary %>% filter(str_detect(Reporting.Status, "new"))
confirmed <- summary %>% filter(Reporting.Status == "confirmed")
reported <- summary %>% filter(Reporting.Status == "reported")
observed <- summary %>% filter(Observation == 'observed')

0 comments on commit eba8377

Please sign in to comment.