Get the series in a category
fredr_category_series(
category_id,
...,
filter_variable = NULL,
filter_value = NULL,
tag_names = NULL,
exclude_tag_names = NULL,
limit = NULL,
offset = NULL,
order_by = NULL,
sort_order = NULL,
realtime_start = NULL,
realtime_end = NULL
)An integer ID for the category.
These dots only exist for future extensions and should be empty.
A string indicating which attribute to indicate the
attribute that results are filtered by. Possible values include: "frequency",
"units", "seasonal_adjustment". No filtering by default.
A string giving the value of the filter_variable
attribute to filter results by. filter_variable must be set. No filtering
by default.
A string indicating which series tags to match. Multiple
tags can be delimited by a semicolon in a single string (e.g. "usa;gnp").
A string indicating which series tags should not be matched. Multiple tags can be delimited by a semicolon in a single string (e.g. `"usa;gnp"``).
An positive integer indicating maximum number of results to
return. Possible values are any integer between 1 and 1000 (default),
inclusive.
An non-negative integer used in conjunction with limit for
long series. This mimics the idea of pagination to retrieve large amounts
of data over multiple calls. Defaults to 0.
A string indicating an attribute by which the results are ordered by. Possible values include:
"series_id" (default)
"title"
"units"
"frequency"
"seasonal_adjustment"
"realtime_start"
"realtime_end"
"last_updated"
"observation_start"
"observation_end"
"popularity"
"group_popularity"
A string representing the order of the resulting series.
Possible values are: "asc" (default), and "desc".
A Date indicating the start of the real-time period.
Defaults to today's date. For more information, see
Real-Time Periods.
A Date indicating the end of the real-time period.
Defaults to today's date. For more information, see
Real-Time Periods.
A tibble object with information for series matching the request for
the category specified in category_id.
if (fredr_has_key()) {
# Top 10 most popular series belonging to the "Employment Cost Index" category
fredr_category_series(category_id = 1L, limit = 10L, order_by = "popularity")
# Series in the "Employment Cost Index" category, ordered by descending observation frequency
fredr_category_series(category_id = 4L, order_by = "frequency", sort_order = "desc")
}
#> # A tibble: 417 × 16
#> id realtime_start realtime_end title observation_start observation_end
#> <chr> <chr> <chr> <chr> <chr> <chr>
#> 1 ECIWAG 2023-04-17 2023-04-17 Empl… 2001-01-01 2022-10-01
#> 2 ECIALLCIV 2023-04-17 2023-04-17 Empl… 2001-01-01 2022-10-01
#> 3 CIU20232… 2023-04-17 2023-04-17 Empl… 2001-01-01 2022-10-01
#> 4 CIS20232… 2023-04-17 2023-04-17 Empl… 2003-01-01 2022-10-01
#> 5 ECICONWAG 2023-04-17 2023-04-17 Empl… 2001-01-01 2022-10-01
#> 6 CIU20130… 2023-04-17 2023-04-17 Empl… 2001-01-01 2022-10-01
#> 7 CIU20100… 2023-04-17 2023-04-17 Empl… 2001-01-01 2022-10-01
#> 8 CIU20154… 2023-04-17 2023-04-17 Empl… 2001-01-01 2022-10-01
#> 9 CIS20154… 2023-04-17 2023-04-17 Empl… 2003-01-01 2022-10-01
#> 10 ECIMANWAG 2023-04-17 2023-04-17 Empl… 2001-01-01 2022-10-01
#> # ℹ 407 more rows
#> # ℹ 10 more variables: frequency <chr>, frequency_short <chr>, units <chr>,
#> # units_short <chr>, seasonal_adjustment <chr>,
#> # seasonal_adjustment_short <chr>, last_updated <chr>, popularity <int>,
#> # group_popularity <int>, notes <chr>