Exchange-traded derivatives statistics - XTD

Data - BIS

Code
XTD <- read_parquet("XTD.parquet")

Structure

iso3c, iso2c, Borrowers’ country

Code
XTD |>
  arrange(iso3c, date) |>
  group_by(iso3c, iso2c, `Location of trade (Exchange or country)`) |>
  summarise(Nobs = n(),
            start = first(date),
            end = last(date)) |>
  arrange(-Nobs) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F) else .}