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
Note: if `mamba` isn't installed, replace all instances of `mamba` in the following instructions with `conda`.
65
63
@@ -83,126 +81,74 @@ Note: if `mamba` isn't installed, replace all instances of `mamba` in the follow
83
81
pip install -e .
84
82
```
85
83
84
+
Note that you need to install with `pip install .` once to get the `entry_points` correct too.
86
85
87
86
## Examples
88
87
89
-
To create an intake catalog for all of the ERDDAP's TableDAP offerings use:
88
+
To create an `intake` catalog for all of the ERDDAP's TableDAP offerings use:
90
89
91
90
```python
92
-
importintake
93
-
catalog =intake.open_erddap_cat(
91
+
importintake_erddap
92
+
catalog =intake_erddap.ERDDAPCatalogReader(
94
93
server="https://erddap.sensors.ioos.us/erddap"
95
-
)
94
+
).read()
96
95
```
97
96
98
97
99
-
The catalog objects behave like a dictionary with the keys representing the
100
-
dataset's unique identifier within ERDDAP, and the values being the
101
-
`TableDAPSource` objects. To access a source object:
98
+
The catalog objects behave like a dictionary with the keys representing the dataset's unique identifier within ERDDAP, and the values being the `TableDAPReader` objects. To access a Reader object (for a single dataset, in this case for dataset_id "aoos_204"):
102
99
103
100
```python
104
-
source= catalog["datasetid"]
101
+
dataset= catalog["aoos_204"]
105
102
```
106
103
107
-
From the source object, a pandas DataFrame can be retrieved:
104
+
From the reader object, a pandas DataFrame can be retrieved:
108
105
109
106
```python
110
-
df = source.read()
107
+
df = dataset.read()
108
+
```
109
+
110
+
Find other dataset_ids available with
111
+
112
+
```python
113
+
list(catalog)
111
114
```
112
115
113
116
Consider a case where you need to find all wind data near Florida:
Using the `standard_names` input with `intersection="union"` searches for datasets that have both "wind_speed" and "wind_from_direction". Using the `variables` input subsequently narrows the dataset to only those columns, plus "time", "latitude", "longitude", and "z".
130
138
131
-
<tableclass="align-default">
132
-
<thead>
133
-
<trstyle="text-align: right;">
134
-
<th></th>
135
-
<th>time (UTC)</th>
136
-
<th>wind_speed (m.s-1)</th>
137
-
<th>wind_from_direction (degrees)</th>
138
-
</tr>
139
-
</thead>
140
-
<tbody>
141
-
<tr>
142
-
<th>0</th>
143
-
<td>2022-12-14T19:40:00Z</td>
144
-
<td>7.0</td>
145
-
<td>140.0</td>
146
-
</tr>
147
-
<tr>
148
-
<th>1</th>
149
-
<td>2022-12-14T19:20:00Z</td>
150
-
<td>7.0</td>
151
-
<td>120.0</td>
152
-
</tr>
153
-
<tr>
154
-
<th>2</th>
155
-
<td>2022-12-14T19:10:00Z</td>
156
-
<td>NaN</td>
157
-
<td>NaN</td>
158
-
</tr>
159
-
<tr>
160
-
<th>3</th>
161
-
<td>2022-12-14T19:00:00Z</td>
162
-
<td>9.0</td>
163
-
<td>130.0</td>
164
-
</tr>
165
-
<tr>
166
-
<th>4</th>
167
-
<td>2022-12-14T18:50:00Z</td>
168
-
<td>9.0</td>
169
-
<td>130.0</td>
170
-
</tr>
171
-
<tr>
172
-
<th>...</th>
173
-
<td>...</td>
174
-
<td>...</td>
175
-
<td>...</td>
176
-
</tr>
177
-
<tr>
178
-
<th>48296</th>
179
-
<td>2022-01-01T00:40:00Z</td>
180
-
<td>4.0</td>
181
-
<td>120.0</td>
182
-
</tr>
183
-
<tr>
184
-
<th>48297</th>
185
-
<td>2022-01-01T00:30:00Z</td>
186
-
<td>3.0</td>
187
-
<td>130.0</td>
188
-
</tr>
189
-
<tr>
190
-
<th>48298</th>
191
-
<td>2022-01-01T00:20:00Z</td>
192
-
<td>4.0</td>
193
-
<td>120.0</td>
194
-
</tr>
195
-
<tr>
196
-
<th>48299</th>
197
-
<td>2022-01-01T00:10:00Z</td>
198
-
<td>4.0</td>
199
-
<td>130.0</td>
200
-
</tr>
201
-
<tr>
202
-
<th>48300</th>
203
-
<td>2022-01-01T00:00:00Z</td>
204
-
<td>4.0</td>
205
-
<td>130.0</td>
206
-
</tr>
207
-
</tbody>
208
-
</table>
139
+
```python
140
+
time (UTC) latitude (degrees_north) ... wind_speed (m.s-1) wind_from_direction (degrees)
0 commit comments