Skip to content

Utilize new API features in examples #1

@bkg

Description

@bkg

We can simplify all of the Pandas related usage in the notebooks using some of the latest API features, for example:

url = 'https://api.cal-adapt.org/api/series/pr_day_HadGEM2-ES_rcp85/events/?g=POINT(-121.46+38.59)&imperial=y'
series = pd.read_json(url, typ='series', orient='split')

This instantiates a Series with date index and slug for the name attribute. This will help clean up some of the boilerplate in working with the API, such as unit conversions and requests code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions