Skip to content

Commit 9d3ee94

Browse files
authored
Merge pull request #29 from ocefpaf/README
add an example to the readme
2 parents b1482ab + 62d568d commit 9d3ee94

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

README.rst

+40
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,46 @@ Easier access to scientific data.
2222
erddapy takes advantage of ERDDAP's RESTful web services and creates the ERDDAP URL for any request,
2323
like searching for datasets, acquiring metadata, downloading the data, etc.
2424

25+
26+
Example
27+
-------
28+
29+
.. code:: python
30+
31+
from erddapy import ERDDAP
32+
import pandas as pd
33+
34+
35+
constraints = {
36+
'time>=': '2016-07-10T00:00:00Z',
37+
'time<=': '2017-02-10T00:00:00Z',
38+
'latitude>=': 38.0,
39+
'latitude<=': 41.0,
40+
'longitude>=': -72.0,
41+
'longitude<=': -69.0,
42+
}
43+
44+
variables = [
45+
'depth',
46+
'latitude',
47+
'longitude',
48+
'salinity',
49+
'temperature',
50+
'time',
51+
]
52+
53+
e = ERDDAP(
54+
server='https://data.ioos.us/gliders/erddap',
55+
protocol='tabledap',
56+
response='csv',
57+
dataset_id='blue-20160818T1448',
58+
constraints=constraints,
59+
variables=variables,
60+
)
61+
62+
df = e.to_pandas()
63+
64+
2565
What is ERDDAP?
2666
---------------
2767

0 commit comments

Comments
 (0)