Visualizing rates with ggplot over 17 years?

How do I make a visualization of trends in ggplot or plotly? I have a data frame of measured rates and their different types, from 2006/07 to 2022/23. There are up to 12 types of rates but I want to build a legend with 3 out of these 12. I tried doing it with:
ggplot(data = df, aes(x = year, y = rates, colour = rate_types)) + geom_line()
The visual output isn't what I looked forward to seeing. How can I make this right? Thank you in advance.

If, for example, the rates types that you want to show are "a", "b" and "c", you can use:

ggplot(data = df[df$rate_types %in% c("a", "b", "c"),] , 
       aes(x = year, y = rates, colour = rate_types)) + 
  geom_line()

You could also take a look at the gghighlight package

It would be helpful if you could share your data as well, or at least a table that's similar to your data; just copy the output of

dput(head(df, 100))

and paste it here, between a pair of triple backticks, like this:

``` r
<-- paste output here
```

Hi, thanks for replying, here's the data:

<-- structure(list(time_period = c("2006/07", "2011/12", "2008/09", 
"2008/09", "2009/10", "2011/12", "2013/14", "2018/19", "2020/21", 
"2020/21", "2021/22", "2009/10", "2010/11", "2011/12", "2011/12", 
"2012/13", "2012/13", "2013/14", "2015/16", "2015/16", "2018/19", 
"2021/22", "2022/23", "2009/10", "2007/08", "2006/07", "2007/08", 
"2010/11", "2013/14", "2014/15", "2014/15", "2016/17", "2017/18", 
"2021/22", "2022/23", "2006/07", "2008/09", "2014/15", "2015/16", 
"2013/14", "2013/14", "2008/09", "2006/07", "2006/07", "2007/08", 
"2007/08", "2007/08", "2008/09", "2012/13", "2014/15", "2014/15", 
"2015/16", "2017/18", "2020/21", "2020/21", "2021/22", "2007/08", 
"2007/08", "2009/10", "2012/13", "2010/11", "2016/17", "2006/07", 
"2021/22", "2015/16", "2015/16", "2010/11", "2006/07", "2020/21", 
"2017/18", "2014/15", "2014/15", "2018/19", "2006/07", "2013/14", 
"2016/17", "2017/18", "2018/19", "2018/19", "2022/23", "2022/23", 
"2020/21", "2015/16", "2011/12", "2011/12", "2012/13", "2012/13", 
"2021/22", "2021/22", "2021/22", "2022/23", "2022/23", "2011/12", 
"2018/19", "2010/11", "2008/09", "2008/09", "2020/21", "2013/14", 
"2008/09"), geographic_level = c("Redcar", "Redcar", "England", 
"England", "England", "England", "England", "England", "England", 
"England", "England", "England", "England", "England", "England", 
"England", "England", "England", "England", "England", "England", 
"England", "England", "Redcar", "Redcar", "England", "England", 
"England", "England", "England", "England", "England", "England", 
"England", "Redcar", "Redcar", "Redcar", "Redcar", "Redcar", 
"Redcar", "Redcar", "Redcar", "England", "England", "England", 
"England", "England", "England", "England", "England", "England", 
"England", "England", "England", "England", "England", "Redcar", 
"Redcar", "Redcar", "Redcar", "Redcar", "Redcar", "Redcar", "Redcar", 
"Redcar", "Redcar", "Redcar", "Redcar", "Redcar", "Redcar", "Redcar", 
"Redcar", "Redcar", "England", "England", "England", "England", 
"England", "England", "England", "Redcar", "Redcar", "Redcar", 
"Redcar", "Redcar", "Redcar", "Redcar", "Redcar", "Redcar", "Redcar", 
"Redcar", "Redcar", "Redcar", "Redcar", "Redcar", "Redcar", "Redcar", 
"Redcar", "Redcar", "England"), school_type = c("State-funded secondary", 
"State-funded secondary", "Special", "State-funded primary", 
"State-funded primary", "Special", "Total", "Total", "State-funded secondary", 
"Total", "State-funded primary", "Total", "Total", "State-funded primary", 
"State-funded secondary", "State-funded primary", "State-funded secondary", 
"State-funded secondary", "State-funded primary", "Total", "State-funded primary", 
"Total", "Special", "State-funded primary", "Total", "State-funded primary", 
"Special", "Special", "State-funded primary", "Special", "Total", 
"State-funded secondary", "Total", "Special", "Total", "State-funded primary", 
"Special", "State-funded primary", "Special", "State-funded primary", 
"State-funded secondary", "State-funded secondary", "Special", 
"State-funded secondary", "State-funded primary", "State-funded secondary", 
"Total", "State-funded secondary", "Total", "State-funded primary", 
"State-funded secondary", "State-funded secondary", "State-funded primary", 
"Special", "State-funded primary", "State-funded secondary", 
"Special", "State-funded secondary", "State-funded secondary", 
"State-funded secondary", "State-funded secondary", "State-funded secondary", 
"Special", "State-funded secondary", "State-funded primary", 
"State-funded secondary", "Total", "Total", "State-funded secondary", 
"Total", "Special", "Total", "State-funded secondary", "Total", 
"Special", "State-funded primary", "Special", "Special", "State-funded secondary", 
"State-funded secondary", "State-funded primary", "Total", "Total", 
"Special", "Total", "Special", "State-funded primary", "Special", 
"State-funded primary", "Total", "Special", "State-funded secondary", 
"State-funded primary", "State-funded primary", "State-funded primary", 
"State-funded primary", "Total", "Special", "Special", "Total"
), overall_absence_rate = c(7.99295, 6.33757, 10.71928, 5.30447, 
5.21413, 9.56886, 4.50648, 4.72613, 5.48906, 4.61535, 6.25876, 
6.04013, 5.79431, 4.36932, 5.86313, 4.68004, 5.88969, 5.21201, 
4.00624, 4.56669, 4.02882, 7.55262, 13.02167, 5.09789, 6.11845, 
5.17937, 10.56915, 10.04171, 3.8792, 9.36289, 4.61866, 5.35203, 
4.8136, 13.18057, 7.70777, 5.10387, 11.46332, 4.20252, 7.51454, 
4.04712, 5.90243, 7.40981, 10.6186, 7.87302, 5.25652, 7.35941, 
6.28988, 7.24819, 5.26413, 4.01695, 5.29786, 5.20783, 4.17197, 
15.20513, 3.63667, 8.98861, 10.53692, 7.11419, 7.16489, 6.71413, 
6.91628, 6.15311, 10.80692, 9.84812, 3.93742, 5.96395, 5.98084, 
6.60151, 6.26081, 5.63041, 7.16773, 5.09431, 6.68975, 6.49161, 
8.98271, 4.03011, 10.22074, 10.1274, 5.4899, 9.01222, 5.83833, 
4.62064, 4.88341, 9.74108, 5.39438, 10.13548, 5.09001, 14.71174, 
6.04135, 7.88345, 13.62821, 9.70334, 4.38627, 3.90498, 4.97109, 
5.01384, 6.28395, 17.37717, 8.12734, 6.2677), authorised_absence_rate = c(6.64578, 
4.67047, 8.5764, 4.66034, 4.54418, 7.61467, 3.45164, 3.31328, 
3.84379, 3.3642, 4.79679, 4.99719, 4.72811, 3.70666, 4.55312, 
3.87718, 4.51144, 3.90663, 3.06955, 3.43673, 2.8854, 5.493, 9.86896, 
4.56779, 5.22542, 4.65583, 8.41244, 8.00776, 3.02995, 7.4922, 
3.54549, 3.83833, 3.45268, 10.32944, 4.41249, 4.66317, 9.07188, 
3.08897, 6.30856, 3.08435, 4.18034, 6.03806, 8.54916, 6.35631, 
4.68539, 5.86928, 5.27528, 5.7555, 4.19801, 3.1445, 3.97446, 
3.8266, 3.03762, 13.11216, 2.71243, 6.19407, 7.11818, 5.91739, 
5.72932, 4.93042, 5.18529, 3.88888, 8.46782, 5.89002, 2.7671, 
4.01901, 4.78425, 5.68962, 4.17018, 3.59496, 6.02444, 3.71654, 
4.15048, 5.48934, 7.12578, 2.9752, 7.98571, 7.81292, 3.73974, 
5.64023, 3.62716, 3.20456, 3.37263, 8.12927, 4.30482, 7.87297, 
4.42465, 11.6823, 4.26927, 5.12608, 10.7496, 5.05963, 3.85777, 
2.49764, 4.32794, 4.5346, 5.33783, 15.08917, 5.84873, 5.21305
), unauthorised_absence_rate = c(1.34717, 1.6671, 2.14288, 0.64413, 
0.66995, 1.95419, 1.05484, 1.41286, 1.64527, 1.25115, 1.46197, 
1.04294, 1.0662, 0.66266, 1.31001, 0.80286, 1.37825, 1.30539, 
0.93668, 1.12996, 1.14343, 2.05961, 3.15272, 0.5301, 0.89302, 
0.52353, 2.15671, 2.03395, 0.84925, 1.87069, 1.07317, 1.5137, 
1.36092, 2.85112, 3.29528, 0.4407, 2.39144, 1.11355, 1.20598, 
0.96277, 1.72209, 1.37175, 2.06944, 1.51671, 0.57113, 1.49013, 
1.0146, 1.49269, 1.06612, 0.87245, 1.32341, 1.38123, 1.13435, 
2.09297, 0.92424, 2.79453, 3.41874, 1.1968, 1.43557, 1.78372, 
1.73099, 2.26423, 2.3391, 3.9581, 1.17033, 1.94494, 1.19659, 
0.91189, 2.09063, 2.03545, 1.14329, 1.37777, 2.53927, 1.00227, 
1.85693, 1.05492, 2.23503, 2.31447, 1.75017, 3.37199, 2.21117, 
1.41607, 1.51078, 1.61181, 1.08957, 2.26251, 0.66536, 3.02943, 
1.77208, 2.75737, 2.87861, 4.64371, 0.5285, 1.40733, 0.64315, 
0.47924, 0.94612, 2.288, 2.2786, 1.05465), persistent_absence_rate = c(25.68743, 
18.67263, 31.43418, 14.6311, 14.09295, 28.37148, 10.67379, 10.86219, 
14.83287, 12.07846, 17.70069, 17.43129, 16.25496, 10.44074, 16.77741, 
10.95327, 16.53104, 13.6191, 8.23964, 10.49978, 8.2481, 22.50843, 
38.33281, 13.69317, 18.11809, 14.15478, 30.59004, 29.95529, 8.0548, 
27.47985, 10.96052, 13.5429, 11.16776, 40.36491, 21.30276, 14.09639, 
35.45817, 8.31322, 22.80702, 7.87559, 16.4632, 23.01295, 30.46732, 
24.94634, 14.38525, 22.83925, 18.47919, 22.54805, 13.63616, 8.41931, 
13.82327, 13.05705, 8.66984, 48.94225, 8.78223, 27.7112, 29.45736, 
22.88337, 21.24179, 20.2709, 20.84348, 16.8798, 32.08333, 30.20427, 
7.56416, 15.19862, 17.07753, 20.04851, 17.77537, 13.53662, 19.56522, 
12.44099, 19.07919, 19.3335, 26.45398, 8.31894, 29.6473, 28.84735, 
13.68535, 26.52469, 15.92331, 11.98731, 11.23235, 27.5, 14.33753, 
33.33333, 12.45828, 41.50418, 17.04952, 23.50319, 38.30846, 26.69186, 
9.89927, 6.87316, 13.08655, 13.35536, 18.44031, 48.30769, 25.76923, 
18.48632), severe_absence_rate = c(1.47985, 0.90555, 3.69071, 
0.35153, 0.32175, 3.29225, 0.56527, 0.84784, 1.48413, 1.13043, 
0.6362, 0.67677, 0.65885, 0.30393, 0.91143, 0.3076, 0.84386, 
0.82753, 0.30683, 0.6024, 0.39052, 1.65161, 6.2384, 0.26934, 
0.61912, 0.37651, 4.1847, 3.14212, 0.30498, 3.66882, 0.58068, 
1.07049, 0.76548, 5.81814, 2.42724, 0.1506, 5.17928, 0.13645, 
1.40351, 0.23195, 1.05488, 1.24224, 3.93515, 1.58375, 0.37054, 
1.35609, 0.8708, 1.17279, 0.57872, 0.30476, 0.85235, 0.92279, 
0.37051, 5.58258, 0.71559, 2.73511, 2.71318, 0.97968, 1.50651, 
1.09762, 1.39473, 1.49005, 4.16667, 4.00283, 0.238, 1.67777, 
0.86146, 0.85639, 2.36201, 1.34452, 1.08696, 0.58476, 2.42256, 
0.97619, 3.17931, 0.34946, 4.40295, 4.57576, 1.32124, 3.40278, 
0.56393, 1.49438, 0.9028, 3.33333, 0.65945, 3.87597, 0.25843, 
7.79944, 0.439, 2.20158, 6.46766, 4.38172, 0.35741, 0.44248, 
0.28307, 0.25581, 0.81016, 10.15385, 1.15385, 0.77097), authorised_illness_rate = c(4.402342123, 
3.169757957, 4.510941601, 3.225900941, 3.165037022, 4.341305015, 
2.59857839, 2.45920034, 2.442370654, 2.050637484, 3.926600502, 
3.490317176, 3.391139055, 2.709571983, 3.239248823, 2.834430584, 
3.296389781, 2.881836529, 2.40321503, 2.599256792, 2.219874272, 
4.35255077, 5.536242239, 3.134535527, 3.60657439, 3.044516844, 
4.204346828, 4.502456673, 2.353765945, 4.324687187, 2.764931092, 
2.827594697, 2.605048261, 5.829248983, 3.286310926, 3.088137451, 
3.633677183, 2.592249532, 3.863594434, 2.455222567, 3.045943337, 
4.132928256, 3.828253069, 3.931357688, 3.108332118, 3.733195292, 
3.410058968, 3.977662146, 3.053651391, 2.545010473, 3.01843442, 
2.821627073, 2.366800551, 3.251569163, 1.715110128, 4.840190739, 
3.055275659, 4.148583046, 3.977080968, 3.4278904, 3.628941885, 
2.723815577, 3.312110727, 4.44940445, 2.303290621, 2.768308656, 
3.280480291, 3.741240945, 2.162510516, 2.590892515, 3.816348302, 
2.908265858, 2.64661905, 3.465369878, 4.073276851, 2.315657336, 
4.355736292, 4.217304689, 2.724741834, 4.107000813, 3.138118143, 
1.817102152, 2.532100528, 4.862442291, 2.894922981, 4.740772206, 
2.920868086, 5.870594342, 3.790389835, 4.120575063, 4.601118676, 
3.402521085, 2.582749366, 2.072028317, 2.925628059, 3.208469177, 
3.672266604, 2.664273762, 3.382117295, 3.589099772), authorised_appointment_rate = c(0.469474211, 
0.355106618, 0.992846714, 0.264515582, 0.259146728, 1.044375313, 
0.309094748, 0.278474144, 0.215020865, 0.182764032, 0.205122528, 
0.341902813, 0.337153795, 0.250045957, 0.406386925, 0.245713136, 
0.394377468, 0.381937841, 0.228106101, 0.289623838, 0.220839754, 
0.275383769, 0.956109857, 0.296236453, 0.352405262, 0.32462294, 
1.018245951, 0.992842047, 0.237845527, 1.066380842, 0.299235019, 
0.343084993, 0.281061851, 0.920059028, 0.237794804, 0.342033789, 
1.028812214, 0.223971322, 0.97876431, 0.236774072, 0.336260186, 
0.394202536, 1.08319875, 0.507461201, 0.268769444, 0.421147523, 
0.347672727, 0.429252821, 0.319870078, 0.232864704, 0.3668002, 
0.350298896, 0.222830911, 0.681263453, 0.143500842, 0.339932558, 
0.845688787, 0.403302768, 0.37421144, 0.359482279, 0.394641941, 
0.301363374, 0.943944637, 0.271330706, 0.193989875, 0.287709086, 
0.342275949, 0.412257548, 0.175648251, 0.241392409, 1.098005274, 
0.280976173, 0.307961233, 0.418016971, 1.068816295, 0.225997216, 
1.083324938, 1.076140852, 0.329098145, 0.35033252, 0.196533238, 
0.159348583, 0.24756912, 0.938200275, 0.317309192, 0.990408907, 
0.248926276, 0.923551334, 0.188419841, 0.239186624, 0.877849657, 
0.256547916, 0.26517116, 0.177690741, 0.277986816, 0.289704403, 
0.350926255, 0.622501972, 1.087490653, 0.349263195), authorised_religious_rate = c(0.000963262, 
0.002769884, 0.097841583, 0.120486403, 0.073913627, 0.021682908, 
0.044567067, 0.050917333, 0.079708805, 0.08639774, 0.0376174, 
0.062399234, 0.090595637, 0.023303684, 0.018225872, 0.026400141, 
0.02171359, 0.040097719, 0.092715334, 0.086607366, 0.053637509, 
0.03993333, 0.086886272, 0.00428806, 0.00560558, 0.005464812, 
0.058655029, 0.091208577, 0.047829294, 0.028500261, 0.031232485, 
0.063835129, 0.042961143, 0.024635098, 0.017360886, 0.006733342, 
0.03009823, 0.003181167, 0.013593949, 0.00497056, 0.010435418, 
0.009587287, 0.007877169, 0.005836263, 0.076315176, 0.054524183, 
0.066020035, 0.085767768, 0.024357021, 0.035307702, 0.025745658, 
0.077887861, 0.04618404, 0.083395813, 0.091617315, 0.043508723, 
0.003598676, 0.0050482, 0.006186221, 0.003181259, 0.014699801, 
0.011433841, 0.011072664, 0.009275676, 0.006132838, 0.009799882, 
0.011864372, 0.003929081, 0.008191602, 0.005211657, 0, 0.004881675, 
0.005442403, 0.005664222, 0.048850812, 0.070320319, 0.043331723, 
0.050827434, 0.047191055, 0.101254982, 0.02009999, 0.009253089, 
0.007860316, 0.001349928, 0.003594146, 0.002235686, 0.00399331, 
0.011621871, 0.009098633, 0.009225619, 0.022599508, 0.013746143, 
0.0044343, 0.006155072, 0.008486149, 0.009531615, 0.00982099, 
0.017339888, 0.001068262, 0.104136536), authorised_study_rate = c(0.106888921, 
0.213842533, 0.026723861, 0.000569217, 0.000381843, 0.046670951, 
0.032174192, 0.028272447, 0.069293177, 0.029724679, 0.000185471, 
0.064626189, 0.05734854, 0.000166846, 0.165275658, 0.000141025, 
0.080094846, 0.075361652, 0.000141847, 0.026704867, 0.000119491, 
0.047770304, 0.017614015, 0.000396375, 0.071796541, 0.006602546, 
0.044005587, 0.023910926, 0.000161495, 0.018954123, 0.025522848, 
0.060987282, 0.025684123, 0.023365623, 0.006198114, 0, 0, 0, 
0, 5.84772e-05, 0.050766897, 0.054608904, 0.08062514, 0.270691104, 
0.001008702, 0.192213617, 0.090107015, 0.14327014, 0.035187559, 
0.000322297, 0.060160264, 0.063864868, 0.000192014, 0.005212542, 
7.8888e-05, 0.109748346, 0, 0.143043857, 0.060727456, 0.064998146, 
0.04894843, 0.007424572, 0, 0.020440842, 2.82619e-05, 0.016298012, 
0.024027219, 0.052902851, 0.020587744, 0.005652293, 0, 0.007866649, 
0.018010057, 0.130157401, 0.013247678, 0.000138999, 0.017293866, 
0.014859848, 0.067348799, 0.109148147, 0, 0.008672863, 0.007166758, 
0.058046924, 0.103439526, 0.086073912, 5.96016e-05, 0, 0, 0.008984031, 
0.001412469, 0.014026677, 0, 0, 0.000224304, 0.000106301, 0.027129614, 
0, 0, 0.066997959), authorised_traveller_rate = c(0.030924048, 
0.002769884, 0.013619954, 0.020382596, 0.01924835, 0.016703516, 
0.011586348, 0.010295285, 0.003543095, 0.008389384, 0.012874469, 
0.013824355, 0.01455757, 0.018769241, 0.006621389, 0.01874139, 
0.006989495, 0.005752062, 0.01449861, 0.010972974, 0.013457066, 
0.009450121, 0.006519716, 0.004792537, 0.002620565, 0.023863851, 
0.020681003, 0.019119726, 0.015915171, 0.012167704, 0.011533929, 
0.005748931, 0.010549602, 0.006753057, 0.003731203, 0.01786669, 
0, 0.005961105, 0, 0.003245483, 0.000775605, 0.002598752, 0.028510717, 
0.011932859, 0.021211819, 0.009550508, 0.015800937, 0.007902491, 
0.013595407, 0.015550515, 0.006025712, 0.006063186, 0.014037636, 
0.006736208, 0.012155895, 0.005166401, 0, 0.003561401, 0.00384351, 
0.000167435, 0.001412708, 0.003675163, 0, 0.001511592, 0.003561003, 
0.002529002, 0.001473719, 0.024116993, 0.000579936, 0.003160422, 
0, 0.003746764, 0.003616334, 0.018370604, 0.013952341, 0.013799937, 
0.008854088, 0.007596105, 0.006056435, 0.004952892, 0.00395128, 
0.000274844, 0.003051652, 0, 0.00319879, 0, 0.015794436, 0, 0.003042181, 
0.002310179, 0, 0.003646936, 0.003689338, 0.006235706, 0.001570125, 
0.007299304, 0.004875669, 0, 0, 0.014521308), authorised_holiday_rate = c(0.648009933, 
0.29809941, 0.597292108, 0.641375369, 0.550544875, 0.500793189, 
0.115596922, 0.066355463, 0.006913476, 0.018762781, 0.070231516, 
0.412579427, 0.377639477, 0.45983792, 0.186549461, 0.490980035, 
0.191697183, 0.06254772, 0.089040843, 0.071215396, 0.08137019, 
0.054968941, 0.347991766, 0.841901045, 0.715848136, 0.747687283, 
0.615014103, 0.531521181, 0.149974775, 0.309001058, 0.073510046, 
0.041106393, 0.069063824, 0.311588748, 0.081238463, 1.031534709, 
0.805811695, 0.119995896, 0.526280016, 0.229727572, 0.149691838, 
0.4245096, 0.613663885, 0.448290012, 0.692527891, 0.381459539, 
0.547491696, 0.334273919, 0.362140148, 0.092392565, 0.040602617, 
0.038828016, 0.084614586, 0.138502954, 0.024368108, 0.025234516, 
0.831294084, 0.514985547, 0.413085797, 0.445543709, 0.323090181, 
0.060992858, 0.935640138, 0.041534417, 0.11109764, 0.096664071, 
0.602769809, 0.840576651, 0.005581888, 0.080575561, 0.378414283, 
0.12930221, 0.04242926, 0.607056878, 0.365720464, 0.090991954, 
0.36466907, 0.368893578, 0.034999945, 0.029093236, 0.085926027, 
0.023117454, 0.111354473, 0.928750776, 0.571289529, 1.087661249, 
1.048452562, 0.583417915, 0.086381189, 0.076356717, 0.61654284, 
0.048918035, 0.82080673, 0.097701685, 0.868503189, 0.798777686, 
0.613289471, 0.195073738, 0.616387138, 0.498557396), authorised_excluded_rate = c(0.26044625, 
0.170834469, 0.285005366, 0.017613818, 0.016364675, 0.239002116, 
0.060163563, 0.081273909, 0.118479615, 0.058374129, 0.016857592, 
0.082210785, 0.07892326, 0.016439811, 0.133498184, 0.015749588, 
0.11478243, 0.112142101, 0.02056632, 0.070396237, 0.020681829, 
0.096452463, 0.152571916, 0.00998145, 0.114940414, 0.024813647, 
0.288116821, 0.245392358, 0.017911392, 0.210702451, 0.065652452, 
0.151586485, 0.078997213, 0.126238638, 0.367353886, 0.014600019, 
0.109448108, 0.012008187, 0.004854982, 0.010028835, 0.122616159, 
0.19118384, 0.373011745, 0.237469301, 0.019032766, 0.169215206, 
0.091613693, 0.171848949, 0.061201723, 0.018837889, 0.125254961, 
0.136134065, 0.022206985, 0.09254996, 0.011262373, 0.197325813, 
0.55059738, 0.215724106, 0.165087899, 0.122997523, 0.198237322, 
0.348880634, 0.186851211, 0.611782376, 0.014441845, 0.323079987, 
0.102078373, 0.138323364, 0.42139632, 0.236393473, 0, 0.078200086, 
0.655344082, 0.127509241, 0.208203462, 0.022925458, 0.181847792, 
0.155570063, 0.161703431, 0.271521352, 0.017866658, 0.186008474, 
0.149715896, 0.043197711, 0.087661224, 0.049185092, 0.009327658, 
0.099173298, 0.015852832, 0.279395826, 0.182914772, 0.804535105, 
0.010003782, 0.019970386, 0.009308596, 0.003401617, 0.097861636, 
0.125714187, 0.007477834, 0.09217278), autho_other_reasons_rate = c(0.626386351, 
0.450218447, 1.787282585, 0.331709758, 0.424555147, 1.270837864, 
0.268608704, 0.300842933, 0.90275054, 0.890401719, 0.401429897, 
0.495896674, 0.358801563, 0.211684738, 0.381430232, 0.229858411, 
0.362434977, 0.330017597, 0.193875674, 0.259863462, 0.217802033, 
0.53682938, 2.685313245, 0.268490185, 0.335189364, 0.341656168, 
1.734112156, 1.414931866, 0.200433291, 1.460512025, 0.262731673, 
0.333641787, 0.303918012, 2.969706465, 0.401536022, 0.161100215, 
3.461296413, 0.131602855, 0.921475526, 0.144321662, 0.463847271, 
0.819976394, 1.79086506, 0.74051534, 0.27690815, 0.574568295, 
0.430964705, 0.556854596, 0.299294164, 0.194395379, 0.319995649, 
0.318490584, 0.230874231, 8.662615529, 0.654640537, 0.614060383, 
1.831725925, 0.477158624, 0.707095998, 0.484957835, 0.569206856, 
0.431293383, 3.078200692, 0.484739967, 0.13455504, 0.514616753, 
0.414133751, 0.426033989, 1.375681742, 0.431686267, 0.731668042, 
0.303301287, 0.471054294, 0.543111335, 1.281180797, 0.20021487, 
1.832567394, 1.819838176, 0.360622617, 0.650280937, 0.164665305, 
1.000784222, 0.313811546, 1.297281244, 0.317381075, 0.916631268, 
0.172963978, 4.19394578, 0.176083658, 0.390042855, 3.945026696, 
0.515690766, 0.16573641, 0.117860218, 0.231892445, 0.212778246, 
0.555199361, 11.46426683, 0.754192928, 0.452846672), sess_auth_totalreasons_rate = c(6.552177937, 
4.670473635, 8.344520878, 4.6421243, 4.526895956, 7.503743435, 
3.440369934, 3.275631853, 3.838080226, 3.325451947, 4.670919376, 
4.976628013, 4.715420117, 3.699880278, 4.540020063, 3.869726974, 
4.470823413, 3.88969322, 3.04215976, 3.414640932, 2.827782144, 
5.413339078, 9.789249026, 4.56779242, 5.208399137, 4.549699592, 
8.017190905, 7.85167203, 3.023836891, 7.430905652, 3.534349544, 
3.827585699, 3.417284029, 10.21159564, 4.401524304, 4.663172884, 
9.071880045, 3.088970064, 6.308563217, 3.084349228, 4.180336711, 
6.03805907, 7.845799138, 6.16544822, 4.488056692, 5.54350411, 
5.016226882, 5.712809034, 4.174861015, 3.134681524, 3.963019481, 
3.81319455, 2.987740956, 12.92184562, 2.652734085, 6.175167478, 
7.11818051, 5.91738932, 5.729318806, 4.930415817, 5.185288133, 
3.888879402, 8.467820069, 5.890020025, 2.767097124, 4.019005449, 
4.784252172, 5.643294062, 4.170178001, 3.594964597, 6.024435901, 
3.716540702, 4.150476712, 5.337197982, 7.0732487, 2.940046089, 
7.887625163, 7.711030746, 3.731762262, 5.623584878, 3.627160642, 
3.204561681, 3.372630288, 8.129269149, 4.304816659, 7.87296832, 
4.424647426, 11.68230454, 4.269268169, 5.126076914, 10.24746462, 
5.059632662, 3.857770349, 2.497642124, 4.327936217, 4.534603837, 
5.337829861, 15.08917037, 5.84873411, 5.181021341), unauth_holiday_rate = c(0.05869258, 
0.147477609, 0.047149184, 0.118088153, 0.136701839, 0.071442123, 
0.264676536, 0.406984143, 0.09157485, 0.145999323, 0.507470505, 
0.130735461, 0.160571553, 0.187293585, 0.148866976, 0.259437624, 
0.194807454, 0.190756279, 0.378389901, 0.304560965, 0.50329171, 
0.400403302, 0.339031832, 0.105904262, 0.125995381, 0.071661428, 
0.049454988, 0.066022101, 0.323292708, 0.131260248, 0.271113864, 
0.251928184, 0.392714346, 0.244418278, 0.711703828, 0.047633397, 
0.013681013, 0.581522982, 0.328196763, 0.489278503, 0.183183888, 
0.129094746, 0.036540796, 0.072696934, 0.089870327, 0.097975643, 
0.093180861, 0.122607369, 0.229398049, 0.337742017, 0.184277198, 
0.207082285, 0.484941546, 0.115929852, 0.18863269, 0.269305129, 
0, 0.15258703, 0.101834709, 0.221315173, 0.122714706, 0.410021984, 
0, 0.332034853, 0.617353559, 0.260803316, 0.128773211, 0.052541178, 
0.065170358, 0.573236697, 0.311990499, 0.414522642, 0.416200601, 
0.071752777, 0.121677806, 0.455804874, 0.196780374, 0.2181401, 
0.281664832, 0.366917777, 0.917183745, 0.130321977, 0.456314446, 
0, 0.147431875, 0.017885488, 0.203837631, 0.394368816, 0.664088535, 
0.512890047, 0.454108873, 0.472839269, 0.151262853, 0.782581093, 
0.137236364, 0.09520985, 0.110973702, 0.25663034, 0.010682619, 
0.119363265), unauth_late_rate = c(0.047963829, 0.073027618, 
0.06554718, 0.06019396, 0.058648949, 0.069581357, 0.06189809, 
0.071871936, 0.05037626, 0.057045768, 0.103995215, 0.067467857, 
0.069051446, 0.05820701, 0.071404231, 0.061149613, 0.063634188, 
0.061278621, 0.068211841, 0.064855939, 0.077901343, 0.110575403, 
0.177048905, 0.061762472, 0.080057396, 0.055930318, 0.062038238, 
0.070614982, 0.061997128, 0.085965791, 0.064253654, 0.058158378, 
0.069288512, 0.134997328, 0.177602175, 0.091933456, 0.015049115, 
0.068466729, 0.002912989, 0.063506209, 0.055314765, 0.095346092, 
0.050098794, 0.08795049, 0.055247056, 0.077598307, 0.065681857, 
0.079843454, 0.062404576, 0.066664696, 0.060303864, 0.059449858, 
0.076695103, 0.084960791, 0.061350297, 0.118044832, 0.028789405, 
0.061754007, 0.077748714, 0.051603371, 0.068382713, 0.048593823, 
0.004152249, 0.143326374, 0.066132912, 0.060836545, 0.068350724, 
0.069128803, 0.069048683, 0.066733522, 0, 0.06865439, 0.047370388, 
0.070746703, 0.07869332, 0.072775519, 0.116088223, 0.12394464, 
0.061751689, 0.188326528, 0.120886266, 0.071398426, 0.062805464, 
0.001349928, 0.065790845, 0.002235686, 0.065740616, 0.073605182, 
0.096512489, 0.116641416, 0.086866861, 0.251568445, 0.060625754, 
0.059723011, 0.069982695, 0.0591031, 0.076513172, 0.072827529, 
0, 0.069361227), unauth_other_rate = c(1.00332093, 1.425816517, 
1.863201387, 0.339282434, 0.364140614, 1.710824356, 0.626027276, 
0.866077625, 1.404515902, 0.973011109, 0.771641712, 0.669424121, 
0.683463421, 0.343002665, 0.925865604, 0.398750526, 0.950057944, 
0.912543654, 0.432324153, 0.683150112, 0.504474577, 1.444301998, 
2.517541128, 0.315766943, 0.61321223, 0.255218823, 1.835097867, 
1.760218259, 0.390548894, 1.544789636, 0.650771934, 1.107934103, 
0.825676639, 2.328393946, 2.383113131, 0.169500226, 2.359974827, 
0.406472843, 0.874867702, 0.36565776, 1.389532289, 1.12283632, 
1.670094162, 0.87318771, 0.278326289, 0.909333225, 0.587988628, 
0.981063186, 0.652912163, 0.406632157, 0.957452047, 1.010605897, 
0.512145716, 1.793153354, 0.618055052, 2.271738052, 3.353965741, 
0.932153576, 1.248957677, 1.484844314, 1.525381212, 1.770166437, 
2.330795848, 3.4813674, 0.443655748, 1.578940159, 0.960771647, 
0.607856714, 1.954313332, 1.379341781, 0.620961736, 0.817354138, 
2.056798635, 0.558122357, 1.560231148, 0.466389601, 1.80671786, 
1.857976844, 1.326541247, 2.712734187, 1.150652863, 1.202687855, 
0.948647633, 1.610464645, 0.849530353, 2.23568602, 0.366103113, 
2.540540959, 0.969283463, 2.103999751, 2.041018108, 3.909515312, 
0.283369529, 0.5353031, 0.372605513, 0.243109333, 0.706258025, 
1.939466452, 2.255100951, 0.654275081), unauth_no_reason_rate = c(0.209027962, 
0.02077413, 0.140516824, 0.124843782, 0.108790606, 0.087204413, 
0.098499275, 0.053933984, 0.097474998, 0.064605886, 0.044421106, 
0.171201464, 0.15088329, 0.072833255, 0.16095394, 0.081746147, 
0.159947385, 0.134372301, 0.049620832, 0.07044344, 0.035873771, 
0.082085209, 0.090301257, 0.046664178, 0.066607475, 0.131250395, 
0.160122693, 0.116025459, 0.071806296, 0.084277611, 0.083290315, 
0.092535818, 0.060268778, 0.103606894, 0.017191286, 0.131633509, 
0.002736203, 0.057089043, 0, 0.044325697, 0.094059779, 0.024477431, 
0.182041371, 0.449805085, 0.120787504, 0.321592368, 0.214294962, 
0.296264816, 0.115734651, 0.058526872, 0.117102486, 0.09930086, 
0.042256902, 0.069998729, 0.039229612, 0.129524037, 0.035986757, 
0.050239962, 0.007028132, 0.025952377, 0.014508895, 0.035452331, 
0.004152249, 0.001374174, 0.043184226, 0.044362908, 0.038689793, 
0.168424396, 0.00210227, 0.016136384, 0.210341982, 0.077236188, 
0.018905189, 0.27986005, 0.087462859, 0.047487218, 0.081260018, 
0.079927969, 0.07776997, 0.100574153, 0.022447852, 0.011665611, 
0.043015963, 0, 0.02681233, 0.006707058, 0.02968162, 0.020919367, 
0.042199793, 0.023841656, 0.036724201, 0.009783607, 0.033239515, 
0.029727115, 0.063328358, 0.081815982, 0.052378612, 0.019073877, 
0.012819143, 0.204460231), sess_unauth_totalreasons_rate = c(1.319005302, 
1.667095874, 2.116414574, 0.642408329, 0.668282007, 1.939052248, 
1.051101177, 1.398867688, 1.64394201, 1.240662087, 1.427528537, 
1.038828903, 1.06396971, 0.661336515, 1.30709075, 0.80108391, 
1.368446971, 1.298950854, 0.928546728, 1.123010455, 1.121541401, 
2.037365912, 3.123923122, 0.530097854, 0.885872482, 0.514060965, 
2.106713787, 2.0128808, 0.847645027, 1.846293286, 1.069429767, 
1.510556484, 1.347948275, 2.811416445, 3.289610419, 0.440700588, 
2.391441158, 1.113551598, 1.205977453, 0.962768169, 1.722090722, 
1.371754589, 1.938775122, 1.483640218, 0.544231177, 1.406499544, 
0.961146309, 1.479778825, 1.06044944, 0.869565742, 1.319135595, 
1.376438899, 1.116039268, 2.064042726, 0.907267651, 2.788612049, 
3.418741903, 1.196734575, 1.435569231, 1.783715235, 1.730987525, 
2.264234575, 2.339100346, 3.958102801, 1.170326445, 1.944942927, 
1.196585374, 0.897951091, 2.090634643, 2.035448385, 1.143294217, 
1.377767358, 2.539274814, 0.980481887, 1.848065133, 1.042457212, 
2.200846475, 2.279989553, 1.747727739, 3.368552644, 2.211170727, 
1.416073868, 1.510783505, 1.611814574, 1.089565403, 2.262514252, 
0.66536298, 3.029434325, 1.772084279, 2.75737287, 2.618718043, 
4.643706633, 0.528497652, 1.407334319, 0.64315293, 0.479238265, 
0.946123513, 2.287998197, 2.278602713, 1.047459804)), row.names = c(NA, 
100L), class = "data.frame")
1 Like

