Skip to content

Commit

Permalink
added processed date to datapull.txt file
Browse files Browse the repository at this point in the history
- read processed date from datapull.txt in readme
- Added installation instructions
  • Loading branch information
andybeet committed Jan 21, 2023
1 parent 3aceaa0 commit 913acae
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 7 deletions.
10 changes: 9 additions & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,23 @@ The data are extracted and processed from NOAA's [Stock SMART](https://apps-st.f
Any data issues found in this package should first be checked with the web based data portal. If this data package reflects the data found in the web portal please send emails to `[email protected]`. Otherwise please create an [issue](https://github.com/NOAA-EDAB/stocksmart/issues/new/choose)


*Date of most recent data pull: `r strsplit(as.character(file.mtime(here::here("data-raw","datapull.txt")))," ")[[1]][1]`*
*Date of most recent data pull: `r readLines(here::here("data-raw","datapull.txt"),n=1)`*

Note: Data is retrieved and processed every Wednesday at 1200 EST. Any changes to the [Stock SMART](https://apps-st.fisheries.noaa.gov/stocksmart) website will be reflected in this data package at that time. The history of changes can be found in the [changelog](https://noaa-edab.github.io/stocksmart/news/index.html)

## Feature requests/Data Issues/Bugs

If you find any [issue with the data](https://github.com/NOAA-EDAB/stocksmart/issues/new/choose), [bugs](https://github.com/NOAA-EDAB/stocksmart/issues/new/choose) in any of the code, or want to request [new features](https://github.com/NOAA-EDAB/stocksmart/issues/new/choose) please let us know

## Usage

### Installation

```remotes::install_github("NOAA-EDAB/stocksmart")```

<!-- ### Getting started -->

<!-- Please see the [getting started guide](tbd) in the package documentation -->


## Contact
Expand Down
20 changes: 15 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@ great deal of information. This repo contains time series data for all
Federally assessed stocks in the United States. The following time
series are available:

- Catch - By weight or by number of individuals (species specific)
- Abundance - By weight or by number of individuals (species specific)
- Index - An index of abundance (shrimp only)
- Recruitment - By weight or by number of individuals (species specific)
- Fishing mortality
- Catch - By weight or by number of individuals (species specific)
- Abundance - By weight or by number of individuals (species specific)
- Index - An index of abundance (shrimp only)
- Recruitment - By weight or by number of individuals (species
specific)
- Fishing mortality

Summary statistics for these assessments are also available (FMSY, BMSY,
Ftarget etc) in addition to metadata (Stock Name, Stock Area,
Expand Down Expand Up @@ -53,6 +54,15 @@ of the code, or want to request [new
features](https://github.com/NOAA-EDAB/stocksmart/issues/new/choose)
please let us know

## Usage

### Installation

`remotes::install_github("NOAA-EDAB/stocksmart")`

<!-- ### Getting started -->
<!-- Please see the [getting started guide](tbd) in the package documentation -->

## Contact

| [andybeet](https://github.com/andybeet) |
Expand Down
1 change: 1 addition & 0 deletions data-raw/datapull.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
2023-01-18
Number of files read = 25
number of rows of data object = 250488
number of rows stocksmart data object = 250488
Expand Down
4 changes: 3 additions & 1 deletion data-raw/process_stocksmart_ts_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ process_stocksmart_ts_data <- function(exportFile=F,isRunLocal=T) {
}

file.create(here::here("data-raw",fn))
cat(paste0("Number of files read = ",nrow(files),"\n"),file=here::here("data-raw",fn))
dateCreated <- Sys.Date()
cat(paste0(dateCreated,"\n"),file=here::here("data-raw",fn))
cat(paste0("Number of files read = ",nrow(files),"\n"),file=here::here("data-raw",fn),append=T)
cat(paste0("number of rows of data object = ",nrow(stockAssessmentData),"\n"),file=here::here("data-raw",fn),append = T)
cat(paste0("number of rows stocksmart data object = ",nrow(stocksmart::stockAssessmentData),"\n"),file=here::here("data-raw",fn),append = T)

Expand Down

0 comments on commit 913acae

Please sign in to comment.