usgs-ruby 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.rubocop.yml +87 -0
- data/CHANGELOG.md +5 -0
- data/CODE_OF_CONDUCT.md +84 -0
- data/LICENSE.txt +21 -0
- data/README.md +256 -0
- data/Rakefile +24 -0
- data/docs/Usgs/Client.html +563 -0
- data/docs/Usgs/DailyValues.html +338 -0
- data/docs/Usgs/InstantaneousValues.html +329 -0
- data/docs/Usgs/Models/Reading.html +1124 -0
- data/docs/Usgs/Models/Site.html +2030 -0
- data/docs/Usgs/Models/Statistic.html +3981 -0
- data/docs/Usgs/Models.html +117 -0
- data/docs/Usgs/Parser.html +346 -0
- data/docs/Usgs/Parsers/RdbParser.html +354 -0
- data/docs/Usgs/Parsers/SiteParser.html +174 -0
- data/docs/Usgs/Parsers/StatisticsParser.html +228 -0
- data/docs/Usgs/Parsers/TimeSeriesParser.html +189 -0
- data/docs/Usgs/Parsers.html +117 -0
- data/docs/Usgs/Site.html +445 -0
- data/docs/Usgs/Statistics.html +335 -0
- data/docs/Usgs/Utils.html +357 -0
- data/docs/Usgs.html +303 -0
- data/docs/_index.html +286 -0
- data/docs/class_list.html +54 -0
- data/docs/css/common.css +1 -0
- data/docs/css/full_list.css +58 -0
- data/docs/css/style.css +503 -0
- data/docs/file.README.html +111 -0
- data/docs/file_list.html +59 -0
- data/docs/frames.html +22 -0
- data/docs/index.html +111 -0
- data/docs/js/app.js +344 -0
- data/docs/js/full_list.js +242 -0
- data/docs/js/jquery.js +4 -0
- data/docs/method_list.html +598 -0
- data/docs/top-level-namespace.html +110 -0
- data/lib/usgs/client.rb +62 -0
- data/lib/usgs/daily_values.rb +38 -0
- data/lib/usgs/instantaneous_values.rb +35 -0
- data/lib/usgs/models/reading.rb +43 -0
- data/lib/usgs/models/site.rb +61 -0
- data/lib/usgs/models/statistic.rb +95 -0
- data/lib/usgs/parser.rb +23 -0
- data/lib/usgs/parsers/rdb_parser.rb +55 -0
- data/lib/usgs/parsers/site_parser.rb +13 -0
- data/lib/usgs/parsers/statistics_parser.rb +40 -0
- data/lib/usgs/parsers/time_series_parser.rb +54 -0
- data/lib/usgs/site.rb +50 -0
- data/lib/usgs/statistics.rb +42 -0
- data/lib/usgs/utils.rb +50 -0
- data/lib/usgs/version.rb +5 -0
- data/lib/usgs.rb +28 -0
- data/sig/usgs/ruby.rbs +6 -0
- data/usgs-ruby.gemspec +48 -0
- metadata +231 -0
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>
|
|
7
|
+
Module: Usgs::Parsers::StatisticsParser
|
|
8
|
+
|
|
9
|
+
— Documentation by YARD 0.9.37
|
|
10
|
+
|
|
11
|
+
</title>
|
|
12
|
+
|
|
13
|
+
<link rel="stylesheet" href="../../css/style.css" type="text/css" />
|
|
14
|
+
|
|
15
|
+
<link rel="stylesheet" href="../../css/common.css" type="text/css" />
|
|
16
|
+
|
|
17
|
+
<script type="text/javascript">
|
|
18
|
+
pathId = "Usgs::Parsers::StatisticsParser";
|
|
19
|
+
relpath = '../../';
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
|
|
24
|
+
|
|
25
|
+
<script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
</head>
|
|
29
|
+
<body>
|
|
30
|
+
<div class="nav_wrap">
|
|
31
|
+
<iframe id="nav" src="../../class_list.html?1"></iframe>
|
|
32
|
+
<div id="resizer"></div>
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
<div id="main" tabindex="-1">
|
|
36
|
+
<div id="header">
|
|
37
|
+
<div id="menu">
|
|
38
|
+
|
|
39
|
+
<a href="../../_index.html">Index (S)</a> »
|
|
40
|
+
<span class='title'><span class='object_link'><a href="../../Usgs.html" title="Usgs (module)">Usgs</a></span></span> » <span class='title'><span class='object_link'><a href="../Parsers.html" title="Usgs::Parsers (module)">Parsers</a></span></span>
|
|
41
|
+
»
|
|
42
|
+
<span class="title">StatisticsParser</span>
|
|
43
|
+
|
|
44
|
+
</div>
|
|
45
|
+
|
|
46
|
+
<div id="search">
|
|
47
|
+
|
|
48
|
+
<a class="full_list_link" id="class_list_link"
|
|
49
|
+
href="../../class_list.html">
|
|
50
|
+
|
|
51
|
+
<svg width="24" height="24">
|
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
|
55
|
+
</svg>
|
|
56
|
+
</a>
|
|
57
|
+
|
|
58
|
+
</div>
|
|
59
|
+
<div class="clear"></div>
|
|
60
|
+
</div>
|
|
61
|
+
|
|
62
|
+
<div id="content"><h1>Module: Usgs::Parsers::StatisticsParser
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
</h1>
|
|
67
|
+
<div class="box_info">
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
<dl>
|
|
80
|
+
<dt>Defined in:</dt>
|
|
81
|
+
<dd>lib/usgs/parsers/statistics_parser.rb</dd>
|
|
82
|
+
</dl>
|
|
83
|
+
|
|
84
|
+
</div>
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
<h2>
|
|
95
|
+
Class Method Summary
|
|
96
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
|
97
|
+
</h2>
|
|
98
|
+
|
|
99
|
+
<ul class="summary">
|
|
100
|
+
|
|
101
|
+
<li class="public ">
|
|
102
|
+
<span class="summary_signature">
|
|
103
|
+
|
|
104
|
+
<a href="#parse-class_method" title="parse (class method)">.<strong>parse</strong>(rdb_text) ⇒ Object </a>
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
</span>
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
|
119
|
+
|
|
120
|
+
</li>
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
</ul>
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
<div id="class_method_details" class="method_details_list">
|
|
129
|
+
<h2>Class Method Details</h2>
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
<div class="method_details first">
|
|
133
|
+
<h3 class="signature first" id="parse-class_method">
|
|
134
|
+
|
|
135
|
+
.<strong>parse</strong>(rdb_text) ⇒ <tt>Object</tt>
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
</h3><table class="source_code">
|
|
142
|
+
<tr>
|
|
143
|
+
<td>
|
|
144
|
+
<pre class="lines">
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
7
|
|
148
|
+
8
|
|
149
|
+
9
|
|
150
|
+
10
|
|
151
|
+
11
|
|
152
|
+
12
|
|
153
|
+
13
|
|
154
|
+
14
|
|
155
|
+
15
|
|
156
|
+
16
|
|
157
|
+
17
|
|
158
|
+
18
|
|
159
|
+
19
|
|
160
|
+
20
|
|
161
|
+
21
|
|
162
|
+
22
|
|
163
|
+
23
|
|
164
|
+
24
|
|
165
|
+
25
|
|
166
|
+
26
|
|
167
|
+
27
|
|
168
|
+
28
|
|
169
|
+
29
|
|
170
|
+
30
|
|
171
|
+
31
|
|
172
|
+
32
|
|
173
|
+
33
|
|
174
|
+
34
|
|
175
|
+
35
|
|
176
|
+
36</pre>
|
|
177
|
+
</td>
|
|
178
|
+
<td>
|
|
179
|
+
<pre class="code"><span class="info file"># File 'lib/usgs/parsers/statistics_parser.rb', line 7</span>
|
|
180
|
+
|
|
181
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_rdb_text'>rdb_text</span><span class='rparen'>)</span>
|
|
182
|
+
<span class='id identifier rubyid_rows'>rows</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../Parsers.html" title="Usgs::Parsers (module)">Parsers</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="RdbParser.html" title="Usgs::Parsers::RdbParser (module)">RdbParser</a></span></span><span class='period'>.</span><span class='id identifier rubyid_parse'><span class='object_link'><a href="RdbParser.html#parse-class_method" title="Usgs::Parsers::RdbParser.parse (method)">parse</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_rdb_text'>rdb_text</span><span class='rparen'>)</span>
|
|
183
|
+
|
|
184
|
+
<span class='id identifier rubyid_rows'>rows</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_row'>row</span><span class='op'>|</span>
|
|
185
|
+
<span class='lbrace'>{</span>
|
|
186
|
+
<span class='label'>site_no:</span> <span class='id identifier rubyid_row'>row</span><span class='lbracket'>[</span><span class='symbol'>:site_no</span><span class='rbracket'>]</span><span class='op'>&.</span><span class='id identifier rubyid_strip'>strip</span><span class='comma'>,</span>
|
|
187
|
+
<span class='label'>parameter_cd:</span> <span class='id identifier rubyid_row'>row</span><span class='lbracket'>[</span><span class='symbol'>:parameter_cd</span><span class='rbracket'>]</span><span class='op'>&.</span><span class='id identifier rubyid_strip'>strip</span><span class='comma'>,</span>
|
|
188
|
+
<span class='label'>month_nu:</span> <span class='id identifier rubyid_row'>row</span><span class='lbracket'>[</span><span class='symbol'>:month_nu</span><span class='rbracket'>]</span><span class='op'>&.</span><span class='id identifier rubyid_to_i'>to_i</span><span class='comma'>,</span>
|
|
189
|
+
<span class='label'>day_nu:</span> <span class='id identifier rubyid_row'>row</span><span class='lbracket'>[</span><span class='symbol'>:day_nu</span><span class='rbracket'>]</span><span class='op'>&.</span><span class='id identifier rubyid_to_i'>to_i</span><span class='comma'>,</span>
|
|
190
|
+
<span class='label'>begin_yr:</span> <span class='id identifier rubyid_row'>row</span><span class='lbracket'>[</span><span class='symbol'>:begin_yr</span><span class='rbracket'>]</span><span class='op'>&.</span><span class='id identifier rubyid_to_i'>to_i</span><span class='comma'>,</span>
|
|
191
|
+
<span class='label'>end_yr:</span> <span class='id identifier rubyid_row'>row</span><span class='lbracket'>[</span><span class='symbol'>:end_yr</span><span class='rbracket'>]</span><span class='op'>&.</span><span class='id identifier rubyid_to_i'>to_i</span><span class='comma'>,</span>
|
|
192
|
+
<span class='label'>count_nu:</span> <span class='id identifier rubyid_row'>row</span><span class='lbracket'>[</span><span class='symbol'>:count_nu</span><span class='rbracket'>]</span><span class='op'>&.</span><span class='id identifier rubyid_to_i'>to_i</span><span class='comma'>,</span>
|
|
193
|
+
<span class='label'>mean_va:</span> <span class='id identifier rubyid_row'>row</span><span class='lbracket'>[</span><span class='symbol'>:mean_va</span><span class='rbracket'>]</span><span class='comma'>,</span>
|
|
194
|
+
<span class='label'>max_va:</span> <span class='id identifier rubyid_row'>row</span><span class='lbracket'>[</span><span class='symbol'>:max_va</span><span class='rbracket'>]</span><span class='comma'>,</span>
|
|
195
|
+
<span class='label'>max_va_yr:</span> <span class='id identifier rubyid_row'>row</span><span class='lbracket'>[</span><span class='symbol'>:max_va_yr</span><span class='rbracket'>]</span><span class='op'>&.</span><span class='id identifier rubyid_to_i'>to_i</span><span class='comma'>,</span>
|
|
196
|
+
<span class='label'>min_va:</span> <span class='id identifier rubyid_row'>row</span><span class='lbracket'>[</span><span class='symbol'>:min_va</span><span class='rbracket'>]</span><span class='comma'>,</span>
|
|
197
|
+
<span class='label'>min_va_yr:</span> <span class='id identifier rubyid_row'>row</span><span class='lbracket'>[</span><span class='symbol'>:min_va_yr</span><span class='rbracket'>]</span><span class='op'>&.</span><span class='id identifier rubyid_to_i'>to_i</span><span class='comma'>,</span>
|
|
198
|
+
<span class='label'>p05_va:</span> <span class='id identifier rubyid_row'>row</span><span class='lbracket'>[</span><span class='symbol'>:p05_va</span><span class='rbracket'>]</span><span class='comma'>,</span>
|
|
199
|
+
<span class='label'>p10_va:</span> <span class='id identifier rubyid_row'>row</span><span class='lbracket'>[</span><span class='symbol'>:p10_va</span><span class='rbracket'>]</span><span class='comma'>,</span>
|
|
200
|
+
<span class='label'>p20_va:</span> <span class='id identifier rubyid_row'>row</span><span class='lbracket'>[</span><span class='symbol'>:p20_va</span><span class='rbracket'>]</span><span class='comma'>,</span>
|
|
201
|
+
<span class='label'>p25_va:</span> <span class='id identifier rubyid_row'>row</span><span class='lbracket'>[</span><span class='symbol'>:p25_va</span><span class='rbracket'>]</span><span class='comma'>,</span>
|
|
202
|
+
<span class='label'>p50_va:</span> <span class='id identifier rubyid_row'>row</span><span class='lbracket'>[</span><span class='symbol'>:p50_va</span><span class='rbracket'>]</span><span class='comma'>,</span>
|
|
203
|
+
<span class='label'>p75_va:</span> <span class='id identifier rubyid_row'>row</span><span class='lbracket'>[</span><span class='symbol'>:p75_va</span><span class='rbracket'>]</span><span class='comma'>,</span>
|
|
204
|
+
<span class='label'>p80_va:</span> <span class='id identifier rubyid_row'>row</span><span class='lbracket'>[</span><span class='symbol'>:p80_va</span><span class='rbracket'>]</span><span class='comma'>,</span>
|
|
205
|
+
<span class='label'>p90_va:</span> <span class='id identifier rubyid_row'>row</span><span class='lbracket'>[</span><span class='symbol'>:p90_va</span><span class='rbracket'>]</span><span class='comma'>,</span>
|
|
206
|
+
<span class='label'>p95_va:</span> <span class='id identifier rubyid_row'>row</span><span class='lbracket'>[</span><span class='symbol'>:p95_va</span><span class='rbracket'>]</span><span class='comma'>,</span>
|
|
207
|
+
<span class='label'>metadata:</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
|
208
|
+
<span class='rbrace'>}</span>
|
|
209
|
+
<span class='kw'>end</span>
|
|
210
|
+
<span class='kw'>end</span></pre>
|
|
211
|
+
</td>
|
|
212
|
+
</tr>
|
|
213
|
+
</table>
|
|
214
|
+
</div>
|
|
215
|
+
|
|
216
|
+
</div>
|
|
217
|
+
|
|
218
|
+
</div>
|
|
219
|
+
|
|
220
|
+
<div id="footer">
|
|
221
|
+
Generated on Mon Dec 15 21:52:18 2025 by
|
|
222
|
+
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
223
|
+
0.9.37 (ruby-3.2.2).
|
|
224
|
+
</div>
|
|
225
|
+
|
|
226
|
+
</div>
|
|
227
|
+
</body>
|
|
228
|
+
</html>
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>
|
|
7
|
+
Module: Usgs::Parsers::TimeSeriesParser
|
|
8
|
+
|
|
9
|
+
— Documentation by YARD 0.9.37
|
|
10
|
+
|
|
11
|
+
</title>
|
|
12
|
+
|
|
13
|
+
<link rel="stylesheet" href="../../css/style.css" type="text/css" />
|
|
14
|
+
|
|
15
|
+
<link rel="stylesheet" href="../../css/common.css" type="text/css" />
|
|
16
|
+
|
|
17
|
+
<script type="text/javascript">
|
|
18
|
+
pathId = "Usgs::Parsers::TimeSeriesParser";
|
|
19
|
+
relpath = '../../';
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
|
|
24
|
+
|
|
25
|
+
<script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
</head>
|
|
29
|
+
<body>
|
|
30
|
+
<div class="nav_wrap">
|
|
31
|
+
<iframe id="nav" src="../../class_list.html?1"></iframe>
|
|
32
|
+
<div id="resizer"></div>
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
<div id="main" tabindex="-1">
|
|
36
|
+
<div id="header">
|
|
37
|
+
<div id="menu">
|
|
38
|
+
|
|
39
|
+
<a href="../../_index.html">Index (T)</a> »
|
|
40
|
+
<span class='title'><span class='object_link'><a href="../../Usgs.html" title="Usgs (module)">Usgs</a></span></span> » <span class='title'><span class='object_link'><a href="../Parsers.html" title="Usgs::Parsers (module)">Parsers</a></span></span>
|
|
41
|
+
»
|
|
42
|
+
<span class="title">TimeSeriesParser</span>
|
|
43
|
+
|
|
44
|
+
</div>
|
|
45
|
+
|
|
46
|
+
<div id="search">
|
|
47
|
+
|
|
48
|
+
<a class="full_list_link" id="class_list_link"
|
|
49
|
+
href="../../class_list.html">
|
|
50
|
+
|
|
51
|
+
<svg width="24" height="24">
|
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
|
55
|
+
</svg>
|
|
56
|
+
</a>
|
|
57
|
+
|
|
58
|
+
</div>
|
|
59
|
+
<div class="clear"></div>
|
|
60
|
+
</div>
|
|
61
|
+
|
|
62
|
+
<div id="content"><h1>Module: Usgs::Parsers::TimeSeriesParser
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
</h1>
|
|
67
|
+
<div class="box_info">
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
<dl>
|
|
80
|
+
<dt>Defined in:</dt>
|
|
81
|
+
<dd>lib/usgs/parsers/time_series_parser.rb</dd>
|
|
82
|
+
</dl>
|
|
83
|
+
|
|
84
|
+
</div>
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
<h2>
|
|
95
|
+
Class Method Summary
|
|
96
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
|
97
|
+
</h2>
|
|
98
|
+
|
|
99
|
+
<ul class="summary">
|
|
100
|
+
|
|
101
|
+
<li class="public ">
|
|
102
|
+
<span class="summary_signature">
|
|
103
|
+
|
|
104
|
+
<a href="#parse-class_method" title="parse (class method)">.<strong>parse</strong>(response) ⇒ Object </a>
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
</span>
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
<span class="summary_desc"><div class='inline'>
|
|
119
|
+
<p>Parse both Instantaneous Values (IV) and Daily Values (DV) They have identical JSON structure.</p>
|
|
120
|
+
</div></span>
|
|
121
|
+
|
|
122
|
+
</li>
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
</ul>
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
<div id="class_method_details" class="method_details_list">
|
|
131
|
+
<h2>Class Method Details</h2>
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
<div class="method_details first">
|
|
135
|
+
<h3 class="signature first" id="parse-class_method">
|
|
136
|
+
|
|
137
|
+
.<strong>parse</strong>(response) ⇒ <tt>Object</tt>
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
</h3><div class="docstring">
|
|
144
|
+
<div class="discussion">
|
|
145
|
+
|
|
146
|
+
<p>Parse both Instantaneous Values (IV) and Daily Values (DV) They have identical JSON structure</p>
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
</div>
|
|
150
|
+
</div>
|
|
151
|
+
<div class="tags">
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
</div><table class="source_code">
|
|
155
|
+
<tr>
|
|
156
|
+
<td>
|
|
157
|
+
<pre class="lines">
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
9
|
|
161
|
+
10
|
|
162
|
+
11
|
|
163
|
+
12</pre>
|
|
164
|
+
</td>
|
|
165
|
+
<td>
|
|
166
|
+
<pre class="code"><span class="info file"># File 'lib/usgs/parsers/time_series_parser.rb', line 9</span>
|
|
167
|
+
|
|
168
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='rparen'>)</span>
|
|
169
|
+
<span class='id identifier rubyid_series_list'>series_list</span> <span class='op'>=</span> <span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_dig'>dig</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>value</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>timeSeries</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> <span class='op'>||</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
|
170
|
+
<span class='id identifier rubyid_series_list'>series_list</span><span class='period'>.</span><span class='id identifier rubyid_flat_map'>flat_map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_series'>series</span><span class='op'>|</span> <span class='id identifier rubyid_parse_series'>parse_series</span><span class='lparen'>(</span><span class='id identifier rubyid_series'>series</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
|
|
171
|
+
<span class='kw'>end</span></pre>
|
|
172
|
+
</td>
|
|
173
|
+
</tr>
|
|
174
|
+
</table>
|
|
175
|
+
</div>
|
|
176
|
+
|
|
177
|
+
</div>
|
|
178
|
+
|
|
179
|
+
</div>
|
|
180
|
+
|
|
181
|
+
<div id="footer">
|
|
182
|
+
Generated on Mon Dec 15 21:52:18 2025 by
|
|
183
|
+
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
184
|
+
0.9.37 (ruby-3.2.2).
|
|
185
|
+
</div>
|
|
186
|
+
|
|
187
|
+
</div>
|
|
188
|
+
</body>
|
|
189
|
+
</html>
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>
|
|
7
|
+
Module: Usgs::Parsers
|
|
8
|
+
|
|
9
|
+
— Documentation by YARD 0.9.37
|
|
10
|
+
|
|
11
|
+
</title>
|
|
12
|
+
|
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" />
|
|
14
|
+
|
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" />
|
|
16
|
+
|
|
17
|
+
<script type="text/javascript">
|
|
18
|
+
pathId = "Usgs::Parsers";
|
|
19
|
+
relpath = '../';
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
|
24
|
+
|
|
25
|
+
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
</head>
|
|
29
|
+
<body>
|
|
30
|
+
<div class="nav_wrap">
|
|
31
|
+
<iframe id="nav" src="../class_list.html?1"></iframe>
|
|
32
|
+
<div id="resizer"></div>
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
<div id="main" tabindex="-1">
|
|
36
|
+
<div id="header">
|
|
37
|
+
<div id="menu">
|
|
38
|
+
|
|
39
|
+
<a href="../_index.html">Index (P)</a> »
|
|
40
|
+
<span class='title'><span class='object_link'><a href="../Usgs.html" title="Usgs (module)">Usgs</a></span></span>
|
|
41
|
+
»
|
|
42
|
+
<span class="title">Parsers</span>
|
|
43
|
+
|
|
44
|
+
</div>
|
|
45
|
+
|
|
46
|
+
<div id="search">
|
|
47
|
+
|
|
48
|
+
<a class="full_list_link" id="class_list_link"
|
|
49
|
+
href="../class_list.html">
|
|
50
|
+
|
|
51
|
+
<svg width="24" height="24">
|
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
|
55
|
+
</svg>
|
|
56
|
+
</a>
|
|
57
|
+
|
|
58
|
+
</div>
|
|
59
|
+
<div class="clear"></div>
|
|
60
|
+
</div>
|
|
61
|
+
|
|
62
|
+
<div id="content"><h1>Module: Usgs::Parsers
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
</h1>
|
|
67
|
+
<div class="box_info">
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
<dl>
|
|
80
|
+
<dt>Defined in:</dt>
|
|
81
|
+
<dd>lib/usgs/parsers/rdb_parser.rb<span class="defines">,<br />
|
|
82
|
+
lib/usgs/parsers/site_parser.rb,<br /> lib/usgs/parsers/statistics_parser.rb,<br /> lib/usgs/parsers/time_series_parser.rb</span>
|
|
83
|
+
</dd>
|
|
84
|
+
</dl>
|
|
85
|
+
|
|
86
|
+
</div>
|
|
87
|
+
|
|
88
|
+
<h2>Defined Under Namespace</h2>
|
|
89
|
+
<p class="children">
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
<strong class="modules">Modules:</strong> <span class='object_link'><a href="Parsers/RdbParser.html" title="Usgs::Parsers::RdbParser (module)">RdbParser</a></span>, <span class='object_link'><a href="Parsers/SiteParser.html" title="Usgs::Parsers::SiteParser (module)">SiteParser</a></span>, <span class='object_link'><a href="Parsers/StatisticsParser.html" title="Usgs::Parsers::StatisticsParser (module)">StatisticsParser</a></span>, <span class='object_link'><a href="Parsers/TimeSeriesParser.html" title="Usgs::Parsers::TimeSeriesParser (module)">TimeSeriesParser</a></span>
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
</p>
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
</div>
|
|
108
|
+
|
|
109
|
+
<div id="footer">
|
|
110
|
+
Generated on Mon Dec 15 21:52:18 2025 by
|
|
111
|
+
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
112
|
+
0.9.37 (ruby-3.2.2).
|
|
113
|
+
</div>
|
|
114
|
+
|
|
115
|
+
</div>
|
|
116
|
+
</body>
|
|
117
|
+
</html>
|