Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closes #35 #36

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions 00_utils.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ from gingado.utils import (
Lag,
list_SDMX_sources,
list_all_dataflows,
codelists,
get_timefeat,
TemporalFeatureTransformer
)
Expand Down Expand Up @@ -209,6 +210,40 @@ Or the user can search dataflows by their human-readable name instead of their c
dflows[dflows.str.contains('Interest rate', case=False)]
```


```{python}
#| output: asis
#| echo: false
show_doc(codelists)
```

Once the user finds a dataflow of interest, the function `codelists` returns a dictionary where each key is a dimension of that dataflow, and each value is that dimension's codelist.

For example, the dimensions and codelists of the BIS' dataflow on OTC derivatives outstanding are the following:

```{python}
print(dflows[dflows.str.contains("OTC", case=False)])

cl_OTC = codelists(dflow={"BIS": "WS_OTC_DERIV2"})
```

Here is a list of all dimensions for the OTC derivatives outstanding dataflow:

```{python}
cl_OTC.keys()
```

Below are the codelists of the frequency dimension ("CL_FREQ") and the counterparty sector ("CL_SECTOR_CPY"):

```{python}
cl_OTC["CL_FREQ"]
```

```{python}
cl_OTC["CL_SECTOR_CPY"]
```


The function `load_SDMX_data` is a convenience function that downloads data from SDMX sources (and any specific dataflows passed as arguments) if they match the key and parameters set by the user.

```{python}
Expand Down
10 changes: 5 additions & 5 deletions docs/search.json

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion docs/site_libs/bootstrap/bootstrap-dark.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/site_libs/bootstrap/bootstrap.min.css

Large diffs are not rendered by default.

Loading
Loading