Description Usage Arguments Value
View source: R/finish_dashboard_data.R
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"
1 | finish_dashboard_data(spark_base, fact_base)
|
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. |
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"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.