Converts processed CAASPP assessment data from wide format to tidy (long) format. Pivots performance metrics into separate rows for easier analysis.
Value
A tibble in tidy format with columns:
end_year: School year endcds_code: 14-digit CDS identifiercounty_code,district_code,school_code: CDS componentsagg_level: Aggregation level (S/D/C/T)grade: Grade level (03-11 or 13)subject: Assessment subject (ELA/Math)metric_type: Type of metric (mean_scale_score, pct_exceeded, etc.)metric_value: Value of the metric
Details
Tidy Format Structure:
The tidy format converts performance metrics from separate columns into rows, making it easier to:
Filter and plot by metric type
Compare metrics across years
Calculate differences between metrics
Join with other datasets
Metric Types:
mean_scale_score: Average scale score for the testpct_exceeded: Percentage of students who exceeded standardpct_met: Percentage of students who met standardpct_met_and_above: Percentage who met or exceeded standardpct_nearly_met: Percentage who nearly met standardpct_not_met: Percentage who did not meet standardn_tested: Number of students testedn_exceeded: Number of students who exceeded standardn_met: Number of students who met standardn_met_and_above: Number who met or exceeded standardn_nearly_met: Number of students who nearly met standardn_not_met: Number of students who did not meet standard
Examples
if (FALSE) { # \dontrun{
library(dplyr)
# Process and tidy assessment data
raw <- get_raw_assess(2023)
processed <- process_assess(raw$test_data, 2023)
tidy <- tidy_assess(processed)
# Filter to state-level proficiency rates
state_proficiency <- tidy %>%
filter(agg_level == "T",
metric_type %in% c("pct_met_and_above", "pct_exceeded"))
# Compare ELA vs Math performance
subject_comparison <- tidy %>%
filter(agg_level == "T",
grade == "11",
metric_type == "pct_met_and_above") %>%
select(grade, subject, metric_value)
} # }