Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
df511 committed Jun 8, 2020
2 parents d3c8e7d + 80c4e2a commit c913be5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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\! 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

- Find us [here](https://nca2018.globalchange.gov/chapter/1/) in figure 1.2(h).
Expand Down
22 changes: 12 additions & 10 deletions compile.R
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -1912,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?
Expand Down

0 comments on commit c913be5

Please sign in to comment.