Constellation generated from MRS file through a query and with geographic information
Source:R/data.R
mrs_db_geo.Rd
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.
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
Other mrs example data:
ft_age_rpd
,
ft_age
,
ft_cause_rpd
,
ft_num
,
ft
,
mrs_db
,
mrs_ft_new
,
mrs_ft
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"
)