Examples
List Available Datasets
This example shows the list of datasets in a service:
from sample import *
service = SAMPLE(
lccs_url='https://brazildatacube.dpi.inpe.br/lccs/',
url='https://brazildatacube.dpi.inpe.br/sample/',
access_token='change-me',
language='en'
)
print(service.datasets)
Dataset
This example shows how to retrieve and plot a dataset with observation:
from sample import *
service = SAMPLE(
lccs_url='https://brazildatacube.dpi.inpe.br/lccs/',
url='https://brazildatacube.dpi.inpe.br/sample/',
access_token='change-me',
language='en'
)
ds = service.dataset(dataset_id=1)
print(ds)
observations = ds.data()
print(observations.dtypes)
observation = ds.data(data_id=1)
print(observation.head())
Text Representations
This example shows how the various text representation for services:
from sample import *
service = SAMPLE(url='http://127.0.0.1:5000/', access_token='change-me')
print(service)
print(str(service))
print(repr(service))
print(service._repr_html_())