Skip to content

Commit

Permalink
Update quick_start with plotting
Browse files Browse the repository at this point in the history
  • Loading branch information
awarde96 committed Nov 14, 2024
1 parent 6473d8b commit 81676f7
Showing 1 changed file with 23 additions and 3 deletions.
26 changes: 23 additions & 3 deletions docs/Service/Quick_Start.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ request = {
"feature" : {
"type" : "timeseries",
"points": [[-9.10, 38.78]],
"axes": "step",
"axis": "step",
"range" : {
"start" : 0,
"end" : 360,
Expand All @@ -38,14 +38,34 @@ The following will return a timeseries starting on `2024-10-06 00:00:00` with st

To view the returned covjson run:

```
```python
ds._json()
```

To convert your covjson into an xarray the following can be done:

```
```python
ds.to_xarray()
```

The following visualisation does not use the latest version of earthkit-plots. To replicate it you need to install the https://github.com/ecmwf/earthkit-plots/tree/feature/ams-meteograms branch

```python
import ipywidgets as widgets
import earthkit.plots
import earthkit.data

TIME_FREQUENCY = "6H"

def f():
data = ds
chart = earthkit.plots.Chart()
chart.box(data, time_frequency=TIME_FREQUENCY)
chart.line(data, time_frequency=TIME_FREQUENCY, aggregation="mean", line_color="purple")
chart.show()

out = widgets.interactive_output(f, {})
display(out)
```

For more information about each feature see the <a href="../Features/feature">Features</a> page.

0 comments on commit 81676f7

Please sign in to comment.