Skip to content

Commit e8121df

Browse files
committed
bugfix search phrase, demo notebooks
1 parent 4715091 commit e8121df

File tree

3 files changed

+2163
-14
lines changed

3 files changed

+2163
-14
lines changed

erddapClient/erddap_server.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ def getSearchURL(self, filetype='json', **searchFilters):
193193

194194
if queryElement == 'searchFor':
195195
if queryValue:
196-
queryValue = quote_plus(queryValue)
196+
queryValue = quote_plus(queryValue, safe='"\'')
197197
queryURL.append( queryElement + "=" + ("" if queryValue is None else queryValue) )
198198
continue
199199

notebooks/ERDDAP-Server-Search-Operations.ipynb

+14-13
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
},
1313
{
1414
"cell_type": "code",
15-
"execution_count": 3,
15+
"execution_count": 1,
1616
"id": "95241b37",
1717
"metadata": {},
1818
"outputs": [
@@ -22,7 +22,7 @@
2222
"'ERDDAP_version=2.12'"
2323
]
2424
},
25-
"execution_count": 3,
25+
"execution_count": 1,
2626
"metadata": {},
2727
"output_type": "execute_result"
2828
}
@@ -58,7 +58,7 @@
5858
},
5959
{
6060
"cell_type": "code",
61-
"execution_count": 18,
61+
"execution_count": 9,
6262
"id": "115499da",
6363
"metadata": {},
6464
"outputs": [
@@ -81,7 +81,7 @@
8181
"]"
8282
]
8383
},
84-
"execution_count": 18,
84+
"execution_count": 9,
8585
"metadata": {},
8686
"output_type": "execute_result"
8787
}
@@ -111,7 +111,7 @@
111111
},
112112
{
113113
"cell_type": "code",
114-
"execution_count": 21,
114+
"execution_count": 10,
115115
"id": "f1df0ba7",
116116
"metadata": {},
117117
"outputs": [
@@ -164,7 +164,7 @@
164164
"]"
165165
]
166166
},
167-
"execution_count": 21,
167+
"execution_count": 10,
168168
"metadata": {},
169169
"output_type": "execute_result"
170170
}
@@ -181,7 +181,7 @@
181181
"source": [
182182
"### Using allDatasets tabledap dataset\n",
183183
"\n",
184-
"ERDDAP has a special tabular dataset called `allDataset` which has data about all of the datasets currently available in the ERDDAP Server. There is a row for each dataset with different columns of information.\n",
184+
"ERDDAP has a special tabular dataset called [`allDataset`](https://coastwatch.pfeg.noaa.gov/erddap/rest.html#GriddapAndTabledap) which has data about all of the datasets currently available in the ERDDAP Server. There is a row for each dataset with different columns of information.\n",
185185
"\n",
186186
"Because this is a tabledap dataset, we can query the dataset using the ERDDAP methods to query a normal tabledap dataset.\n",
187187
"\n",
@@ -190,7 +190,7 @@
190190
},
191191
{
192192
"cell_type": "code",
193-
"execution_count": 23,
193+
"execution_count": 11,
194194
"id": "238854fb",
195195
"metadata": {},
196196
"outputs": [
@@ -211,7 +211,7 @@
211211
},
212212
{
213213
"cell_type": "code",
214-
"execution_count": 25,
214+
"execution_count": 14,
215215
"id": "7437cc84",
216216
"metadata": {},
217217
"outputs": [
@@ -221,7 +221,7 @@
221221
"odict_keys(['datasetID', 'accessible', 'institution', 'dataStructure', 'cdm_data_type', 'class', 'title', 'minLongitude', 'maxLongitude', 'longitudeSpacing', 'minLatitude', 'maxLatitude', 'latitudeSpacing', 'minAltitude', 'maxAltitude', 'minTime', 'maxTime', 'timeSpacing', 'griddap', 'subset', 'tabledap', 'MakeAGraph', 'sos', 'wcs', 'wms', 'files', 'fgdc', 'iso19115', 'metadata', 'sourceUrl', 'infoUrl', 'rss', 'email', 'testOutOfDate', 'outOfDate', 'summary'])"
222222
]
223223
},
224-
"execution_count": 25,
224+
"execution_count": 14,
225225
"metadata": {},
226226
"output_type": "execute_result"
227227
}
@@ -235,7 +235,7 @@
235235
},
236236
{
237237
"cell_type": "code",
238-
"execution_count": 39,
238+
"execution_count": 15,
239239
"id": "285d18c8",
240240
"metadata": {},
241241
"outputs": [
@@ -726,15 +726,16 @@
726726
"[74 rows x 36 columns]"
727727
]
728728
},
729-
"execution_count": 39,
729+
"execution_count": 15,
730730
"metadata": {},
731731
"output_type": "execute_result"
732732
}
733733
],
734734
"source": [
735735
"# Get all the rows that match the following coverage\n",
736736
"# \n",
737-
"allDatasets.clearQuery() # Clear all the previous query constraints, variables or serverside functions added \n",
737+
"allDatasets.clearQuery() # Clear all the previous query constraints, variables \n",
738+
" # or serverside functions added \n",
738739
"\n",
739740
"\n",
740741
"allDatasets.addConstraint('cdm_data_type=\"Grid\"') \\\n",

0 commit comments

Comments
 (0)