-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
43115dc
commit 744c011
Showing
127 changed files
with
1,452 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"entries":[],"options":{"chapters":true},"headings":["our-objective","user-resources","background-of-the-gap_products-repo","major-advantages"]} | ||
{"headings":["our-objective","user-resources","background-of-the-gap_products-repo","major-advantages"],"entries":[],"options":{"chapters":true}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"hash": "cc747c053120d4d05915002dc8c2bcc2", | ||
"result": { | ||
"markdown": "---\ntitle: Access API data using R\n---\n\n\n\n\n\n\nUse the below function to pull AKFIN data through AKFIN's API.\n\n\n\n\n::: {.cell}\n\n```{.r .cell-code}\n# load libraries\nlibrary(dplyr)\nlibrary(magrittr)\nlibrary(httr)\nlibrary(flextable)\n\n# tell R to not use scientific notation\noptions(scipen=999)\n\n# function for pulling data from the api using the httr package\nget_gap_biomass<-function(area_id, species_code) {\n # paste(... collapse=\",\") puts commas between vector elements\n area_id <- paste(area_id, collapse = \",\")\n species_code <- paste(species_code, collapse = \",\")\n # httr code, parameters are after the '?'\n httr::content(\n httr::GET(paste0(\"https://apex.psmfc.org/akfin/data_marts/akmp/gap_biomass?area_id=\",\n area_id,\n \"&species_code=\",\n species_code)),\n type = \"application/json\") %>%\n # convert to data frame\n bind_rows()\n}\n```\n:::\n\n\n\n\n## Ex. 1: Load lingcod data\n\n\n\n\n::: {.cell tbl-cap='Ex. 1: Load lingcod data. '}\n\n```{.r .cell-code}\nlingcod_biomass <- get_gap_biomass(area_id=c(40, 41), species_code=21910)\nflextable::flextable(head(lingcod_biomass)) %>%\n flextable::theme_zebra()\n```\n:::\n", | ||
"supporting": [ | ||
"akfin-api-r_files" | ||
], | ||
"filters": [ | ||
"rmarkdown/pagebreak.lua" | ||
], | ||
"includes": {}, | ||
"engineDependencies": { | ||
"knitr": [ | ||
"{\"type\":\"list\",\"attributes\":{},\"value\":[]}" | ||
] | ||
}, | ||
"preserve": null, | ||
"postProcess": false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"hash": "cc747c053120d4d05915002dc8c2bcc2", | ||
"result": { | ||
"markdown": "---\ntitle: Access API data using R\n---\n\n\n\n\nUse the below function to pull AKFIN data through AKFIN's API.\n\n\n::: {.cell}\n\n```{.r .cell-code}\n# load libraries\nlibrary(dplyr)\nlibrary(magrittr)\nlibrary(httr)\nlibrary(flextable)\n\n# tell R to not use scientific notation\noptions(scipen=999)\n\n# function for pulling data from the api using the httr package\nget_gap_biomass<-function(area_id, species_code) {\n # paste(... collapse=\",\") puts commas between vector elements\n area_id <- paste(area_id, collapse = \",\")\n species_code <- paste(species_code, collapse = \",\")\n # httr code, parameters are after the '?'\n httr::content(\n httr::GET(paste0(\"https://apex.psmfc.org/akfin/data_marts/akmp/gap_biomass?area_id=\",\n area_id,\n \"&species_code=\",\n species_code)),\n type = \"application/json\") %>%\n # convert to data frame\n bind_rows()\n}\n```\n:::\n\n\n## Ex. 1: Load lingcod data\n\n\n::: {.cell tbl-cap='Ex. 1: Load lingcod data. '}\n\n```{.r .cell-code}\nlingcod_biomass <- get_gap_biomass(area_id=c(40, 41), species_code=21910)\nflextable::flextable(head(lingcod_biomass)) %>%\n flextable::theme_zebra()\n```\n:::\n", | ||
"supporting": [], | ||
"filters": [ | ||
"rmarkdown/pagebreak.lua" | ||
], | ||
"includes": {}, | ||
"engineDependencies": {}, | ||
"preserve": {}, | ||
"postProcess": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"hash": "cc747c053120d4d05915002dc8c2bcc2", | ||
"result": { | ||
"markdown": "---\ntitle: Access API data using R\n---\n\n\n\n\n\nUse the below function to pull AKFIN data through AKFIN's API.\n\n\n\n::: {.cell}\n\n```{.r .cell-code}\n# load libraries\nlibrary(dplyr)\nlibrary(magrittr)\nlibrary(httr)\nlibrary(flextable)\n\n# tell R to not use scientific notation\noptions(scipen=999)\n\n# function for pulling data from the api using the httr package\nget_gap_biomass<-function(area_id, species_code) {\n # paste(... collapse=\",\") puts commas between vector elements\n area_id <- paste(area_id, collapse = \",\")\n species_code <- paste(species_code, collapse = \",\")\n # httr code, parameters are after the '?'\n httr::content(\n httr::GET(paste0(\"https://apex.psmfc.org/akfin/data_marts/akmp/gap_biomass?area_id=\",\n area_id,\n \"&species_code=\",\n species_code)),\n type = \"application/json\") %>%\n # convert to data frame\n bind_rows()\n}\n```\n:::\n\n\n\n## Ex. 1: Load lingcod data\n\n\n\n::: {.cell tbl-cap='Ex. 1: Load lingcod data. '}\n\n```{.r .cell-code}\nlingcod_biomass <- get_gap_biomass(area_id=c(40, 41), species_code=21910)\nflextable::flextable(head(lingcod_biomass)) %>%\n flextable::theme_zebra()\n```\n:::\n", | ||
"supporting": [ | ||
"akfin-api-r_files" | ||
], | ||
"filters": [ | ||
"rmarkdown/pagebreak.lua" | ||
], | ||
"includes": {}, | ||
"engineDependencies": { | ||
"knitr": [ | ||
"{\"type\":\"list\",\"attributes\":{},\"value\":[]}" | ||
] | ||
}, | ||
"preserve": null, | ||
"postProcess": false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"hash": "e233e051e22afdbc021da71ed102a06e", | ||
"result": { | ||
"markdown": "---\ntitle: AKFIN\n---\n\n\n\n\n\n\nThese data are used directly by stock assessors and are provided to The [Alaska Fisheries Information Network (AKFIN)]. \n\n## The Alaska Fisheries Information Network\n\nThe [Alaska Fisheries Information Network (AKFIN)](https://www.psmfc.org/program/alaska-fisheries-information-network-akfin) is a regional program that consolidates and supports the collection, processing, analysis, and reporting of fisheries statistics for North Pacific and Alaskan fisheries. AKFIN integrates this information into a single data management system using consistent methods and standardized formats. The Network then reports this information on its website, in various publications, and to researchers. The resulting data enables fishery managers, scientists, and associated agencies to supervise fisheries resources more effectively and efficiently. \n\nIf you are an AFSC employee with access to data through our internal database Oracle server, use this [guide](https://afsc-gap-products.github.io/gap_products/content/akfin-oracle-sql-r.html) to access our data. If not, reach out to AKFIN for a user account. \n\n## Cite this data\n\nUse the below [bibtext citations](https://github.com/afsc-gap-products/gap_products/blob/main/code/CITATION_GAPakfin.bib), as cited in our group's [citation repository](https://github.com/afsc-gap-products/citations/blob/main/cite/bibliography.bib) for citing the data created and maintained in this repo [@GAPakfin]. Add \"note = {Accessed: mm/dd/yyyy}\" to append the day this data was accessed. \n\n\n\n\n::: {.cell}\n::: {.cell-output .cell-output-stdout}\n```\n@misc{GAPakfin,\n author = {{Alaska Fisheries Information Network (AKFIN)}}, \n institution = {{NOAA Fisheries Alaska Fisheries Science Center, Goundfish Assessment Program}},\n year = {2023}, \n title = {AFSC Goundfish Assessment Program Design-Based Production Data},\n howpublished = {https://www.psmfc.org/program/alaska-fisheries-information-network-akfin},\n publisher = {{U.S. Dep. Commer.}},\n copyright = {Public Domain} \n}\n```\n:::\n:::\n", | ||
"supporting": [ | ||
"akfin-intro_files" | ||
], | ||
"filters": [ | ||
"rmarkdown/pagebreak.lua" | ||
], | ||
"includes": {}, | ||
"engineDependencies": { | ||
"knitr": [ | ||
"{\"type\":\"list\",\"attributes\":{},\"value\":[]}" | ||
] | ||
}, | ||
"preserve": null, | ||
"postProcess": false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"hash": "e233e051e22afdbc021da71ed102a06e", | ||
"result": { | ||
"markdown": "---\ntitle: AKFIN\n---\n\n\n\n\nThese data are used directly by stock assessors and are provided to The [Alaska Fisheries Information Network (AKFIN)]. \n\n## The Alaska Fisheries Information Network\n\nThe [Alaska Fisheries Information Network (AKFIN)](https://www.psmfc.org/program/alaska-fisheries-information-network-akfin) is a regional program that consolidates and supports the collection, processing, analysis, and reporting of fisheries statistics for North Pacific and Alaskan fisheries. AKFIN integrates this information into a single data management system using consistent methods and standardized formats. The Network then reports this information on its website, in various publications, and to researchers. The resulting data enables fishery managers, scientists, and associated agencies to supervise fisheries resources more effectively and efficiently. \n\nIf you are an AFSC employee with access to data through our internal database Oracle server, use this [guide](https://afsc-gap-products.github.io/gap_products/content/akfin-oracle-sql-r.html) to access our data. If not, reach out to AKFIN for a user account. \n\n## Cite this data\n\nUse the below [bibtext citations](https://github.com/afsc-gap-products/gap_products/blob/main/code/CITATION_GAPakfin.bib), as cited in our group's [citation repository](https://github.com/afsc-gap-products/citations/blob/main/cite/bibliography.bib) for citing the data created and maintained in this repo [@GAPakfin]. Add \"note = {Accessed: mm/dd/yyyy}\" to append the day this data was accessed. \n\n\n::: {.cell}\n::: {.cell-output .cell-output-stdout}\n```\n@misc{GAPakfin,\n author = {{Alaska Fisheries Information Network (AKFIN)}}, \n institution = {{NOAA Fisheries Alaska Fisheries Science Center, Goundfish Assessment Program}},\n year = {2023}, \n title = {AFSC Goundfish Assessment Program Design-Based Production Data},\n howpublished = {https://www.psmfc.org/program/alaska-fisheries-information-network-akfin},\n publisher = {{U.S. Dep. Commer.}},\n copyright = {Public Domain} \n}\n```\n:::\n:::\n", | ||
"supporting": [], | ||
"filters": [ | ||
"rmarkdown/pagebreak.lua" | ||
], | ||
"includes": {}, | ||
"engineDependencies": {}, | ||
"preserve": {}, | ||
"postProcess": true | ||
} | ||
} |
Oops, something went wrong.