Description Usage Arguments Value
View source: R/get_county_dashboard_data.R
This is a helper function that pulls together the data needed by the County Dashboard application (https://github.com/pocdata/county_dashboard), formats the data as needed, and then writes the data to a folder sharing the name of the project repo ("county_dashboard").
Two collections of data are produced by get_sparklines_data()
and
get_fast_facts_data()
:
data to support the trends over time (aka - the sparklines)
data to support summary descriptive statistics (aka - the fast facts)
These collections are then split into county, region, and state variants,
along with some crucial context and titling information for each variant,
by finish_dashboard_data()
.
The final data results are:
county_context.csv (titling and sparklines/fast facts context)
county_data.csv (sparklines/fast facts data)
region_context.csv
region_data.csv
state_context.csv
state_data.csv
year_limits.csv (the min and max year covered by the data)
Data sources used in the above process:
annie: variety of stored procedure calls
POC: dbo.ref_lookup_county_region
POC: dbo.ref_lookup_census_population
POC: public_data.unemployment
POC: public_data.hs_graduation
POC: public_data.free_lunch_county
1 | get_county_dashboard_data(annie_connection, poc_connection)
|
annie_connection |
Active RODBC connection the annie MySQL server. No testing done to insure valid connection - should be handled external to this function. |
poc_connection |
Active RODBC connection the POC SQL server. No testing done to insure valid connection - should be handled external to this function. |
Function attempts to verify if the update succeeds but failure is not terminal to avoid interrupting the update collection.
Returns a simple list. If all update steps seem succesful, first element is TRUE and second element is character string "Success."
If any update steps seem to fail, first element is FALSE and second element is a character vector of detected issues.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.