Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

X-Series APIs

DataFrame APIs are accessed via the following sliderule function and always produce a GeoDataFrame:

gdf = sliderule.run(api, parms, aoi=None, resources=None)

where:

The columns in the returned GeoDataFrame depend on the contents of the parms structure passed to the api. Typically, there are a base set of columns defined for each api. If algorithms are specified in the parms, then the columns may be completely different depending upon the output of the algorithms. If ancillary fields or raster samplers are specified, then there may be additional columns.

Metadata returned with the results of the API is placed in the attrs attribute of the GeoDataFrame. There are three groups of metadata:

Here is an example for accessing the source granule of an entry in the dataframe with a given srcid.

gdf = sliderule.run(api, parms)
gdf.attrs['meta']['srctbl'][f'{srcid}']