youngsaver / opensdp_equity_report_template

Using Texas STAAR test data files for metrics of equity within a district.
0 stars 5 forks source link

Add adaptability to the text of the report #10

Open jknowles opened 6 years ago

jknowles commented 6 years ago

The report would be made more powerful if we allowed the text of the report to adapt to the findings of the data. An example of what this would like is converting this paragraph:

The gap.test output shows us that the top 3 gaps, in terms of effect size, are for 3rd, 4th, and 5th grade math scores between gender groups. The effect sizes are negative, and the labeling on the graph shows us the effect size was calculated with the average score for male "M" students subtracted from the average score for female "F" students. Thus, on average, the male students scored higher than female students. In our dataset, these gaps were wider than any other gap based in racial differences, socioeconomic differences, differences in English proficiency status, or differences in special education status.

To adapt to the actual results of the gap.testfunction by taking its outputs as arguments to generate the text. This can be done by calling variables inline in Rmd.

The `gap.test` output shows us that the top 3 gaps, in terms of effect size, are
for `r gap_test_results$outcome[1]` results in `r gap_test_results$grade` grades ...