-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbatch_old.R
58 lines (46 loc) · 2.3 KB
/
batch_old.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
source('load_data.R')
source('delegation.R')
source('maps.R')
source('outturn.R')
source('peers.R')
source('population.R')
source('schools.R')
#
# Supporting or old reports - not used on website
#
# Summary tables
tabulate_general_summary(all_schools, NULL, save_to_file = TRUE)
tabulate_general_summary(all_schools, "primary", save_to_file = TRUE)
tabulate_general_summary(all_schools, "secondary", save_to_file = TRUE)
tabulate_general_summary(all_schools, "through", save_to_file = TRUE)
tabulate_general_summary(all_schools, "special", save_to_file = TRUE)
tabulate_occupancy_summary(all_schools, save_to_file = TRUE)
tabulate_per_pupil_outturn(outturn_data, "primary", save_to_file = TRUE)
tabulate_per_pupil_outturn(outturn_data, "secondary", save_to_file = TRUE)
tabulate_delegatedschoolbudgetsperpupil(delegatedschoolbudgetsperpupil, NULL, save_to_file = TRUE)
tabulate_delegatedschoolbudgetsperpupil(delegatedschoolbudgetsperpupil, "primary", save_to_file = TRUE)
tabulate_delegatedschoolbudgetsperpupil(delegatedschoolbudgetsperpupil, "secondary", save_to_file = TRUE)
tabulate_per_pupil_funding_peers_summary(all_schools, 'primary', save_to_file = TRUE)
# Charts
plot_summary_size_distribution(all_schools, "primary", save_to_file = TRUE)
plot_summary_size_distribution(all_schools, "secondary", save_to_file = TRUE)
plot_size_vs_fsm_interactive(all_schools, "primary", NULL, save_to_file = TRUE)
plot_size_vs_fsm_interactive(all_schools, "secondary", NULL, save_to_file = TRUE, num_pupils_bin_size=100, num_pupils_limit=2400)
# Maps
map_support_categories_by_local_authority(all_schools, 'secondary', save_to_file = TRUE)
map_outturn_surplus_or_deficit_by_year(all_schools, school_type='secondary', save_to_file = TRUE)
map_rural_schools(all_schools, NULL, save_to_file = TRUE)
# General charts (primary only)
primary_schools <- all_schools %>% filter(school_type == "primary")
for (la in LOCAL_AUTHORITIES) {
print(la)
plot_pupil_funding_vs_year(primary_schools, la, save_to_file = TRUE)
plot_school_funding_vs_size(primary_schools, la, save_to_file = TRUE)
plot_pupil_funding_vs_outturn(primary_schools, la, save_to_file = TRUE)
plot_size_vs_fsm(all_schools, "primary", la, save_to_file = TRUE)
}
for (la in LOCAL_AUTHORITIES) {
print(la)
# Rural schools
map_rural_schools(all_schools, la, save_to_file = TRUE)
}