multistar_as_flat_table | R Documentation |
multistar
as a flat tableWe can obtain a flat table, implemented using a tibble
, from a multistar
(which can be the result of a query). If it only has one fact table, it is
not necessary to provide its name.
multistar_as_flat_table(ms, fact = NULL)
## S3 method for class 'multistar'
multistar_as_flat_table(ms, fact = NULL)
ms |
A |
fact |
A string, name of the fact. |
A tibble
.
Other results export functions:
constellation_as_multistar()
,
constellation_as_tibble_list()
,
star_schema_as_flat_table()
,
star_schema_as_multistar()
,
star_schema_as_tibble_list()
ft <- ms_mrs |>
multistar_as_flat_table(fact = "mrs_age")
ms <- dimensional_query(ms_mrs) |>
select_dimension(name = "where",
attributes = c("city", "state")) |>
select_dimension(name = "when",
attributes = c("when_happened_year")) |>
select_fact(name = "mrs_age",
measures = c("n_deaths")) |>
select_fact(
name = "mrs_cause",
measures = c("pneumonia_and_influenza_deaths", "other_deaths")
) |>
filter_dimension(name = "when", when_happened_week <= "03") |>
filter_dimension(name = "where", city == "Boston") |>
run_query()
ft <- ms |>
multistar_as_flat_table()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.