finish_dashboard_data: Helper function to finalize the data for the County Dashboard...

Description Usage Arguments Value

View source: R/finish_dashboard_data.R

Description

This function takes the results from get_sparklines_data() and get_fast_facts_data() and converts the data to the structure and format the County Dashboard application expects.

The final data structure is divided as follows: - metadata specifying the "window" of time covered by the data (year start to year end) - impacts the context for the collection of sparklines in that it sets the time axis limits - county data - "context": the values used to create the visualization context (e.g., names, min/max values) - "data": the values used to create the visualization contents (e.g., the trend lines) - region data - "context" - "data" - state data - "context" - "data"

Usage

1
finish_dashboard_data(spark_base, fact_base)

Arguments

spark_base

The list object with county, region, and state data needed by the sparklines.

fact_base

The list object with county, region, and state data needed by the fast facts.

Value

The function returns a list with the data divided into list elements. * x$year_limits - vector with the start year and end year extracted from spark_base * x$county - list with a dataframe for "context" and one for "data" * x$region - list with a dataframe for "context" and one for "data" * x$state - list with a dataframe for "context" and one for "data"


pocdata/pocr documentation built on Jan. 5, 2022, 9:54 a.m.