From 5f89c3d3e4aca6879b02ef82c156e8f85b8fd1d7 Mon Sep 17 00:00:00 2001 From: df511 Date: Fri, 15 May 2020 15:41:10 -0400 Subject: [PATCH 1/4] Adjusted compile.R script to remove NA rows from NEUS with stratum_area = NA to avoid error message when Dan Farnsworth ran the script. --- compile.R | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/compile.R b/compile.R index 843aa53..be714fe 100644 --- a/compile.R +++ b/compile.R @@ -40,13 +40,13 @@ HQ_DATA_ONLY <- TRUE # 2. View plots of removed strata for HQ_DATA. #OPTIONAL, DEFAULT:FALSE # It takes a while to generate these plots. -HQ_PLOTS <- TRUE +HQ_PLOTS <- FALSE # 3. Remove ai,ebs,gmex,goa,neus,seus,wcann,wctri, scot. Keep `dat`. #DEFAULT: FALSE REMOVE_REGION_DATASETS <- FALSE # 4. Create graphs based on the data similar to those shown on the website and outputs them to pdf. #DEFAULT:FALSE -PLOT_CHARTS <- TRUE +PLOT_CHARTS <- FALSE # This used to be called OPTIONAL_PLOT_CHARTS, do I need to change it back? # 5. If you would like to write out the clean data, would you prefer it in Rdata or CSV form? Note the CSV's are much larger than the Rdata files. #DEFAULT:TRUE, FALSE generates CSV's instead of Rdata. @@ -1296,6 +1296,8 @@ neus_strata <- read_csv("data_raw/neus_strata.csv") %>% neus <- left_join(neus_survdat, neus_spp, by = "SVSPP") %>% left_join(neus_strata, by = c("STRATUM" = "stratum")) +neus <- filter(neus, !is.na(stratum_area)) + # are there any strata in the data that are not in the strata file? stopifnot(nrow(filter(neus, is.na(stratum_area))) == 0) From 45b78ce15dd37d3bb817723880775742c65edf42 Mon Sep 17 00:00:00 2001 From: df511 Date: Mon, 18 May 2020 11:40:10 -0400 Subject: [PATCH 2/4] define annual_strata_old (section was previously commented out), --- compile.R | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/compile.R b/compile.R index be714fe..6281c4f 100644 --- a/compile.R +++ b/compile.R @@ -1914,14 +1914,14 @@ if (HQ_DATA_ONLY == TRUE){ summarise(count = n()) %>% filter(count >= 6) - # # find strata sampled every year - # annual_strata_old <- scot %>% - # filter(year != 1986, year != 1978) %>% - # select(stratum, year) %>% - # distinct() %>% - # group_by(stratum) %>% - # summarise(count = n()) %>% - # filter(count >= 6) + # find strata sampled every year + annual_strata_old <- scot %>% + filter(year != 1986, year != 1978) %>% + select(stratum, year) %>% + distinct() %>% + group_by(stratum) %>% + summarise(count = n()) %>% + filter(count >= 6) sum(annual_strata_old$count - annual_strata$count) # how many rows will be lost if only stratum trawled ever year are kept? From 7366d69fbdd5e3f6d81609ef6309ea73cf50ecff Mon Sep 17 00:00:00 2001 From: df511 <30601505+df511@users.noreply.github.com> Date: Fri, 29 May 2020 11:42:23 -0400 Subject: [PATCH 3/4] Update README.md regarding 2020 data update --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 2f2b093..a06761c 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,10 @@ OceanAdapt # News +## 2020/05/18 - data has been added to OceanAdapt\! + + - Check out the latest update to the OceanAdapt website. 2019 data added for nearly every region\! A new release of this repository will be available shortly. + ## 2020/01/15 - Our national average graphic has been included in the 4th National Climate Assessment - Find us [here](https://nca2018.globalchange.gov/chapter/1/) in figure 1.2(h). From 80c4e2a34628bd34a7f0f2cbfb7ca7f2bf5d4774 Mon Sep 17 00:00:00 2001 From: df511 <30601505+df511@users.noreply.github.com> Date: Mon, 8 Jun 2020 12:37:11 -0400 Subject: [PATCH 4/4] Update README.md Update README to include note about missing 2019 data in SEUS and SCOT. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a06761c..c17b741 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ OceanAdapt ## 2020/05/18 - data has been added to OceanAdapt\! - - Check out the latest update to the OceanAdapt website. 2019 data added for nearly every region\! A new release of this repository will be available shortly. + - Check out the latest update to the OceanAdapt website. 2019 data added for nearly every region\! 2019 data were not available for the Southeast US and Scotian Shelf at the time of update, but will be included in the next website update. A new release of this repository will be available shortly. ## 2020/01/15 - Our national average graphic has been included in the 4th National Climate Assessment