-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathakr_code_list.sql
197 lines (191 loc) · 3.09 KB
/
akr_code_list.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
--script to pull codes for all stocks
/*
1. Manually identify codes we want (start with AKR codes)
2. Define akr codes, names, end date, and start date as subtable
2.1 join ADFG codes
2.2 join OBS codes
2.3 join RACE codes
2.4 sort out dates....
3 join scientific names and tsn from ADFG.SPECIES run through taxize package
4 join iphc_codes from spreadsheet
5 join species groups with with species group contents
*/
--vector of codes
(
100, --flatfish unid
110, --pcod
116, --Bering flounder
117, --kamchatka
118, --deepwater flatfish
119, --shallow water flatfish
120, --misc flatfish
121, --atf
122, --flathead
123, --rock
124, --dover
125, --rex
126, --butter
127, --yellowfin
128, --english
129, --starry
130, --lingcod
131, --petrale
132, --sand sole
133, --ak plaice
134, --greenland
135, --greenstriped RF
136, --Northern RF
137, --Bocaccio
138, --Copper
139, --Other rf
141, --pop
142, --black rf
143, --Thornyhead
144, --slope
145, --yelloweye
146, --canary
147, --quillback
148, --tiger
149, --china
150, --rosethorn
151, --rougheye
152, --shortraker
153, --redbanded
154, --dusky
155, --yellowtail
156, --widow
157, --silvergray
158, --redstripe
159, --darkblotched
166, --sharpshin
167, --blue
168, --demersal shelf
169, --pelagic shelf
171, --Shortraker/Rougheye Rockfish
172, --Sharpchin/Northern Rockfish then dusky
173, --dark or other red
175, --yellowmouth
176, --Harlequin Rockfish
177, --Blackgill Rockfish
178, --Chilipepper Rockfish
179, --Pygmy
181, --shortbelly
182, --splitnose
183, --stripetail
184, --vermillion
185, --aurora
193, --atka
200, --halibut
213, --grenadiers
214,
230, --herr
235, --herr
270, --pollock
000, --salmon
410,
420,
430,
440,
450,
690, --shark
691,
692,
689,
700, --skate
701,
702,
703,
704,
705,
710, --sablefish
870 --octopus
);
--
--
with akr as
(select code akr_code, name akr_name, begin_date, end_date
(710, --sablefish
270, --pollock
110, --pcod
100, --flatfish unid
117, --kamchatka
118, --deepwater flatfish
119, --shallow water flatfish
120, --misc flatfish
121, --atf
122, --flathead
123, --rock
124, --dover
125, --rex
126, --butter
127, --yellowfin
128, --english
131, --petrale
132, --sand sole
133, --ak plaice
134, --greenland
135, --greenstriped RF
136, --Northern RF
137, --Bocaccio
138, --Copper
139, --Other rf
141, --pop
142, --black rf
143, --Thornyhead
144, --slope
145, --yelloweye
146, --canary
147, --quillback
148, --tiger
149, --china
150, --rosethorn
151, --rougheye
152, --shortraker
153, --redbanded
154, --dusky
155, --yellowtail
156, --widow
157, --silvergray
158, --redstripe
159, --darkblotched
166, --sharpshin
167, --blue
168, --demersal shelf
169, --pelagic shelf
171, --Shortraker/Rougheye Rockfish
172, --Sharpchin/Northern Rockfish then dusky
173, --dark or other red
175, --yellowmouth
176, --Harlequin Rockfish
177, --Blackgill Rockfish
178, --Chilipepper Rockfish
179, --Pygmy
181, --shortbelly
182, --splitnose
183, --stripetail
184, --vermillion
185, --aurora
193, --atka
870, --octopus
230, --herr
235, --herr
200, --halibut
000, --salmon
410,
420,
430,
440,
450,
690, --shark
691,
692,
689,
700, --skate
701,
702,
703,
704,
705,
213, --grenadiers
214
);