Skip to contents

The original dataset covers from 1962 to 2016. For each week, in 122 US cities, from the original file, we have stored in the package a file with the same format as the original file but that includes only 1% of its data, selected at random.

Usage

mrs_db_geo

Format

A star_database.

Details

From these data the constellation in the vignette titled 'Obtaining and transforming flat tables' has been generated. This variable contains the defined constellation.

See also

Examples

# Defined by:

sq <- mrs_db |>
  star_query() |>
  select_dimension(name = "where",
                   attributes = "state") |>
  select_dimension(name = "when",
                   attributes = "year") |>
  select_fact(
    name = "mrs_age",
    measures = "all_deaths"
  )  |>
  select_fact(
    name = "mrs_cause",
    measures = "pneumonia_and_influenza_deaths"
  )

db <- mrs_db |>
  run_query(sq)

mrs_db_geo <- db |>
  define_geoattribute(
    dimension = "where",
    attribute = "state",
    from_layer = us_layer_state,
    by = "STUSPS"
  )