|
ERDDAP
Easier access to scientific data |
Brought to you by NOAA NMFS SWFSC ERD |
The URL specifies what you want: the dataset, a description of the graph or the subset of the data, and the file
type for the response.
Tabledap request URLs must be in the form
http://edac-dap2.northerngulfinstitute.org/erddap/tabledap/datasetID.fileType{?query}
For example,
http://edac-dap2.northerngulfinstitute.org/erddap/tabledap/pmelTao.htmlTable?longitude,latitude,time,sea_surface_temperature&longitude>180&longitude<180.2&latitude>0&latitude<0.2&time>2007-06-01T00:00:00Z
Thus, the query is often a comma-separated list of desired variable names, followed by a collection of
constraints (e.g., variable<value)
each separated by '&' (which is interpreted as "AND").
Details:
| Data fileTypes | Description | Info | Example |
|---|---|---|---|
| .asc | View an OPeNDAP-style comma-separated ASCII text file. | info | example |
| .csv | Download a comma-separated ASCII text table (line 1: names; line 2: units; ISO 8601 times). | info | example |
| .csvp | Download a .csv file with line 1: name (units). Times are ISO 8601 strings. | info | example |
| .das | View the data's metadata via an OPeNDAP Dataset Attribute Structure (DAS). | info | example |
| .dds | View the data's structure via an OPeNDAP Dataset Descriptor Structure (DDS). | info | example |
| .dods | OPeNDAP clients use this to download the data in the DODS binary format. | info | example |
| .esriCsv | Download a .csv file for ESRI's ArcGIS (line 1: names; separate date and time columns). | info | example |
| .geoJson | Download longitude,latitude,otherColumns data as a GeoJSON .json file. | info | example |
| .graph | View a Make A Graph web page. | info | example |
| .help | View a web page with a description of tabledap. | info | example |
| .html | View an OPeNDAP-style HTML Data Access Form. | info | example |
| .htmlTable | View a .html web page with the data in a table. Times are ISO 8601 strings. | info | example |
| .json | Download a JSON table (missing value = 'null'; times are ISO 8601 strings). | info | example |
| .mat | Download a MATLAB binary file. | info | example |
| .nc | Download a NetCDF binary file with COARDS/CF/THREDDS metadata. | info | example |
| .ncHeader | View the header (the metadata) for the NetCDF file. | info | example |
| .odvTxt | Download longitude,latitude,time,otherColumns as an ODV Generic Spreadsheet File (.txt). | info | example |
| .subset | View an HTML form which simplifies picking subsets of the data. | example | |
| .tsv | Download a tab-separated ASCII text table (line 1: names; line 2: units; ISO 8601 times). | info | example |
| .tsvp | Download a .tsv file with line 1: name (units). Times are ISO 8601 strings. | info | example |
| .xhtml | View an XHTML (XML) file with the data in a table. Times are ISO 8601 strings. | info | example |
ArcGIS
is a family of Geographical Information Systems (GIS) products from ESRI:
ArcView, ArcEditor, and ArcInfo. To get data from ERDDAP into your ArcGIS program:
JSONP
- Requests for .json and .geoJson files may include an optional jsonp request by
adding &.jsonp=functionName to the end of the query.
Basically, this just tells ERDDAP to add functionName( to the beginning of the response
and ")" to the end of the response.
If originally there was no query, leave off the "&" in your query.
MATLAB
users can use griddap's .mat file type to download data from within MATLAB.
Here is a one line example:
load(urlwrite('http://edac-dap2.northerngulfinstitute.org/erddap/tabledap/pmelTao.mat?longitude,latitude,time,sea_surface_temperature&longitude>180&longitude<180.2&latitude>0&latitude<0.2&time>2007-06-01T00:00:00Z', 'test.mat'));
The data will be in a MATLAB structure. The structure's name will be the datasetID
plot(pmelTao.time, pmelTao.sea_surface_temperature)
Ocean Data View (ODV)
users can download data in the
ODV Generic Spreadsheet Format
.txt file by requesting tabledap's .odvTxt fileType.
The selected data MUST include longitude, latitude, and time variables.
Any longitude vales are fine.
After saving the resulting file (with the extension .txt) in your computer:
Making an Image File with a Graph or Map of Tabular Data
If a tabledap request URL specifies a subset of data which is suitable for making a graph or
a map, and the fileType is an image fileType, tabledap will return an image with a graph or map.
tabledap request URLs can include optional graphics commands which let you
customize the graph or map.
As with other tabledap request URLs, you can create these URLs by hand or have a computer
program do it.
Or, you can use the Make A Graph web pages, which simplify creating these URLs (see the
"graph" links in the table of tabledap datasets).
The fileType options for downloading images of graphs and maps of table data are:
| Image fileTypes | Description | Info | Example |
|---|---|---|---|
| .kml | View a .kml file, suitable for Google Earth. | info | example |
| .smallPdf | View a small .pdf image file with a graph or map. | info | example |
| View a standard, medium-sized .pdf image file with a graph or map. | info | example | |
| .largePdf | View a large .pdf image file with a graph or map. | info | example |
| .smallPng | View a small .png image file with a graph or map. | info | example |
| .png | View a standard, medium-sized .png image file with a graph or map. | info | example |
| .largePng | View a large .png image file with a graph or map. | info | example |
Incompatibilities
Some results file types have restrictions. For example, Google Earth .kml is only
appropriate for results with longitude and latitude values. If a given request is
incompatible with the requested file type, tabledap throws an error.
Or, if you change the fileType in the URL from .png to .graph,
you can see a Make A Graph web page with that request loaded:
http://edac-dap2.northerngulfinstitute.org/erddap/tabledap/pmelTao.graph?time,sea_surface_temperature&longitude>180&longitude<180.2&latitude>0&latitude<0.2&time>2008-04-01T00:00:00Z&.draw=linesAndMarkers&.marker=1|3&.color=0xFF9900&.colorBar=|C|Linear|0|32|
That makes it easy for humans to modify an image request to make a
similar graph or map.
Or, if you change the fileType in the URL from .png to a data fileType
(e.g., .htmlTable), you can download the data that was graphed:
http://edac-dap2.northerngulfinstitute.org/erddap/tabledap/pmelTao.htmlTable?time,sea_surface_temperature&longitude>180&longitude<180.2&latitude>0&latitude<0.2&time>2008-04-01T00:00:00Z&.draw=linesAndMarkers&.marker=1|3&.color=0xFF9900&.colorBar=|C|Linear|0|32|
Or, if you change the fileType in the URL from .png to .graph,
you can see a Make A Graph web page with that request loaded:
http://edac-dap2.northerngulfinstitute.org/erddap/tabledap/pmelTao.graph?longitude,latitude,sea_surface_temperature,time&time>=2007-06-01T00:00:00Z&time<2007-06-02T00:00:00Z&.draw=markers&.marker=5|5&.color=0x000000&.colorBar=Rainbow|C|Linear|0|32|
Or, if you change the fileType in the URL from .png to a data fileType
(e.g., .htmlTable), you can download the data that was mapped:
http://edac-dap2.northerngulfinstitute.org/erddap/tabledap/pmelTao.htmlTable?longitude,latitude,sea_surface_temperature,time&time>=2007-06-01T00:00:00Z&time<2007-06-02T00:00:00Z&.draw=markers&.marker=5|5&.color=0x000000&.colorBar=Rainbow|C|Linear|0|32|