Open
Description
library(tidyverse)
library(kofdata)
#> Loading required package: jsonlite
#>
#> Attaching package: 'jsonlite'
#> The following object is masked from 'package:purrr':
#>
#> flatten
#> Loading required package: httr
#> Registered S3 method overwritten by 'xts':
#> method from
#> as.zoo.xts zoo
I am interested in ‘Business Situation’, which seems to be public:
as_tibble(list_available_sets())
#> # A tibble: 24 x 3
#> set_name set_description is_public
#> <chr> <chr> <lgl>
#> 1 ds_bs_monthly Business Situation Overview Monthl… TRUE
#> 2 ds_bs_quarterly Business Situation Overview Quarte… TRUE
#> 3 ds_bs_indicator_mixed_freq KOF Geschäftslageindikator TRUE
#> 4 ds_kof_consensus_mean_qua… KOF Consensus Mean TRUE
#> 5 ds_kof_consensus_stdev_qu… KOF Consensus Standard Deviation TRUE
#> 6 ds_kof_consensus_prob_qua… KOF Consensus Aggregated Probabili… TRUE
#> 7 ds_globidx.v2017 "" TRUE
#> 8 ds_kmi_mixed_freq KOF Main Indicators (KMI) TRUE
#> 9 ds_globidx.v2018 KOF Globalization index 2018 vinta… TRUE
#> 10 ds_globidx_2018_full_fx KOF Globalization index 2018 vinta… TRUE
#> # … with 14 more rows
I can list the keys:
x <- list_keys_in_set("ds_kmi_mixed_freq")
x
#> [1] "kofbarometer"
#> [2] "ch.kof.ie.retro.ch_total.ind.d11"
#> [3] "ch.kof.aiu.run1.ng08.fx.q_ql_ass_bs.balance"
#> [4] "ch.kof.bau.run1.ng08.fx.q_ql_ass_bs.balance"
#> [5] "ch.kof.dhu.run1.ng08.fx.q_ql_ass_bs.balance"
#> [6] "ch.kof.dlu.run1.ng08.fx.q_ql_ass_bs.balance"
#> [7] "ch.kof.fvu.run1.ng08.fx.q_ql_ass_bs.balance"
#> [8] "ch.kof.ggu.run1.ng08.fx.q_ql_ass_bs.balance"
#> [9] "ch.kof.ghu.run1.ng08.fx.q_ql_ass_bs.balance"
#> [10] "ch.kof.inu.run1.ng08.fx.q_ql_ass_bs.balance"
But when I want to download it complains:
get_time_series(x)
#> Error in get_time_series(x): The API responded with
#> The following keys do not exist: [ch.kof.aiu.run1.ng08.fx.q_ql_ass_bs.balance, ch.kof.bau.run1.ng08.fx.q_ql_ass_bs.balance, ch.kof.dhu.run1.ng08.fx.q_ql_ass_bs.balance, ch.kof.dlu.run1.ng08.fx.q_ql_ass_bs.balance, ch.kof.fvu.run1.ng08.fx.q_ql_ass_bs.balance, ch.kof.ggu.run1.ng08.fx.q_ql_ass_bs.balance, ch.kof.ghu.run1.ng08.fx.q_ql_ass_bs.balance, ch.kof.inu.run1.ng08.fx.q_ql_ass_bs.balance]!.
#> Are you sure the requested series are ALL public?
Bonus Question: Is there something like a last update in kofdata, so that I don’t need to download everything every day?
Created on 2019-10-06 by the reprex package (v0.3.0)
Metadata
Assignees
Labels
No labels