Hello, thanks for the suggestion.

I have tried this, and it comes close as the legends are now there. But the visual looks like a bargraph rather than a line chart. I have added the data to the chat trail in case you wanted to have a look too. Thanks!

Hi, thank you for replying. The highlight package only allows me to accentuate the relevant rate types. I just want to choose the rates I want, rather than choose all and highlight the main ones.

Thanks for sharing the data: From the table, there are no columns called year, rates or rate_types — were you using a different table when you ran the code you posted above?

From a visualization point of view, there are too many time series ( 2 regions x 8 school types x 19 rate variables) to be able to plot them in a way that can be interpreted by mere mortals, so there's more work to be done, but here's start.

original data, saved as rate_data (click to open)
rate_data <- 
  structure(list(time_period = c("2006/07", "2011/12", "2008/09", 
"2008/09", "2009/10", "2011/12", "2013/14", "2018/19", "2020/21", 
"2020/21", "2021/22", "2009/10", "2010/11", "2011/12", "2011/12", 
"2012/13", "2012/13", "2013/14", "2015/16", "2015/16", "2018/19", 
"2021/22", "2022/23", "2009/10", "2007/08", "2006/07", "2007/08", 
"2010/11", "2013/14", "2014/15", "2014/15", "2016/17", "2017/18", 
"2021/22", "2022/23", "2006/07", "2008/09", "2014/15", "2015/16", 
"2013/14", "2013/14", "2008/09", "2006/07", "2006/07", "2007/08", 
"2007/08", "2007/08", "2008/09", "2012/13", "2014/15", "2014/15", 
"2015/16", "2017/18", "2020/21", "2020/21", "2021/22", "2007/08", 
"2007/08", "2009/10", "2012/13", "2010/11", "2016/17", "2006/07", 
"2021/22", "2015/16", "2015/16", "2010/11", "2006/07", "2020/21", 
"2017/18", "2014/15", "2014/15", "2018/19", "2006/07", "2013/14", 
"2016/17", "2017/18", "2018/19", "2018/19", "2022/23", "2022/23", 
"2020/21", "2015/16", "2011/12", "2011/12", "2012/13", "2012/13", 
"2021/22", "2021/22", "2021/22", "2022/23", "2022/23", "2011/12", 
"2018/19", "2010/11", "2008/09", "2008/09", "2020/21", "2013/14", 
"2008/09"), geographic_level = c("Redcar", "Redcar", "England", 
"England", "England", "England", "England", "England", "England", 
"England", "England", "England", "England", "England", "England", 
"England", "England", "England", "England", "England", "England", 
"England", "England", "Redcar", "Redcar", "England", "England", 
"England", "England", "England", "England", "England", "England", 
"England", "Redcar", "Redcar", "Redcar", "Redcar", "Redcar", 
"Redcar", "Redcar", "Redcar", "England", "England", "England", 
"England", "England", "England", "England", "England", "England", 
"England", "England", "England", "England", "England", "Redcar", 
"Redcar", "Redcar", "Redcar", "Redcar", "Redcar", "Redcar", "Redcar", 
"Redcar", "Redcar", "Redcar", "Redcar", "Redcar", "Redcar", "Redcar", 
"Redcar", "Redcar", "England", "England", "England", "England", 
"England", "England", "England", "Redcar", "Redcar", "Redcar", 
"Redcar", "Redcar", "Redcar", "Redcar", "Redcar", "Redcar", "Redcar", 
"Redcar", "Redcar", "Redcar", "Redcar", "Redcar", "Redcar", "Redcar", 
"Redcar", "Redcar", "England"), school_type = c("State-funded secondary", 
"State-funded secondary", "Special", "State-funded primary", 
"State-funded primary", "Special", "Total", "Total", "State-funded secondary", 
"Total", "State-funded primary", "Total", "Total", "State-funded primary", 
"State-funded secondary", "State-funded primary", "State-funded secondary", 
"State-funded secondary", "State-funded primary", "Total", "State-funded primary", 
"Total", "Special", "State-funded primary", "Total", "State-funded primary", 
"Special", "Special", "State-funded primary", "Special", "Total", 
"State-funded secondary", "Total", "Special", "Total", "State-funded primary", 
"Special", "State-funded primary", "Special", "State-funded primary", 
"State-funded secondary", "State-funded secondary", "Special", 
"State-funded secondary", "State-funded primary", "State-funded secondary", 
"Total", "State-funded secondary", "Total", "State-funded primary", 
"State-funded secondary", "State-funded secondary", "State-funded primary", 
"Special", "State-funded primary", "State-funded secondary", 
"Special", "State-funded secondary", "State-funded secondary", 
"State-funded secondary", "State-funded secondary", "State-funded secondary", 
"Special", "State-funded secondary", "State-funded primary", 
"State-funded secondary", "Total", "Total", "State-funded secondary", 
"Total", "Special", "Total", "State-funded secondary", "Total", 
"Special", "State-funded primary", "Special", "Special", "State-funded secondary", 
"State-funded secondary", "State-funded primary", "Total", "Total", 
"Special", "Total", "Special", "State-funded primary", "Special", 
"State-funded primary", "Total", "Special", "State-funded secondary", 
"State-funded primary", "State-funded primary", "State-funded primary", 
"State-funded primary", "Total", "Special", "Special", "Total"
), overall_absence_rate = c(7.99295, 6.33757, 10.71928, 5.30447, 
5.21413, 9.56886, 4.50648, 4.72613, 5.48906, 4.61535, 6.25876, 
6.04013, 5.79431, 4.36932, 5.86313, 4.68004, 5.88969, 5.21201, 
4.00624, 4.56669, 4.02882, 7.55262, 13.02167, 5.09789, 6.11845, 
5.17937, 10.56915, 10.04171, 3.8792, 9.36289, 4.61866, 5.35203, 
4.8136, 13.18057, 7.70777, 5.10387, 11.46332, 4.20252, 7.51454, 
4.04712, 5.90243, 7.40981, 10.6186, 7.87302, 5.25652, 7.35941, 
6.28988, 7.24819, 5.26413, 4.01695, 5.29786, 5.20783, 4.17197, 
15.20513, 3.63667, 8.98861, 10.53692, 7.11419, 7.16489, 6.71413, 
6.91628, 6.15311, 10.80692, 9.84812, 3.93742, 5.96395, 5.98084, 
6.60151, 6.26081, 5.63041, 7.16773, 5.09431, 6.68975, 6.49161, 
8.98271, 4.03011, 10.22074, 10.1274, 5.4899, 9.01222, 5.83833, 
4.62064, 4.88341, 9.74108, 5.39438, 10.13548, 5.09001, 14.71174, 
6.04135, 7.88345, 13.62821, 9.70334, 4.38627, 3.90498, 4.97109, 
5.01384, 6.28395, 17.37717, 8.12734, 6.2677), authorised_absence_rate = c(6.64578, 
4.67047, 8.5764, 4.66034, 4.54418, 7.61467, 3.45164, 3.31328, 
3.84379, 3.3642, 4.79679, 4.99719, 4.72811, 3.70666, 4.55312, 
3.87718, 4.51144, 3.90663, 3.06955, 3.43673, 2.8854, 5.493, 9.86896, 
4.56779, 5.22542, 4.65583, 8.41244, 8.00776, 3.02995, 7.4922, 
3.54549, 3.83833, 3.45268, 10.32944, 4.41249, 4.66317, 9.07188, 
3.08897, 6.30856, 3.08435, 4.18034, 6.03806, 8.54916, 6.35631, 
4.68539, 5.86928, 5.27528, 5.7555, 4.19801, 3.1445, 3.97446, 
3.8266, 3.03762, 13.11216, 2.71243, 6.19407, 7.11818, 5.91739, 
5.72932, 4.93042, 5.18529, 3.88888, 8.46782, 5.89002, 2.7671, 
4.01901, 4.78425, 5.68962, 4.17018, 3.59496, 6.02444, 3.71654, 
4.15048, 5.48934, 7.12578, 2.9752, 7.98571, 7.81292, 3.73974, 
5.64023, 3.62716, 3.20456, 3.37263, 8.12927, 4.30482, 7.87297, 
4.42465, 11.6823, 4.26927, 5.12608, 10.7496, 5.05963, 3.85777, 
2.49764, 4.32794, 4.5346, 5.33783, 15.08917, 5.84873, 5.21305
), unauthorised_absence_rate = c(1.34717, 1.6671, 2.14288, 0.64413, 
0.66995, 1.95419, 1.05484, 1.41286, 1.64527, 1.25115, 1.46197, 
1.04294, 1.0662, 0.66266, 1.31001, 0.80286, 1.37825, 1.30539, 
0.93668, 1.12996, 1.14343, 2.05961, 3.15272, 0.5301, 0.89302, 
0.52353, 2.15671, 2.03395, 0.84925, 1.87069, 1.07317, 1.5137, 
1.36092, 2.85112, 3.29528, 0.4407, 2.39144, 1.11355, 1.20598, 
0.96277, 1.72209, 1.37175, 2.06944, 1.51671, 0.57113, 1.49013, 
1.0146, 1.49269, 1.06612, 0.87245, 1.32341, 1.38123, 1.13435, 
2.09297, 0.92424, 2.79453, 3.41874, 1.1968, 1.43557, 1.78372, 
1.73099, 2.26423, 2.3391, 3.9581, 1.17033, 1.94494, 1.19659, 
0.91189, 2.09063, 2.03545, 1.14329, 1.37777, 2.53927, 1.00227, 
1.85693, 1.05492, 2.23503, 2.31447, 1.75017, 3.37199, 2.21117, 
1.41607, 1.51078, 1.61181, 1.08957, 2.26251, 0.66536, 3.02943, 
1.77208, 2.75737, 2.87861, 4.64371, 0.5285, 1.40733, 0.64315, 
0.47924, 0.94612, 2.288, 2.2786, 1.05465), persistent_absence_rate = c(25.68743, 
18.67263, 31.43418, 14.6311, 14.09295, 28.37148, 10.67379, 10.86219, 
14.83287, 12.07846, 17.70069, 17.43129, 16.25496, 10.44074, 16.77741, 
10.95327, 16.53104, 13.6191, 8.23964, 10.49978, 8.2481, 22.50843, 
38.33281, 13.69317, 18.11809, 14.15478, 30.59004, 29.95529, 8.0548, 
27.47985, 10.96052, 13.5429, 11.16776, 40.36491, 21.30276, 14.09639, 
35.45817, 8.31322, 22.80702, 7.87559, 16.4632, 23.01295, 30.46732, 
24.94634, 14.38525, 22.83925, 18.47919, 22.54805, 13.63616, 8.41931, 
13.82327, 13.05705, 8.66984, 48.94225, 8.78223, 27.7112, 29.45736, 
22.88337, 21.24179, 20.2709, 20.84348, 16.8798, 32.08333, 30.20427, 
7.56416, 15.19862, 17.07753, 20.04851, 17.77537, 13.53662, 19.56522, 
12.44099, 19.07919, 19.3335, 26.45398, 8.31894, 29.6473, 28.84735, 
13.68535, 26.52469, 15.92331, 11.98731, 11.23235, 27.5, 14.33753, 
33.33333, 12.45828, 41.50418, 17.04952, 23.50319, 38.30846, 26.69186, 
9.89927, 6.87316, 13.08655, 13.35536, 18.44031, 48.30769, 25.76923, 
18.48632), severe_absence_rate = c(1.47985, 0.90555, 3.69071, 
0.35153, 0.32175, 3.29225, 0.56527, 0.84784, 1.48413, 1.13043, 
0.6362, 0.67677, 0.65885, 0.30393, 0.91143, 0.3076, 0.84386, 
0.82753, 0.30683, 0.6024, 0.39052, 1.65161, 6.2384, 0.26934, 
0.61912, 0.37651, 4.1847, 3.14212, 0.30498, 3.66882, 0.58068, 
1.07049, 0.76548, 5.81814, 2.42724, 0.1506, 5.17928, 0.13645, 
1.40351, 0.23195, 1.05488, 1.24224, 3.93515, 1.58375, 0.37054, 
1.35609, 0.8708, 1.17279, 0.57872, 0.30476, 0.85235, 0.92279, 
0.37051, 5.58258, 0.71559, 2.73511, 2.71318, 0.97968, 1.50651, 
1.09762, 1.39473, 1.49005, 4.16667, 4.00283, 0.238, 1.67777, 
0.86146, 0.85639, 2.36201, 1.34452, 1.08696, 0.58476, 2.42256, 
0.97619, 3.17931, 0.34946, 4.40295, 4.57576, 1.32124, 3.40278, 
0.56393, 1.49438, 0.9028, 3.33333, 0.65945, 3.87597, 0.25843, 
7.79944, 0.439, 2.20158, 6.46766, 4.38172, 0.35741, 0.44248, 
0.28307, 0.25581, 0.81016, 10.15385, 1.15385, 0.77097), authorised_illness_rate = c(4.402342123, 
3.169757957, 4.510941601, 3.225900941, 3.165037022, 4.341305015, 
2.59857839, 2.45920034, 2.442370654, 2.050637484, 3.926600502, 
3.490317176, 3.391139055, 2.709571983, 3.239248823, 2.834430584, 
3.296389781, 2.881836529, 2.40321503, 2.599256792, 2.219874272, 
4.35255077, 5.536242239, 3.134535527, 3.60657439, 3.044516844, 
4.204346828, 4.502456673, 2.353765945, 4.324687187, 2.764931092, 
2.827594697, 2.605048261, 5.829248983, 3.286310926, 3.088137451, 
3.633677183, 2.592249532, 3.863594434, 2.455222567, 3.045943337, 
4.132928256, 3.828253069, 3.931357688, 3.108332118, 3.733195292, 
3.410058968, 3.977662146, 3.053651391, 2.545010473, 3.01843442, 
2.821627073, 2.366800551, 3.251569163, 1.715110128, 4.840190739, 
3.055275659, 4.148583046, 3.977080968, 3.4278904, 3.628941885, 
2.723815577, 3.312110727, 4.44940445, 2.303290621, 2.768308656, 
3.280480291, 3.741240945, 2.162510516, 2.590892515, 3.816348302, 
2.908265858, 2.64661905, 3.465369878, 4.073276851, 2.315657336, 
4.355736292, 4.217304689, 2.724741834, 4.107000813, 3.138118143, 
1.817102152, 2.532100528, 4.862442291, 2.894922981, 4.740772206, 
2.920868086, 5.870594342, 3.790389835, 4.120575063, 4.601118676, 
3.402521085, 2.582749366, 2.072028317, 2.925628059, 3.208469177, 
3.672266604, 2.664273762, 3.382117295, 3.589099772), authorised_appointment_rate = c(0.469474211, 
0.355106618, 0.992846714, 0.264515582, 0.259146728, 1.044375313, 
0.309094748, 0.278474144, 0.215020865, 0.182764032, 0.205122528, 
0.341902813, 0.337153795, 0.250045957, 0.406386925, 0.245713136, 
0.394377468, 0.381937841, 0.228106101, 0.289623838, 0.220839754, 
0.275383769, 0.956109857, 0.296236453, 0.352405262, 0.32462294, 
1.018245951, 0.992842047, 0.237845527, 1.066380842, 0.299235019, 
0.343084993, 0.281061851, 0.920059028, 0.237794804, 0.342033789, 
1.028812214, 0.223971322, 0.97876431, 0.236774072, 0.336260186, 
0.394202536, 1.08319875, 0.507461201, 0.268769444, 0.421147523, 
0.347672727, 0.429252821, 0.319870078, 0.232864704, 0.3668002, 
0.350298896, 0.222830911, 0.681263453, 0.143500842, 0.339932558, 
0.845688787, 0.403302768, 0.37421144, 0.359482279, 0.394641941, 
0.301363374, 0.943944637, 0.271330706, 0.193989875, 0.287709086, 
0.342275949, 0.412257548, 0.175648251, 0.241392409, 1.098005274, 
0.280976173, 0.307961233, 0.418016971, 1.068816295, 0.225997216, 
1.083324938, 1.076140852, 0.329098145, 0.35033252, 0.196533238, 
0.159348583, 0.24756912, 0.938200275, 0.317309192, 0.990408907, 
0.248926276, 0.923551334, 0.188419841, 0.239186624, 0.877849657, 
0.256547916, 0.26517116, 0.177690741, 0.277986816, 0.289704403, 
0.350926255, 0.622501972, 1.087490653, 0.349263195), authorised_religious_rate = c(0.000963262, 
0.002769884, 0.097841583, 0.120486403, 0.073913627, 0.021682908, 
0.044567067, 0.050917333, 0.079708805, 0.08639774, 0.0376174, 
0.062399234, 0.090595637, 0.023303684, 0.018225872, 0.026400141, 
0.02171359, 0.040097719, 0.092715334, 0.086607366, 0.053637509, 
0.03993333, 0.086886272, 0.00428806, 0.00560558, 0.005464812, 
0.058655029, 0.091208577, 0.047829294, 0.028500261, 0.031232485, 
0.063835129, 0.042961143, 0.024635098, 0.017360886, 0.006733342, 
0.03009823, 0.003181167, 0.013593949, 0.00497056, 0.010435418, 
0.009587287, 0.007877169, 0.005836263, 0.076315176, 0.054524183, 
0.066020035, 0.085767768, 0.024357021, 0.035307702, 0.025745658, 
0.077887861, 0.04618404, 0.083395813, 0.091617315, 0.043508723, 
0.003598676, 0.0050482, 0.006186221, 0.003181259, 0.014699801, 
0.011433841, 0.011072664, 0.009275676, 0.006132838, 0.009799882, 
0.011864372, 0.003929081, 0.008191602, 0.005211657, 0, 0.004881675, 
0.005442403, 0.005664222, 0.048850812, 0.070320319, 0.043331723, 
0.050827434, 0.047191055, 0.101254982, 0.02009999, 0.009253089, 
0.007860316, 0.001349928, 0.003594146, 0.002235686, 0.00399331, 
0.011621871, 0.009098633, 0.009225619, 0.022599508, 0.013746143, 
0.0044343, 0.006155072, 0.008486149, 0.009531615, 0.00982099, 
0.017339888, 0.001068262, 0.104136536), authorised_study_rate = c(0.106888921, 
0.213842533, 0.026723861, 0.000569217, 0.000381843, 0.046670951, 
0.032174192, 0.028272447, 0.069293177, 0.029724679, 0.000185471, 
0.064626189, 0.05734854, 0.000166846, 0.165275658, 0.000141025, 
0.080094846, 0.075361652, 0.000141847, 0.026704867, 0.000119491, 
0.047770304, 0.017614015, 0.000396375, 0.071796541, 0.006602546, 
0.044005587, 0.023910926, 0.000161495, 0.018954123, 0.025522848, 
0.060987282, 0.025684123, 0.023365623, 0.006198114, 0, 0, 0, 
0, 5.84772e-05, 0.050766897, 0.054608904, 0.08062514, 0.270691104, 
0.001008702, 0.192213617, 0.090107015, 0.14327014, 0.035187559, 
0.000322297, 0.060160264, 0.063864868, 0.000192014, 0.005212542, 
7.8888e-05, 0.109748346, 0, 0.143043857, 0.060727456, 0.064998146, 
0.04894843, 0.007424572, 0, 0.020440842, 2.82619e-05, 0.016298012, 
0.024027219, 0.052902851, 0.020587744, 0.005652293, 0, 0.007866649, 
0.018010057, 0.130157401, 0.013247678, 0.000138999, 0.017293866, 
0.014859848, 0.067348799, 0.109148147, 0, 0.008672863, 0.007166758, 
0.058046924, 0.103439526, 0.086073912, 5.96016e-05, 0, 0, 0.008984031, 
0.001412469, 0.014026677, 0, 0, 0.000224304, 0.000106301, 0.027129614, 
0, 0, 0.066997959), authorised_traveller_rate = c(0.030924048, 
0.002769884, 0.013619954, 0.020382596, 0.01924835, 0.016703516, 
0.011586348, 0.010295285, 0.003543095, 0.008389384, 0.012874469, 
0.013824355, 0.01455757, 0.018769241, 0.006621389, 0.01874139, 
0.006989495, 0.005752062, 0.01449861, 0.010972974, 0.013457066, 
0.009450121, 0.006519716, 0.004792537, 0.002620565, 0.023863851, 
0.020681003, 0.019119726, 0.015915171, 0.012167704, 0.011533929, 
0.005748931, 0.010549602, 0.006753057, 0.003731203, 0.01786669, 
0, 0.005961105, 0, 0.003245483, 0.000775605, 0.002598752, 0.028510717, 
0.011932859, 0.021211819, 0.009550508, 0.015800937, 0.007902491, 
0.013595407, 0.015550515, 0.006025712, 0.006063186, 0.014037636, 
0.006736208, 0.012155895, 0.005166401, 0, 0.003561401, 0.00384351, 
0.000167435, 0.001412708, 0.003675163, 0, 0.001511592, 0.003561003, 
0.002529002, 0.001473719, 0.024116993, 0.000579936, 0.003160422, 
0, 0.003746764, 0.003616334, 0.018370604, 0.013952341, 0.013799937, 
0.008854088, 0.007596105, 0.006056435, 0.004952892, 0.00395128, 
0.000274844, 0.003051652, 0, 0.00319879, 0, 0.015794436, 0, 0.003042181, 
0.002310179, 0, 0.003646936, 0.003689338, 0.006235706, 0.001570125, 
0.007299304, 0.004875669, 0, 0, 0.014521308), authorised_holiday_rate = c(0.648009933, 
0.29809941, 0.597292108, 0.641375369, 0.550544875, 0.500793189, 
0.115596922, 0.066355463, 0.006913476, 0.018762781, 0.070231516, 
0.412579427, 0.377639477, 0.45983792, 0.186549461, 0.490980035, 
0.191697183, 0.06254772, 0.089040843, 0.071215396, 0.08137019, 
0.054968941, 0.347991766, 0.841901045, 0.715848136, 0.747687283, 
0.615014103, 0.531521181, 0.149974775, 0.309001058, 0.073510046, 
0.041106393, 0.069063824, 0.311588748, 0.081238463, 1.031534709, 
0.805811695, 0.119995896, 0.526280016, 0.229727572, 0.149691838, 
0.4245096, 0.613663885, 0.448290012, 0.692527891, 0.381459539, 
0.547491696, 0.334273919, 0.362140148, 0.092392565, 0.040602617, 
0.038828016, 0.084614586, 0.138502954, 0.024368108, 0.025234516, 
0.831294084, 0.514985547, 0.413085797, 0.445543709, 0.323090181, 
0.060992858, 0.935640138, 0.041534417, 0.11109764, 0.096664071, 
0.602769809, 0.840576651, 0.005581888, 0.080575561, 0.378414283, 
0.12930221, 0.04242926, 0.607056878, 0.365720464, 0.090991954, 
0.36466907, 0.368893578, 0.034999945, 0.029093236, 0.085926027, 
0.023117454, 0.111354473, 0.928750776, 0.571289529, 1.087661249, 
1.048452562, 0.583417915, 0.086381189, 0.076356717, 0.61654284, 
0.048918035, 0.82080673, 0.097701685, 0.868503189, 0.798777686, 
0.613289471, 0.195073738, 0.616387138, 0.498557396), authorised_excluded_rate = c(0.26044625, 
0.170834469, 0.285005366, 0.017613818, 0.016364675, 0.239002116, 
0.060163563, 0.081273909, 0.118479615, 0.058374129, 0.016857592, 
0.082210785, 0.07892326, 0.016439811, 0.133498184, 0.015749588, 
0.11478243, 0.112142101, 0.02056632, 0.070396237, 0.020681829, 
0.096452463, 0.152571916, 0.00998145, 0.114940414, 0.024813647, 
0.288116821, 0.245392358, 0.017911392, 0.210702451, 0.065652452, 
0.151586485, 0.078997213, 0.126238638, 0.367353886, 0.014600019, 
0.109448108, 0.012008187, 0.004854982, 0.010028835, 0.122616159, 
0.19118384, 0.373011745, 0.237469301, 0.019032766, 0.169215206, 
0.091613693, 0.171848949, 0.061201723, 0.018837889, 0.125254961, 
0.136134065, 0.022206985, 0.09254996, 0.011262373, 0.197325813, 
0.55059738, 0.215724106, 0.165087899, 0.122997523, 0.198237322, 
0.348880634, 0.186851211, 0.611782376, 0.014441845, 0.323079987, 
0.102078373, 0.138323364, 0.42139632, 0.236393473, 0, 0.078200086, 
0.655344082, 0.127509241, 0.208203462, 0.022925458, 0.181847792, 
0.155570063, 0.161703431, 0.271521352, 0.017866658, 0.186008474, 
0.149715896, 0.043197711, 0.087661224, 0.049185092, 0.009327658, 
0.099173298, 0.015852832, 0.279395826, 0.182914772, 0.804535105, 
0.010003782, 0.019970386, 0.009308596, 0.003401617, 0.097861636, 
0.125714187, 0.007477834, 0.09217278), autho_other_reasons_rate = c(0.626386351, 
0.450218447, 1.787282585, 0.331709758, 0.424555147, 1.270837864, 
0.268608704, 0.300842933, 0.90275054, 0.890401719, 0.401429897, 
0.495896674, 0.358801563, 0.211684738, 0.381430232, 0.229858411, 
0.362434977, 0.330017597, 0.193875674, 0.259863462, 0.217802033, 
0.53682938, 2.685313245, 0.268490185, 0.335189364, 0.341656168, 
1.734112156, 1.414931866, 0.200433291, 1.460512025, 0.262731673, 
0.333641787, 0.303918012, 2.969706465, 0.401536022, 0.161100215, 
3.461296413, 0.131602855, 0.921475526, 0.144321662, 0.463847271, 
0.819976394, 1.79086506, 0.74051534, 0.27690815, 0.574568295, 
0.430964705, 0.556854596, 0.299294164, 0.194395379, 0.319995649, 
0.318490584, 0.230874231, 8.662615529, 0.654640537, 0.614060383, 
1.831725925, 0.477158624, 0.707095998, 0.484957835, 0.569206856, 
0.431293383, 3.078200692, 0.484739967, 0.13455504, 0.514616753, 
0.414133751, 0.426033989, 1.375681742, 0.431686267, 0.731668042, 
0.303301287, 0.471054294, 0.543111335, 1.281180797, 0.20021487, 
1.832567394, 1.819838176, 0.360622617, 0.650280937, 0.164665305, 
1.000784222, 0.313811546, 1.297281244, 0.317381075, 0.916631268, 
0.172963978, 4.19394578, 0.176083658, 0.390042855, 3.945026696, 
0.515690766, 0.16573641, 0.117860218, 0.231892445, 0.212778246, 
0.555199361, 11.46426683, 0.754192928, 0.452846672), sess_auth_totalreasons_rate = c(6.552177937, 
4.670473635, 8.344520878, 4.6421243, 4.526895956, 7.503743435, 
3.440369934, 3.275631853, 3.838080226, 3.325451947, 4.670919376, 
4.976628013, 4.715420117, 3.699880278, 4.540020063, 3.869726974, 
4.470823413, 3.88969322, 3.04215976, 3.414640932, 2.827782144, 
5.413339078, 9.789249026, 4.56779242, 5.208399137, 4.549699592, 
8.017190905, 7.85167203, 3.023836891, 7.430905652, 3.534349544, 
3.827585699, 3.417284029, 10.21159564, 4.401524304, 4.663172884, 
9.071880045, 3.088970064, 6.308563217, 3.084349228, 4.180336711, 
6.03805907, 7.845799138, 6.16544822, 4.488056692, 5.54350411, 
5.016226882, 5.712809034, 4.174861015, 3.134681524, 3.963019481, 
3.81319455, 2.987740956, 12.92184562, 2.652734085, 6.175167478, 
7.11818051, 5.91738932, 5.729318806, 4.930415817, 5.185288133, 
3.888879402, 8.467820069, 5.890020025, 2.767097124, 4.019005449, 
4.784252172, 5.643294062, 4.170178001, 3.594964597, 6.024435901, 
3.716540702, 4.150476712, 5.337197982, 7.0732487, 2.940046089, 
7.887625163, 7.711030746, 3.731762262, 5.623584878, 3.627160642, 
3.204561681, 3.372630288, 8.129269149, 4.304816659, 7.87296832, 
4.424647426, 11.68230454, 4.269268169, 5.126076914, 10.24746462, 
5.059632662, 3.857770349, 2.497642124, 4.327936217, 4.534603837, 
5.337829861, 15.08917037, 5.84873411, 5.181021341), unauth_holiday_rate = c(0.05869258, 
0.147477609, 0.047149184, 0.118088153, 0.136701839, 0.071442123, 
0.264676536, 0.406984143, 0.09157485, 0.145999323, 0.507470505, 
0.130735461, 0.160571553, 0.187293585, 0.148866976, 0.259437624, 
0.194807454, 0.190756279, 0.378389901, 0.304560965, 0.50329171, 
0.400403302, 0.339031832, 0.105904262, 0.125995381, 0.071661428, 
0.049454988, 0.066022101, 0.323292708, 0.131260248, 0.271113864, 
0.251928184, 0.392714346, 0.244418278, 0.711703828, 0.047633397, 
0.013681013, 0.581522982, 0.328196763, 0.489278503, 0.183183888, 
0.129094746, 0.036540796, 0.072696934, 0.089870327, 0.097975643, 
0.093180861, 0.122607369, 0.229398049, 0.337742017, 0.184277198, 
0.207082285, 0.484941546, 0.115929852, 0.18863269, 0.269305129, 
0, 0.15258703, 0.101834709, 0.221315173, 0.122714706, 0.410021984, 
0, 0.332034853, 0.617353559, 0.260803316, 0.128773211, 0.052541178, 
0.065170358, 0.573236697, 0.311990499, 0.414522642, 0.416200601, 
0.071752777, 0.121677806, 0.455804874, 0.196780374, 0.2181401, 
0.281664832, 0.366917777, 0.917183745, 0.130321977, 0.456314446, 
0, 0.147431875, 0.017885488, 0.203837631, 0.394368816, 0.664088535, 
0.512890047, 0.454108873, 0.472839269, 0.151262853, 0.782581093, 
0.137236364, 0.09520985, 0.110973702, 0.25663034, 0.010682619, 
0.119363265), unauth_late_rate = c(0.047963829, 0.073027618, 
0.06554718, 0.06019396, 0.058648949, 0.069581357, 0.06189809, 
0.071871936, 0.05037626, 0.057045768, 0.103995215, 0.067467857, 
0.069051446, 0.05820701, 0.071404231, 0.061149613, 0.063634188, 
0.061278621, 0.068211841, 0.064855939, 0.077901343, 0.110575403, 
0.177048905, 0.061762472, 0.080057396, 0.055930318, 0.062038238, 
0.070614982, 0.061997128, 0.085965791, 0.064253654, 0.058158378, 
0.069288512, 0.134997328, 0.177602175, 0.091933456, 0.015049115, 
0.068466729, 0.002912989, 0.063506209, 0.055314765, 0.095346092, 
0.050098794, 0.08795049, 0.055247056, 0.077598307, 0.065681857, 
0.079843454, 0.062404576, 0.066664696, 0.060303864, 0.059449858, 
0.076695103, 0.084960791, 0.061350297, 0.118044832, 0.028789405, 
0.061754007, 0.077748714, 0.051603371, 0.068382713, 0.048593823, 
0.004152249, 0.143326374, 0.066132912, 0.060836545, 0.068350724, 
0.069128803, 0.069048683, 0.066733522, 0, 0.06865439, 0.047370388, 
0.070746703, 0.07869332, 0.072775519, 0.116088223, 0.12394464, 
0.061751689, 0.188326528, 0.120886266, 0.071398426, 0.062805464, 
0.001349928, 0.065790845, 0.002235686, 0.065740616, 0.073605182, 
0.096512489, 0.116641416, 0.086866861, 0.251568445, 0.060625754, 
0.059723011, 0.069982695, 0.0591031, 0.076513172, 0.072827529, 
0, 0.069361227), unauth_other_rate = c(1.00332093, 1.425816517, 
1.863201387, 0.339282434, 0.364140614, 1.710824356, 0.626027276, 
0.866077625, 1.404515902, 0.973011109, 0.771641712, 0.669424121, 
0.683463421, 0.343002665, 0.925865604, 0.398750526, 0.950057944, 
0.912543654, 0.432324153, 0.683150112, 0.504474577, 1.444301998, 
2.517541128, 0.315766943, 0.61321223, 0.255218823, 1.835097867, 
1.760218259, 0.390548894, 1.544789636, 0.650771934, 1.107934103, 
0.825676639, 2.328393946, 2.383113131, 0.169500226, 2.359974827, 
0.406472843, 0.874867702, 0.36565776, 1.389532289, 1.12283632, 
1.670094162, 0.87318771, 0.278326289, 0.909333225, 0.587988628, 
0.981063186, 0.652912163, 0.406632157, 0.957452047, 1.010605897, 
0.512145716, 1.793153354, 0.618055052, 2.271738052, 3.353965741, 
0.932153576, 1.248957677, 1.484844314, 1.525381212, 1.770166437, 
2.330795848, 3.4813674, 0.443655748, 1.578940159, 0.960771647, 
0.607856714, 1.954313332, 1.379341781, 0.620961736, 0.817354138, 
2.056798635, 0.558122357, 1.560231148, 0.466389601, 1.80671786, 
1.857976844, 1.326541247, 2.712734187, 1.150652863, 1.202687855, 
0.948647633, 1.610464645, 0.849530353, 2.23568602, 0.366103113, 
2.540540959, 0.969283463, 2.103999751, 2.041018108, 3.909515312, 
0.283369529, 0.5353031, 0.372605513, 0.243109333, 0.706258025, 
1.939466452, 2.255100951, 0.654275081), unauth_no_reason_rate = c(0.209027962, 
0.02077413, 0.140516824, 0.124843782, 0.108790606, 0.087204413, 
0.098499275, 0.053933984, 0.097474998, 0.064605886, 0.044421106, 
0.171201464, 0.15088329, 0.072833255, 0.16095394, 0.081746147, 
0.159947385, 0.134372301, 0.049620832, 0.07044344, 0.035873771, 
0.082085209, 0.090301257, 0.046664178, 0.066607475, 0.131250395, 
0.160122693, 0.116025459, 0.071806296, 0.084277611, 0.083290315, 
0.092535818, 0.060268778, 0.103606894, 0.017191286, 0.131633509, 
0.002736203, 0.057089043, 0, 0.044325697, 0.094059779, 0.024477431, 
0.182041371, 0.449805085, 0.120787504, 0.321592368, 0.214294962, 
0.296264816, 0.115734651, 0.058526872, 0.117102486, 0.09930086, 
0.042256902, 0.069998729, 0.039229612, 0.129524037, 0.035986757, 
0.050239962, 0.007028132, 0.025952377, 0.014508895, 0.035452331, 
0.004152249, 0.001374174, 0.043184226, 0.044362908, 0.038689793, 
0.168424396, 0.00210227, 0.016136384, 0.210341982, 0.077236188, 
0.018905189, 0.27986005, 0.087462859, 0.047487218, 0.081260018, 
0.079927969, 0.07776997, 0.100574153, 0.022447852, 0.011665611, 
0.043015963, 0, 0.02681233, 0.006707058, 0.02968162, 0.020919367, 
0.042199793, 0.023841656, 0.036724201, 0.009783607, 0.033239515, 
0.029727115, 0.063328358, 0.081815982, 0.052378612, 0.019073877, 
0.012819143, 0.204460231), sess_unauth_totalreasons_rate = c(1.319005302, 
1.667095874, 2.116414574, 0.642408329, 0.668282007, 1.939052248, 
1.051101177, 1.398867688, 1.64394201, 1.240662087, 1.427528537, 
1.038828903, 1.06396971, 0.661336515, 1.30709075, 0.80108391, 
1.368446971, 1.298950854, 0.928546728, 1.123010455, 1.121541401, 
2.037365912, 3.123923122, 0.530097854, 0.885872482, 0.514060965, 
2.106713787, 2.0128808, 0.847645027, 1.846293286, 1.069429767, 
1.510556484, 1.347948275, 2.811416445, 3.289610419, 0.440700588, 
2.391441158, 1.113551598, 1.205977453, 0.962768169, 1.722090722, 
1.371754589, 1.938775122, 1.483640218, 0.544231177, 1.406499544, 
0.961146309, 1.479778825, 1.06044944, 0.869565742, 1.319135595, 
1.376438899, 1.116039268, 2.064042726, 0.907267651, 2.788612049, 
3.418741903, 1.196734575, 1.435569231, 1.783715235, 1.730987525, 
2.264234575, 2.339100346, 3.958102801, 1.170326445, 1.944942927, 
1.196585374, 0.897951091, 2.090634643, 2.035448385, 1.143294217, 
1.377767358, 2.539274814, 0.980481887, 1.848065133, 1.042457212, 
2.200846475, 2.279989553, 1.747727739, 3.368552644, 2.211170727, 
1.416073868, 1.510783505, 1.611814574, 1.089565403, 2.262514252, 
0.66536298, 3.029434325, 1.772084279, 2.75737287, 2.618718043, 
4.643706633, 0.528497652, 1.407334319, 0.64315293, 0.479238265, 
0.946123513, 2.287998197, 2.278602713, 1.047459804)), row.names = c(NA, 
100L), class = "data.frame") 
library(tidyverse)

rate_data |> 
  pivot_longer(contains('rate'), names_to = 'rate_type', values_to = 'rate') |> 
  mutate(year = parse_number(time_period)) |> 
  ggplot(aes(x = year, y = rate, colour = rate_type)) + 
  geom_line() +
  facet_wrap(~ geographic_level + school_type, scales = 'free')

Created on 2024-05-16 with reprex v2.0.2

This looks great and I have been able to replicate it. I have modified this useful code to now pick out what rate types and schools I want to view. Thank you very much!

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.