starschemar (version 1.2.0)

dm_mrs_age: Star Definition for Mortality Reporting System by Age

Description

Definition of facts and dimensions for the Mortality Reporting System considering the age classification.

Usage

dm_mrs_age

Arguments

Format

A dimensional_model object.

Examples

Run this code
# NOT RUN {
# Defined by:

library(tidyr)

dm_mrs_age <- dimensional_model() %>%
  define_fact(
    name = "mrs_age",
    measures = c(
      "Deaths"
    ),
    agg_functions = c(
      "SUM"
    ),
    nrow_agg = "nrow_agg"
  ) %>%
  define_dimension(
    name = "when",
    attributes = c(
      "Week Ending Date",
      "WEEK",
      "Year"
    )
  ) %>%
  define_dimension(
    name = "when_available",
    attributes = c(
      "Data Availability Date",
      "Data Availability Week",
      "Data Availability Year"
    )
  ) %>%
  define_dimension(
    name = "where",
    attributes = c(
      "REGION",
      "State",
      "City"
    )
  ) %>%
  define_dimension(
    name = "who",
    attributes = c(
      "Age Range"
    )
  )

# }

Run the code above in your browser using DataLab