You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: R/get_commercial_data.R
+13-28Lines changed: 13 additions & 28 deletions
Original file line number
Diff line number
Diff line change
@@ -6,17 +6,17 @@
6
6
#' overview-- This code creates six economic commercial fishing indicators used in ESP work.
7
7
#' The code below pulls data, deflates any monetary values and formats data to what is needed for the time series plots.
8
8
#' Must have access to the 'NEFSC_GARFO' schema in Oracle to run this code.
9
-
#' Indicators created: Commercial Landings (LBS): The total weight of the species landed (e.g., Commercial_LONGFINSQUID_Landings_LBS).
10
9
#'
10
+
#' Indicators created: Commercial Landings (LBS): The total weight of the species landed (e.g., Commercial_LONGFINSQUID_Landings_LBS).
11
11
#' Number of Commercial Vessels: The count of unique permits landing that species (e.g., N_Commercial_Vessels_Landing_LONGFINSQUID).
12
-
#' Average Price per Pound: The average annual price, winsorized to handle outliers and adjusted for inflation (e.g., AVGPRICE_LONGFINSQUID_2024_DOLlb).
13
-
#' Total Annual Revenue: The total value of all landings for that species, adjusted for inflation (e.g., TOTALANNUALREV_LONGFINSQUID_2024Dols).
14
-
#' Average Revenue per Vessel: The average revenue earned per permit per year, adjusted for inflation (e.g., AVGVESREVperYr_LONGFINSQUID_2024_DOLlb).
15
-
#' Average Annual Diesel Price: The price of Ultra-Low-Sulfur No. 2 Diesel (from FRED), adjusted for inflation (e.g., AVGANNUAL_DIESEL_PRICE2024dols).
12
+
#' Average Price per Pound: The average annual price, winsorized to handle outliers and adjusted for inflation (e.g., AVGPRICE_LONGFINSQUID_2025_DOLlb).
13
+
#' Total Annual Revenue: The total value of all landings for that species, adjusted for inflation (e.g., TOTALANNUALREV_LONGFINSQUID_2025Dols).
14
+
#' Average Revenue per Vessel: The average revenue earned per permit per year, adjusted for inflation (e.g., AVGVESREVperYr_LONGFINSQUID_2025_DOLlb).
15
+
#' Average Annual Diesel Price: The price of Ultra-Low-Sulfur No. 2 Diesel (from FRED), adjusted for inflation (e.g., AVGANNUAL_DIESEL_PRICE2025dols).
16
16
#'
17
17
#' This uses CFDERS data but may need to be updated to CAMs
18
18
#'
19
-
#' before running!!!
19
+
#' before running!!!
20
20
#' make sure you are connected to VPN
21
21
#' ensure all packages are installed
22
22
#' you have a folder in your directory called "data"
@@ -27,7 +27,7 @@
27
27
#' @param ora_id username for Oracle connection (in quotation marks)
28
28
#' @param oraprod_pw password for Oracle connection (in quotation marks)
29
29
#' @param spp_name the name of the species you want to pull (e.g., "LONGFINSQUID")
30
-
#' @param nespp3_codes the NESPP3 codes for the species you want to (e.g., "('801')") - note the single quotes inside the string for SQL
30
+
#' @param nespp3_codes the NESPP3 codes for the species you want to pull (e.g., "('801')") - note the single quotes inside the string for SQL
31
31
#' @param START.YEAR the first year you want to pull (e.g., 1996)
32
32
#' @param END.YEAR the last year you want to pull (e.g., 2025)
33
33
#' @param deflate_yr the year you want to deflate to (e.g, 2025)
0 commit comments