diff --git a/output/section1_chart1.csv b/output/section1_chart1.csv index e8ff1d7..6c25032 100644 --- a/output/section1_chart1.csv +++ b/output/section1_chart1.csv @@ -62,24 +62,3 @@ year,indicator,High income,Lower middle income,Upper middle income,Low income,Af 2018-01-01,Share of GDP (%),12.388,3.627,5.59,5.011,4.834,6.181,2.589,6.04,5.006,7.399,2.485,4.732,3.62,10.997,4.568,4.903,1.898,3.092,3.241,3.103,4.128,7.239,3.304,2.745,3.344,3.4,3.738,7.384,4.099,10.388,4.271,6.874,3.732,3.38,5.647,8.089,8.316,5.303,3.091,6.699,5.844,4.432,4.987,8.29,8.077,9.376,6.004,4.021,4.162,5.057,4.849,9.499,6.05,6.563,4.73,6.604,9.465,10.846,9.226,7.625,7.286,6.185,4.126,7.865,8.325,4.584,6.107,4.905,4.171,7.228,5.968,5.383,8.499,7.878,6.745,5.16,4.892,4.436,4.138,6.688,6.532,16.636,9.015,14.208,4.066,2.34,4.749,7.485,4.053,7.769,5.189,8.077,,4.945,3.215,2.828,3.253,5.341,4.464,5.937,4.099,,6.66,7.431,10.005,10.349,3.556,5.527,10.789,8.761,7.329,6.826,7.47,10.098,6.691,9.045,11.213,7.113,11.465,8.12,6.576,8.378,6.868,7.228,8.682,2.818,5.01,6.189,6.53,5.28,8.566,8.344,10.02,9.96,6.313,9.413,6.708,5.518,5.355,8.489,8.532,6.666,8.277,8.997,10.941,11.539,7.014,6.457,4.124,5.694,7.521,9.734,5.054,2.316,3.243,2.858,2.868,7.436,4.9,4.528,3.642,3.869,6.37,10.351,2.413,6.144,5.168,3.554,10.74,11.921,2.246,3.759,15.263,11.657,3.8,11.102,9.149,11.1,2.294,3.954,7.544,4.764,4.075,3.774,4.806,18.204,3.318,5.027,,,,, 2019-01-01,Share of GDP (%),12.471,3.604,5.743,4.935,4.791,6.23,2.656,6.122,5.319,6.54,2.321,4.622,3.652,7.827,4.479,5.18,2.542,3.227,3.508,3.044,4.459,6.745,3.234,2.768,3.159,3.391,4.089,8.087,4.369,11.041,3.777,5.137,3.882,3.272,6.033,7.953,8.424,5.666,2.985,6.331,5.23,4.495,4.875,8.847,8.23,6.126,5.643,3.798,3.881,5.32,4.376,9.472,5.891,6.194,4.887,6.888,9.614,10.939,9.363,8.117,7.221,5.169,4.239,7.818,8.507,4.932,6.175,4.93,4.286,7.305,6.098,5.448,8.569,8.328,7.161,5.179,5.187,4.385,4.321,8.432,6.831,16.67,9.39,14.831,3.852,2.166,4.599,5.987,4.255,7.487,5.36,7.952,,4.991,3.806,2.836,3.514,,4.634,5.456,4.291,,,7.41,11.38,10.484,4.073,5.861,10.655,8.925,7.089,6.9,7.603,10.152,6.815,9.171,11.098,6.657,11.697,8.198,6.28,8.58,6.67,7.388,8.656,2.787,4.495,6.614,6.992,5.47,9.149,8.33,10.14,10.438,6.46,9.514,6.497,5.714,5.63,8.353,8.666,6.919,8.499,9.131,10.832,11.443,6.948,7.067,4.366,5.682,7.094,9.95,5.397,2.258,3.604,2.939,2.905,7.661,4.679,4.445,3.455,3.86,6.027,10.173,2.194,6.896,5.35,3.826,10.762,11.568,2.603,3.84,14.826,11.26,4.161,11.555,9.607,15.32,2.325,4.166,8.141,5.616,4.399,4.327,4.751,20.89,3.315,4.974,,,,, 2020-01-01,Share of GDP (%),13.856,3.77,6.167,5.11,4.929,6.406,2.969,6.187,6.502,6.501,2.589,5.492,3.766,9.4,5.393,5.346,4.394,3.248,4.051,3.739,4.037,6.496,3.481,3.427,2.639,3.904,4.363,8.145,4.307,11.382,3.881,5.434,4.271,3.16,6.379,7.55,8.928,6.198,3.381,7.421,4.911,5.151,6.084,8.756,8.528,6.586,5.963,3.955,3.681,5.618,5.615,9.984,7.756,7.141,5.278,7.857,10.12,12.923,9.709,9.002,7.825,6.094,4.94,8.477,9.882,5.821,6.467,5.509,3.312,9.035,6.651,6.223,8.652,9.663,7.577,6.286,5.952,7.186,4.834,6.772,7.43,18.667,9.152,15.534,4.177,2.152,4.154,5.154,5.089,7.387,6.307,8.871,,5.666,5.188,2.786,4.183,,3.015,6.338,5.638,,,8.969,12.241,11.422,4.607,6.406,10.99,9.703,8.478,7.991,9.216,10.554,7.574,9.612,12.169,7.605,12.68,9.504,7.23,9.59,7.102,8.195,9.61,3.789,5.259,7.241,7.499,5.718,10.747,11.422,11.186,11.249,6.497,10.527,7.005,6.226,7.548,8.691,8.728,7.129,9.433,10.752,11.38,12.006,8.177,7.732,4.617,5.684,7.562,12.209,6.714,2.271,4.363,2.955,3.413,11.347,4.624,5.208,3.843,4.357,9.964,11.169,2.393,7.337,5.594,3.831,10.886,11.867,2.697,4.12,13.008,11.56,4.945,11.004,10.146,18.391,2.613,5.109,8.331,4.955,6.0,4.46,5.36,22.975,3.915,4.635,,,,, -2000-01-01,Share of government spending (%),37.888,16.735,22.694,,20.448,12.2,4.705,14.917,14.88,25.063,19.836,10.521,28.216,24.906,29.972,77.101,6.646,47.578,62.286,9.479,6.018,18.727,17.052,14.297,69.793,21.638,37.514,28.684,25.735,13.132,29.124,,28.189,,12.852,12.311,31.755,34.502,12.923,19.607,97.465,25.392,8.319,70.4,32.396,,23.478,33.38,27.712,33.409,20.507,32.558,31.975,23.676,12.456,14.994,23.242,20.337,30.609,19.966,38.915,13.69,33.596,14.348,37.423,20.842,39.736,13.932,63.903,28.365,20.97,21.893,25.476,30.65,30.257,20.312,13.85,23.496,16.713,24.075,18.339,,34.527,,14.444,12.656,18.938,29.044,,28.209,6.027,25.276,12.4,16.23,8.6,17.939,6.623,12.711,34.81,20.017,10.992,14.725,17.567,,,18.17,16.159,,16.193,14.206,15.7,15.179,13.957,15.382,14.202,15.12,18.556,42.531,20.705,15.602,14.316,19.853,19.298,15.16,16.26,,14.609,15.042,17.262,15.603,15.441,,18.539,18.639,12.29,20.074,17.42,12.013,16.378,,20.736,10.048,16.417,17.386,14.037,28.336,22.274,27.697,11.652,28.59,14.964,21.158,15.574,18.502,9.618,15.739,12.109,26.635,10.318,27.406,18.904,16.759,,22.177,6.796,43.457,27.712,13.779,19.567,11.798,21.493,9.81,30.928,11.524,16.495,,19.742,15.424,9.866,14.682,23.461,14.117,20.345,23.655,14.389,,12.996,21.47,,,,, -2001-01-01,Share of government spending (%),26.149,16.333,21.843,,19.548,12.157,13.077,14.441,14.692,25.214,21.033,15.303,26.605,27.964,34.04,51.201,7.515,52.607,63.588,16.351,6.635,20.012,21.05,11.314,58.271,21.456,32.603,35.169,25.207,15.902,31.073,,24.64,,13.045,13.376,30.784,34.419,10.336,17.393,20.529,23.431,11.523,57.452,31.491,,26.586,31.178,34.221,23.435,20.51,31.672,33.174,23.231,13.271,15.1,23.826,20.984,30.617,20.489,37.466,15.869,31.028,18.564,36.388,18.996,44.114,12.719,61.42,23.658,17.617,23.442,28.526,29.526,29.054,22.555,14.127,23.181,16.425,17.518,16.259,40.144,35.076,,12.597,13.384,19.382,31.02,,29.839,7.423,27.135,10.616,16.1,8.116,18.039,7.224,12.079,34.106,20.266,9.847,16.219,18.13,21.918,,18.049,16.424,13.463,16.505,15.108,18.805,14.948,13.537,15.989,13.673,15.686,18.766,42.626,20.923,17.37,14.446,18.458,19.869,15.166,16.345,,15.227,16.819,17.143,16.733,15.831,,19.04,18.537,12.638,19.552,21.128,13.195,16.663,,20.306,11.768,16.169,17.621,15.292,29.929,24.892,22.433,11.099,38.633,15.61,21.29,17.106,16.515,9.26,15.34,10.859,27.704,12.486,29.545,18.105,15.227,,22.311,7.178,46.292,24.388,11.004,20.57,11.844,22.766,9.479,25.106,13.228,14.365,,20.734,15.692,10.669,13.55,25.218,12.78,17.465,28.322,17.83,,15.166,23.506,,,,, -2002-01-01,Share of government spending (%),26.956,16.021,21.289,25.742,19.444,10.592,10.663,14.068,15.263,26.89,19.912,13.056,29.048,25.413,40.65,46.848,5.295,45.075,63.611,20.856,8.275,20.95,18.95,12.926,73.048,25.271,36.834,41.431,24.58,14.662,39.953,19.372,25.065,,13.697,16.969,32.358,33.408,12.851,15.293,24.116,25.478,8.096,57.039,30.062,,34.463,28.471,34.455,24.642,18.226,33.832,32.714,17.441,14.411,14.707,22.5,21.926,31.068,19.511,37.029,16.045,31.471,20.729,35.028,17.228,45.735,13.819,51.686,23.293,14.896,24.436,30.613,30.065,26.44,25.137,12.563,22.874,15.842,24.005,19.338,41.529,34.931,136.013,11.538,15.325,17.82,24.362,,28.227,7.463,25.237,11.592,15.732,8.135,16.836,7.791,11.849,31.307,21.224,12.74,15.698,17.963,24.006,,17.919,11.81,12.848,16.669,15.615,20.189,15.005,13.833,16.354,13.112,16.078,18.983,48.898,21.273,17.979,13.964,20.687,20.294,13.842,16.846,17.61,15.646,16.839,18.502,16.19,17.737,,20.168,19.464,13.42,19.886,24.086,14.266,16.328,,18.8,12.123,16.973,17.601,15.59,28.962,23.115,23.508,12.343,38.907,15.818,21.481,14.849,18.677,10.882,14.819,11.7,29.695,18.662,30.314,19.408,13.997,,23.145,6.118,42.806,23.737,10.889,20.774,11.901,22.248,9.832,23.219,13.364,14.615,,21.72,16.547,13.333,12.831,25.3,14.687,20.883,56.929,16.808,,17.481,18.229,,,,, -2003-01-01,Share of government spending (%),27.674,16.347,21.321,24.841,20.687,12.306,10.314,14.109,17.86,17.312,22.195,15.497,29.644,35.813,28.482,52.147,7.102,43.233,41.565,14.355,8.474,24.921,18.119,16.624,57.255,21.746,32.365,34.526,25.346,13.424,28.661,21.567,24.265,,13.574,17.471,31.506,33.823,21.777,37.459,28.169,25.173,12.007,57.53,31.129,,33.076,26.121,34.772,26.325,20.78,31.302,32.475,20.656,14.112,16.246,20.096,22.373,32.633,20.159,39.672,15.545,23.083,26.789,34.774,18.139,42.827,13.91,45.197,26.058,12.655,25.76,29.128,27.712,30.309,22.806,15.397,22.85,15.243,25.504,18.831,42.612,34.534,74.964,13.276,15.375,17.052,25.915,,24.407,7.457,23.806,9.523,16.931,8.174,16.335,12.287,12.016,31.027,22.189,13.199,16.303,20.886,22.894,,19.123,12.627,13.254,17.953,17.52,20.132,13.954,13.282,16.599,13.874,16.444,18.928,49.929,21.534,18.134,16.532,20.358,21.453,15.115,16.604,17.435,20.742,16.66,19.271,16.065,17.452,,20.645,19.297,13.052,20.127,20.961,16.883,15.84,,19.415,13.493,17.175,19.709,15.749,30.5,24.64,25.024,13.049,43.99,16.835,21.786,16.451,19.321,11.043,13.622,12.37,25.7,18.405,32.248,18.85,18.164,3.543,23.485,8.426,44.048,24.236,11.514,21.367,11.864,27.927,10.418,24.236,14.299,12.185,,21.487,19.031,13.141,15.073,23.881,14.647,22.459,32.731,17.141,,18.612,16.517,,,,, -2004-01-01,Share of government spending (%),28.205,16.665,21.2,25.87,20.925,12.15,13.311,14.015,20.818,18.873,23.025,13.498,27.803,32.967,43.104,56.177,7.879,40.532,59.326,15.455,9.892,21.955,18.631,15.955,43.794,18.762,36.752,32.557,27.424,14.472,24.215,23.714,23.98,15.525,14.706,19.872,35.58,30.976,25.266,42.009,23.671,25.178,13.024,60.501,30.555,,29.219,30.143,33.703,30.293,20.896,31.389,32.743,23.537,15.482,15.036,21.447,23.167,33.197,21.402,38.986,15.727,25.107,27.184,37.826,21.65,48.677,14.529,46.488,26.836,14.85,27.78,29.094,30.361,31.31,22.649,13.336,20.853,15.558,26.234,19.172,43.149,31.062,65.091,13.428,12.443,16.127,27.893,4.202,23.911,6.892,24.023,8.241,17.289,7.621,16.739,10.639,11.526,25.17,22.585,13.904,16.142,20.082,22.335,,18.079,11.004,13.035,18.914,19.875,19.91,13.99,15.005,16.996,15.03,16.725,19.183,42.91,21.683,16.999,15.923,19.981,21.997,15.831,17.418,18.733,21.798,18.606,16.587,16.667,19.154,,21.283,19.656,13.504,20.712,25.773,16.275,16.067,25.847,20.198,16.803,17.028,19.729,15.792,30.973,23.642,24.812,14.206,56.014,14.822,21.971,16.461,20.219,13.755,14.154,11.888,31.097,17.657,34.293,20.965,16.71,5.747,24.009,7.697,51.057,24.025,13.594,22.374,11.744,26.092,11.05,28.853,20.328,13.065,,22.067,20.328,13.344,15.73,22.857,16.563,21.96,33.362,23.379,13.324,19.121,19.543,,,,, -2005-01-01,Share of government spending (%),28.426,17.057,20.879,25.109,20.537,11.201,10.752,14.465,19.543,25.417,20.757,12.739,30.36,27.032,42.059,52.214,7.764,36.821,48.734,10.621,9.241,25.554,17.916,14.12,41.602,26.276,36.745,35.955,26.109,12.428,28.347,24.664,24.013,15.963,15.28,24.814,36.467,37.794,25.073,38.706,29.54,19.683,12.775,61.201,27.295,,24.923,40.115,34.525,30.568,20.729,31.159,32.668,21.393,15.689,15.292,20.277,23.456,32.711,23.435,40.192,15.534,28.751,26.149,41.016,19.362,46.421,13.372,37.783,31.77,15.13,26.381,29.269,27.756,32.565,22.896,13.639,18.685,14.355,23.612,16.582,42.966,29.398,63.372,13.078,12.292,16.24,24.429,4.584,22.795,7.159,24.023,8.941,15.273,7.395,18.28,8.841,12.144,20.73,22.334,14.737,14.158,20.189,23.929,29.5,18.82,10.052,13.492,17.785,19.807,20.245,13.696,14.966,17.741,14.991,16.85,19.167,37.374,22.023,18.798,16.19,19.883,23.144,16.288,17.652,17.73,25.632,16.983,16.88,16.396,20.58,,21.783,19.862,13.127,20.651,25.75,17.113,16.199,25.479,20.805,16.585,17.235,20.093,15.886,31.065,22.67,23.635,15.24,48.582,14.36,21.862,17.036,20.061,10.521,14.344,14.553,22.762,17.639,32.791,19.255,16.484,9.035,23.881,7.689,55.512,22.861,13.959,22.847,11.83,21.764,11.358,23.471,29.753,14.953,,22.583,23.357,11.882,19.97,24.473,15.193,23.913,33.481,22.015,12.675,18.066,19.461,,,,, -2006-01-01,Share of government spending (%),28.86,16.847,20.511,26.528,20.997,11.459,8.775,14.296,20.635,27.259,22.861,13.465,29.883,33.217,34.93,46.333,6.416,32.938,48.513,8.393,12.896,28.55,20.2,14.873,38.779,23.862,27.356,36.803,29.536,12.506,27.478,27.55,24.719,14.227,16.271,19.591,38.349,39.437,34.569,36.962,25.49,17.682,10.746,62.485,27.878,,23.394,47.196,43.128,29.828,15.802,28.705,33.092,21.717,16.392,15.623,21.111,24.164,32.42,22.276,44.638,15.505,24.714,26.885,37.131,15.784,44.918,13.557,35.984,32.235,13.162,25.057,29.774,29.883,32.952,23.012,15.316,20.738,14.009,26.362,13.153,43.65,28.74,58.039,12.889,14.598,14.018,23.068,4.813,22.154,5.707,23.969,8.072,17.575,6.721,18.878,7.744,13.272,25.954,22.453,14.881,14.797,19.478,19.709,29.25,18.919,8.169,11.807,18.712,20.083,20.078,13.964,14.867,18.4,14.243,17.165,19.642,33.686,22.504,18.305,15.145,19.084,22.395,16.126,17.652,17.163,28.534,16.94,17.305,16.842,20.877,,21.337,19.472,13.054,20.716,26.166,14.978,16.414,25.222,20.053,17.647,17.179,20.369,16.07,31.373,22.963,23.474,15.122,56.279,14.392,22.57,19.225,20.801,12.221,13.635,14.223,22.966,15.998,31.73,18.76,16.838,10.018,24.17,6.815,47.241,21.525,13.482,23.254,13.741,19.921,12.157,32.812,17.762,14.316,,23.229,20.998,12.476,20.663,25.404,17.647,23.138,27.461,21.415,12.271,16.523,20.681,,,,, -2007-01-01,Share of government spending (%),28.922,16.244,19.797,26.36,19.532,10.934,7.801,14.428,22.916,27.154,18.304,14.199,27.548,36.657,25.457,41.47,6.655,30.672,44.54,7.98,10.229,26.137,24.371,16.314,44.267,21.14,39.962,30.795,28.884,15.131,27.938,26.262,24.444,14.632,16.366,18.162,41.09,31.218,21.561,35.07,20.988,15.402,9.763,77.471,28.267,,26.975,46.199,38.611,21.848,16.465,26.512,33.718,19.327,17.968,14.384,21.845,24.521,32.179,23.049,47.132,13.496,25.13,22.135,37.145,18.922,44.527,16.805,32.739,33.069,16.43,24.451,32.384,33.682,35.598,23.805,14.929,24.551,14.068,23.123,16.135,43.163,27.892,46.116,14.111,12.842,14.219,28.965,6.735,22.078,6.406,24.322,7.234,18.19,6.879,16.141,7.028,12.095,28.916,22.194,14.533,14.426,19.477,17.859,24.524,19.358,7.635,11.576,18.813,20.473,18.592,14.262,14.802,18.804,14.77,17.318,19.624,26.889,23.161,17.842,14.448,18.668,21.907,16.661,17.391,11.403,23.423,16.739,16.716,16.469,19.966,,21.603,19.563,13.691,20.766,25.802,14.53,14.864,24.895,22.221,19.729,17.304,20.172,16.533,31.966,27.392,20.893,15.661,39.349,13.782,22.422,18.292,22.569,11.562,13.29,15.073,23.86,14.269,28.028,19.233,16.379,7.444,24.437,6.62,34.08,20.246,14.658,23.486,14.102,20.872,11.86,23.84,18.698,11.545,,22.882,20.022,13.434,20.64,26.118,15.298,30.893,18.855,20.363,11.922,13.843,19.296,,,,, -2008-01-01,Share of government spending (%),28.357,15.091,18.167,25.639,18.598,10.677,6.309,12.291,25.001,22.436,18.535,11.845,22.992,25.501,21.599,33.505,9.266,31.315,42.744,9.194,10.179,26.536,22.823,14.738,40.332,21.922,32.381,32.374,27.961,14.243,26.135,29.585,26.721,15.208,17.354,19.344,34.931,31.091,25.702,33.669,23.366,16.748,14.754,61.096,27.485,,30.353,42.135,30.73,20.619,15.919,26.6,33.765,20.382,20.26,13.038,21.188,24.777,30.928,24.067,47.743,14.069,24.946,15.262,34.613,19.28,45.861,17.409,33.52,32.578,15.89,20.549,32.759,29.983,39.292,22.859,17.546,22.881,13.712,23.153,13.716,40.944,30.773,49.033,13.548,11.061,13.663,25.556,5.302,24.995,4.763,22.775,5.47,17.122,6.862,14.239,6.955,11.136,27.512,21.817,13.342,13.969,17.366,19.263,29.86,19.502,6.167,8.822,18.897,19.608,18.781,15.737,15.489,18.868,14.492,17.428,19.703,26.577,23.193,17.362,14.542,13.163,21.959,16.545,17.839,11.266,23.401,15.364,16.976,16.429,18.676,,21.73,19.908,14.434,21.136,26.385,14.24,15.319,24.782,22.182,18.804,17.434,20.226,16.75,31.827,29.104,19.41,15.26,54.35,11.668,22.142,17.763,18.361,8.721,12.251,13.14,32.251,16.236,28.509,20.197,17.908,5.692,24.007,6.905,42.914,17.314,14.087,23.717,17.012,17.237,11.17,24.586,20.216,12.11,,23.646,21.26,10.809,21.601,27.119,16.388,23.194,15.831,25.272,12.017,11.287,18.963,,,,, -2009-01-01,Share of government spending (%),27.725,15.786,18.068,28.142,18.395,12.196,8.538,12.138,23.614,27.246,16.622,11.615,23.807,30.121,18.401,36.063,8.768,31.07,36.458,4.628,12.296,25.797,27.172,16.974,31.102,25.048,22.04,33.719,25.992,13.542,35.31,29.109,22.91,15.842,16.582,19.679,28.314,30.182,23.201,34.966,13.853,18.19,12.098,63.507,26.88,,27.542,49.236,25.86,24.861,11.534,27.389,32.936,21.367,19.428,14.446,22.673,24.687,29.029,23.65,46.655,13.83,29.316,17.288,34.046,19.713,44.959,17.156,30.323,31.73,13.009,22.054,33.8,30.821,36.335,23.254,16.851,21.355,13.203,20.726,14.813,39.135,29.11,46.38,16.878,10.36,13.462,33.771,6.394,26.708,6.415,21.839,5.944,18.762,7.399,14.523,6.542,11.575,34.097,21.942,11.572,16.999,17.527,20.356,29.572,18.887,7.575,10.425,18.875,18.408,19.531,15.434,16.342,18.88,14.282,16.938,19.75,27.465,23.315,17.393,14.285,16.379,22.449,16.639,17.514,14.909,21.2,14.381,16.851,16.278,19.292,,21.235,19.811,14.635,20.172,30.191,14.536,14.623,25.104,21.849,17.898,17.303,19.7,17.085,31.959,24.681,19.452,14.501,35.9,13.59,22.623,17.457,20.644,8.387,12.425,15.407,27.286,16.571,22.978,19.307,17.037,5.998,23.335,6.869,37.174,16.954,13.5,23.158,17.05,17.226,10.557,22.957,19.746,12.579,18.023,24.083,24.312,9.449,21.68,28.416,16.309,20.489,16.454,16.416,12.267,11.799,16.693,,,,, -2010-01-01,Share of government spending (%),28.286,15.859,17.698,26.542,18.473,13.223,6.841,14.006,24.196,27.608,21.293,11.429,23.557,20.667,16.671,37.626,8.052,30.527,24.247,5.833,11.3,27.953,29.575,10.721,28.304,21.247,16.712,33.755,25.012,15.109,37.873,26.237,23.092,15.219,18.793,19.883,29.065,34.706,19.868,33.923,13.708,18.562,13.967,54.119,27.558,,28.779,44.145,26.377,20.587,23.829,28.315,34.26,20.089,19.178,16.516,20.093,24.85,29.061,23.299,43.885,12.971,31.164,17.636,34.794,19.485,42.334,17.636,35.993,32.972,15.701,20.73,34.133,30.102,37.014,22.505,15.619,19.426,13.857,22.344,16.703,40.741,28.75,41.199,12.623,11.487,13.245,38.706,6.516,25.515,5.987,25.517,6.197,18.874,8.095,13.265,5.845,11.05,29.152,23.374,12.034,17.082,21.231,27.336,35.249,19.345,7.791,12.764,18.936,18.513,20.532,15.589,15.758,18.717,15.7,16.96,19.735,28.871,23.049,18.121,15.259,17.136,16.217,17.288,17.858,12.176,18.73,14.29,16.54,15.88,20.0,,21.45,19.918,13.987,19.331,29.713,15.067,14.001,25.7,22.23,18.192,17.07,19.809,16.844,31.892,21.944,20.651,13.999,36.222,13.86,22.312,20.069,21.583,7.841,11.921,16.527,25.572,13.741,26.506,19.375,15.675,5.334,23.689,6.297,33.065,16.859,13.764,24.011,11.425,12.997,11.896,23.464,19.463,11.843,17.14,22.487,24.141,11.458,22.515,31.765,17.541,30.499,11.189,16.965,16.599,12.446,19.811,,,,, -2011-01-01,Share of government spending (%),29.083,15.888,17.349,26.16,19.53,12.793,7.073,15.684,22.747,23.87,21.023,12.935,21.589,25.962,17.482,40.115,6.287,33.318,23.33,5.651,15.939,33.484,24.517,11.587,26.413,24.034,23.623,35.905,25.858,15.793,36.861,31.313,19.526,14.521,17.901,17.031,25.556,31.79,19.198,32.141,12.945,18.124,13.21,61.762,28.311,,24.101,50.826,26.569,17.721,22.81,26.985,31.155,21.897,19.417,14.631,20.162,25.034,29.71,22.428,46.679,15.389,31.592,16.411,35.118,20.505,41.159,17.744,41.841,33.93,16.12,19.912,31.655,29.184,36.732,22.963,17.061,19.149,14.405,20.95,16.059,41.61,30.063,39.03,12.326,13.347,14.263,36.093,6.436,22.859,5.973,28.374,10.142,17.195,6.482,12.442,5.614,11.302,30.8,21.956,11.774,15.984,21.158,26.5,37.557,19.701,7.252,12.097,18.739,19.772,22.227,15.286,16.041,18.443,15.55,17.191,19.87,28.838,23.826,16.679,15.249,16.232,22.502,17.345,17.843,12.256,19.02,14.351,15.652,14.341,20.752,17.599,22.098,20.189,14.154,19.453,27.936,12.794,14.416,32.475,21.889,17.649,16.785,19.864,21.373,32.141,24.397,20.464,14.048,33.494,14.915,22.852,22.25,20.497,8.372,11.745,16.876,25.343,13.771,27.238,18.723,16.804,5.15,24.026,6.275,36.435,16.014,12.429,27.152,9.81,9.632,12.236,23.446,20.062,9.454,21.913,22.653,24.563,11.652,23.477,31.507,15.989,32.261,12.992,11.695,17.864,14.319,21.734,,,,, -2012-01-01,Share of government spending (%),29.626,15.944,17.284,25.078,19.148,13.796,6.439,16.564,20.305,22.711,23.985,14.8,22.918,27.026,16.149,34.815,6.229,27.428,24.032,3.59,11.221,28.994,27.268,10.109,22.327,18.237,17.484,45.795,22.708,15.861,33.194,32.088,24.159,12.297,18.718,18.284,26.445,25.883,22.639,32.978,14.018,18.575,14.849,52.085,27.969,,24.3,46.567,25.631,17.987,25.992,26.689,32.306,22.425,19.662,14.579,20.06,25.692,30.401,23.188,44.271,15.807,25.097,17.004,31.43,22.22,42.917,16.974,33.858,32.845,16.078,20.08,31.092,28.59,34.954,23.331,18.028,17.948,16.901,16.075,15.695,43.313,29.024,31.553,12.698,12.454,15.275,46.513,6.273,21.226,6.011,23.17,,16.583,5.895,11.436,5.642,12.095,34.513,22.187,11.754,14.346,21.583,19.909,40.752,19.915,8.093,13.487,18.555,20.224,23.184,15.603,15.621,18.155,14.863,17.291,19.783,28.318,24.163,16.618,15.088,17.14,24.982,17.6,17.362,13.861,20.968,14.578,17.854,12.661,20.15,18.149,22.805,20.57,14.426,19.747,27.146,13.473,14.506,30.016,20.669,18.332,17.658,18.504,21.511,32.644,24.37,19.89,13.014,32.571,14.532,22.845,23.186,20.127,9.282,12.167,15.472,29.137,13.452,26.781,19.097,16.615,5.406,24.051,5.972,33.493,16.215,12.804,27.62,9.417,8.4,12.131,24.582,18.848,10.699,19.255,24.432,26.404,11.897,23.061,31.183,14.84,33.623,13.004,16.494,17.816,16.093,21.315,,,,, -2013-01-01,Share of government spending (%),30.132,16.642,17.397,26.393,18.84,16.469,7.376,18.668,22.024,24.554,19.193,15.631,18.904,35.574,17.831,34.418,4.585,23.445,27.975,6.407,15.115,26.151,22.951,8.193,22.783,21.295,18.569,56.698,21.226,16.29,29.436,39.706,20.062,14.262,19.154,19.065,23.662,21.842,24.183,25.894,25.163,19.854,11.932,73.895,28.029,,23.367,43.469,24.726,19.526,23.717,26.011,30.711,21.292,18.409,14.506,20.674,26.062,32.343,23.392,41.049,15.636,27.788,15.376,31.77,20.35,41.245,17.76,25.888,28.663,17.952,20.914,31.561,28.119,34.331,22.083,16.963,20.283,14.383,16.699,15.323,44.608,28.045,35.256,12.974,10.882,14.203,41.688,5.843,21.326,6.522,24.444,,17.27,6.376,12.308,7.338,12.57,45.453,21.151,11.847,16.108,21.486,21.365,43.382,19.915,8.038,13.955,18.798,21.222,20.135,16.455,18.107,18.504,15.659,17.258,19.929,29.084,24.471,16.225,14.451,17.786,25.381,17.5,17.223,13.443,21.463,14.489,17.687,12.696,21.048,18.482,23.0,20.422,14.926,18.839,26.765,15.29,14.663,27.953,22.009,17.647,14.503,19.54,21.546,32.433,23.464,21.215,12.88,30.522,14.429,23.6,22.67,18.993,10.304,14.096,15.038,30.215,14.346,29.88,22.238,16.015,8.876,24.447,5.652,33.248,16.506,12.768,27.527,11.143,9.901,12.645,24.192,20.298,12.719,14.856,24.727,30.037,10.856,23.98,31.389,20.232,33.479,12.609,11.61,17.923,19.174,20.753,,,,, -2014-01-01,Share of government spending (%),30.74,16.684,17.559,25.898,19.923,15.857,6.677,16.149,23.893,25.338,18.752,17.474,18.88,25.341,19.443,36.058,4.063,24.524,21.518,6.94,18.576,22.609,23.071,10.662,16.079,19.157,23.694,43.421,20.972,18.21,35.272,37.746,22.388,14.509,23.359,15.706,20.121,18.841,25.052,25.42,22.13,19.003,14.023,111.803,26.845,,22.395,39.34,23.223,15.74,25.534,24.892,31.599,21.122,19.47,13.631,21.165,26.734,32.875,22.985,41.025,15.762,28.221,15.539,31.144,16.64,43.311,17.09,30.9,28.637,18.987,19.865,32.444,30.808,36.893,22.012,16.369,20.229,13.73,16.622,14.869,45.704,27.629,37.512,15.529,10.21,14.087,44.865,6.387,20.262,6.585,26.091,,17.656,7.575,13.756,7.498,13.0,42.014,23.297,10.958,17.429,20.302,21.551,42.426,19.815,9.284,13.873,19.02,20.51,20.72,17.194,17.824,18.67,16.847,17.078,20.16,28.185,24.879,15.556,14.08,17.956,25.38,18.4,17.437,13.992,19.107,14.454,18.208,12.879,22.748,18.095,23.342,20.526,14.978,18.076,25.853,14.895,14.832,35.751,20.635,15.914,16.722,20.041,22.038,33.347,24.198,19.833,13.081,32.319,16.058,24.021,17.82,19.4,11.272,13.804,15.932,27.209,18.478,30.606,20.196,16.731,6.852,26.881,5.616,30.857,16.538,11.583,27.948,8.789,9.199,14.294,26.128,21.616,13.097,13.724,25.129,30.18,12.093,21.363,32.769,17.738,30.32,13.799,15.897,15.41,15.616,20.271,,,,, -2015-01-01,Share of government spending (%),31.472,17.022,17.071,27.969,21.172,15.098,9.633,15.372,25.207,27.151,14.761,15.338,17.914,36.053,24.667,24.14,5.95,19.511,23.034,7.013,14.158,20.551,22.066,11.942,16.223,24.394,26.768,37.819,19.996,17.349,38.162,33.958,19.636,14.319,22.695,20.549,22.854,22.062,32.417,25.012,15.612,19.078,14.185,98.426,26.697,,21.222,33.553,21.28,16.042,19.766,24.729,28.927,19.231,16.67,14.691,20.661,26.847,33.368,24.054,40.564,15.436,28.308,18.628,32.307,18.396,47.737,18.503,39.813,28.76,20.262,20.813,31.428,32.503,32.712,22.229,17.474,19.329,14.912,19.927,16.142,46.832,29.124,38.946,13.636,7.393,16.189,44.438,7.234,22.824,7.747,27.818,,17.965,9.156,14.143,9.565,14.698,58.713,22.753,12.725,21.888,21.08,21.303,38.425,20.318,10.617,14.521,20.056,21.648,19.806,17.268,17.161,18.97,16.802,17.074,20.143,27.013,25.337,16.067,13.605,18.562,25.165,18.746,17.602,13.295,18.773,15.116,18.867,12.588,23.291,19.454,23.442,20.891,15.344,19.328,26.823,14.469,15.014,32.778,20.661,14.841,17.447,20.709,22.327,34.301,21.642,19.683,12.402,36.377,18.066,24.391,19.278,19.753,12.617,13.288,16.731,25.698,22.628,30.935,19.112,17.564,7.844,27.558,6.172,30.556,15.651,11.16,28.823,7.85,9.517,15.469,27.403,22.377,13.573,16.42,25.289,31.903,7.961,21.617,33.705,18.131,28.754,12.083,11.943,11.629,9.802,18.886,,,,, -2016-01-01,Share of government spending (%),31.918,17.158,16.767,29.715,21.814,15.734,12.308,16.853,27.527,31.768,16.012,16.349,17.805,44.922,35.158,24.61,6.685,18.89,30.16,11.304,11.294,19.692,20.099,14.224,16.494,17.045,33.446,40.597,18.759,16.161,38.81,39.132,16.954,14.861,23.128,25.072,22.323,23.409,37.372,27.68,19.85,17.761,13.741,70.805,27.014,,28.619,33.027,23.438,18.713,20.782,21.68,29.147,19.708,17.584,17.114,20.685,27.073,33.736,25.109,38.94,11.196,26.962,18.145,31.735,18.876,48.307,15.957,45.144,28.155,19.945,20.303,30.088,33.288,34.31,23.679,20.369,21.31,15.281,22.144,20.294,47.235,29.117,42.166,13.894,8.394,16.387,45.914,7.713,25.183,8.759,28.016,,17.835,9.359,14.511,9.175,18.066,54.968,22.998,10.226,,22.876,20.538,36.794,20.675,11.4,14.528,20.262,22.046,22.795,17.836,17.878,19.535,17.013,16.853,20.261,28.184,25.325,16.917,14.932,17.437,26.499,18.812,17.778,15.909,16.475,16.979,19.933,12.664,24.651,18.167,24.022,20.89,15.897,20.952,25.02,15.969,14.458,36.817,20.231,16.668,18.333,21.071,22.258,35.233,17.985,20.508,12.297,46.901,18.5,24.749,20.233,20.596,10.956,12.868,17.96,27.406,21.822,28.604,19.862,18.765,6.188,27.964,6.476,28.963,15.409,10.435,28.63,7.342,11.308,16.191,27.508,21.268,10.746,11.506,25.79,31.586,11.169,20.708,35.481,17.679,28.083,11.371,12.955,11.502,8.083,20.326,,,,, -2017-01-01,Share of government spending (%),32.185,16.348,17.189,28.66,21.485,15.518,11.591,18.921,23.074,30.219,14.642,16.687,17.67,48.105,30.626,27.948,8.89,17.93,40.017,14.747,8.711,19.644,19.2,15.351,14.201,18.659,22.571,38.659,15.837,19.725,32.42,36.129,16.03,16.334,23.162,26.962,22.906,28.582,31.255,25.466,23.383,18.535,13.881,40.12,26.715,24.949,39.443,24.553,24.635,17.621,20.668,25.394,28.851,20.021,16.91,16.815,22.185,26.849,35.659,26.189,36.6,9.81,26.332,19.567,30.338,20.601,48.019,16.42,44.83,26.088,21.106,21.232,30.551,33.501,33.943,23.145,19.54,20.0,14.874,19.569,21.367,47.309,29.323,45.51,13.787,8.764,17.5,45.299,11.953,27.68,8.945,25.527,,17.94,10.028,14.545,9.911,18.808,46.23,21.537,14.247,,22.447,20.651,39.816,21.063,10.509,14.753,20.664,22.056,23.404,18.216,18.935,19.977,16.815,17.017,20.101,25.578,25.635,16.775,14.426,18.603,27.245,18.734,17.796,12.672,16.709,16.349,19.984,12.441,25.339,16.947,24.26,20.781,15.895,20.512,23.009,16.728,15.386,33.153,20.509,17.109,18.572,21.651,22.357,35.849,20.287,20.272,12.532,40.863,17.848,24.722,21.644,19.348,10.178,11.192,17.535,30.139,24.465,19.978,18.625,18.187,7.798,28.087,6.207,25.598,15.523,11.661,29.047,9.73,11.586,16.852,22.424,19.128,12.256,11.256,25.554,34.344,12.14,20.354,36.19,16.637,31.661,11.108,12.236,14.806,7.44,21.89,,,,, -2018-01-01,Share of government spending (%),32.125,15.868,17.129,26.362,20.546,15.329,12.58,16.829,20.666,28.439,14.998,16.795,20.163,62.451,34.235,25.581,9.872,17.606,29.684,16.034,15.084,20.652,20.521,16.067,16.059,16.273,23.315,37.91,16.764,20.294,29.759,35.465,18.38,17.8,23.219,25.805,22.892,25.064,24.109,25.411,22.455,19.651,13.998,38.816,26.713,19.296,32.32,24.848,25.063,18.234,21.764,24.388,31.412,22.077,17.79,17.803,22.353,26.673,36.016,22.002,38.418,9.274,25.233,20.481,30.537,20.481,46.307,17.801,37.424,27.635,20.011,20.978,30.767,34.301,32.748,24.253,13.666,19.056,15.393,25.574,22.029,46.795,29.333,49.103,12.114,8.726,16.587,49.079,12.85,25.834,10.016,24.986,,17.869,8.389,14.803,11.259,15.717,26.506,20.697,15.355,,22.903,20.706,41.603,21.225,10.717,14.605,20.643,21.674,21.359,16.035,18.403,19.976,17.038,16.945,20.15,26.165,25.869,16.744,14.249,19.108,27.094,18.498,17.94,14.952,15.155,16.257,19.699,12.482,23.916,17.685,24.157,20.884,15.234,21.768,21.275,17.391,16.416,34.598,20.968,16.805,19.041,21.517,22.426,36.348,22.716,21.334,11.915,49.513,17.94,25.126,20.362,17.885,9.684,10.857,17.176,22.875,23.298,16.174,20.759,18.352,7.485,27.983,7.505,26.659,15.53,11.175,29.233,9.221,10.744,16.489,25.476,21.014,13.376,12.263,25.342,29.329,11.291,18.906,37.011,15.884,29.075,11.587,12.106,14.383,9.977,24.545,,,,, -2019-01-01,Share of government spending (%),32.021,15.72,17.202,25.273,20.307,14.909,13.017,16.808,22.904,22.731,15.893,16.217,19.564,46.278,31.225,25.671,11.65,19.056,27.654,18.12,13.366,19.785,21.063,15.904,13.306,15.079,27.298,43.024,17.905,21.315,24.59,26.597,16.768,18.755,21.688,26.657,22.515,26.28,23.841,22.464,23.707,18.582,14.202,41.585,26.161,12.783,35.173,20.764,23.308,17.838,19.336,25.122,29.373,23.677,18.017,19.098,22.668,26.951,35.374,24.686,33.225,11.739,25.553,21.067,31.266,22.788,45.937,17.53,42.333,28.397,20.415,20.985,30.792,38.028,31.186,24.489,13.597,17.447,14.614,21.598,22.271,46.35,30.223,52.971,11.786,8.877,17.1,42.339,12.142,25.202,10.105,25.51,,18.242,9.816,14.884,10.824,,24.822,18.475,15.083,,,20.694,45.698,21.569,12.525,15.692,20.547,22.362,19.773,18.109,18.52,20.441,17.302,17.195,20.051,22.999,25.998,17.17,13.635,19.674,27.502,19.203,17.858,13.766,13.796,17.597,20.702,12.683,25.619,18.944,24.524,20.792,15.433,22.411,20.312,17.154,16.679,37.228,20.618,17.072,19.684,21.595,22.518,35.796,24.102,22.501,12.223,49.055,17.093,25.818,19.906,16.659,13.919,10.949,17.782,22.79,23.097,16.26,17.76,17.773,7.27,26.048,6.765,28.955,15.666,12.725,28.858,8.624,13.873,16.287,22.868,20.727,13.501,10.265,24.74,35.875,11.208,19.217,36.1,17.684,31.422,12.835,12.333,18.516,8.324,25.107,,,,, -2020-01-01,Share of government spending (%),29.778,14.932,17.383,26.108,19.99,15.097,12.754,16.071,26.8,22.08,13.578,16.26,22.713,37.434,28.329,28.495,19.034,16.232,39.048,23.613,11.384,19.09,24.058,17.302,10.492,12.39,25.628,32.534,17.369,21.427,23.729,23.908,16.497,17.352,19.547,22.966,21.52,27.711,27.983,22.203,21.242,19.392,12.115,34.037,24.617,19.061,25.799,18.491,21.945,16.484,20.984,23.739,25.758,21.504,16.18,20.689,21.532,24.517,33.405,26.806,35.057,8.685,22.361,23.2,29.864,21.603,41.445,18.035,33.52,32.26,20.572,21.787,29.728,33.755,29.31,23.401,15.636,20.64,14.546,22.857,20.694,41.65,27.909,55.602,12.199,8.563,16.166,39.626,11.263,23.904,9.482,45.372,,16.593,11.351,13.729,12.055,,28.055,18.373,18.11,,,20.636,39.939,20.131,11.413,16.838,18.658,21.379,22.434,17.905,19.518,19.713,16.895,16.819,19.784,22.064,25.154,15.921,14.154,18.739,25.972,18.32,16.862,15.436,15.427,17.602,17.874,12.235,23.537,21.016,23.796,19.826,13.468,21.38,19.094,16.306,19.277,14.688,18.106,15.925,18.438,20.697,22.303,32.352,28.039,21.241,13.588,49.105,16.584,24.483,23.384,17.062,13.198,9.514,18.393,22.719,21.361,18.864,18.539,16.959,11.922,25.025,7.203,26.849,15.8,11.199,24.427,9.335,14.51,16.443,19.353,20.529,13.319,8.938,24.079,31.216,11.117,19.708,33.199,16.217,24.29,13.342,13.801,18.331,9.026,21.811,,,,, diff --git a/scripts/charts/common.py b/scripts/charts/common.py index 38310aa..c0d8621 100644 --- a/scripts/charts/common.py +++ b/scripts/charts/common.py @@ -523,7 +523,9 @@ def _data_as_share( # Calculate % of GDP by income share_income = share_callable_group( - data=usd_constant_data, group_by=group_by, threshold=threshold + data=usd_constant_data, + group_by=group_by + additional_group_by, + threshold=threshold, ) # identify Africa data diff --git a/scripts/charts/section1.py b/scripts/charts/section1.py index d95dab9..c1147fd 100644 --- a/scripts/charts/section1.py +++ b/scripts/charts/section1.py @@ -54,14 +54,18 @@ def clean_chart(data: pd.DataFrame) -> pd.DataFrame: ) -def spending_share_of_government(usd_constant_data: pd.DataFrame) -> pd.DataFrame: +def spending_share_of_government( + usd_constant_data: pd.DataFrame, additional_grouper: list | None = None +) -> pd.DataFrame: """Calculate spending as a share of government spending for countries and groups""" - + if additional_grouper is None: + additional_grouper = [] return _data_as_share( usd_constant_data=usd_constant_data, share_callable=value2gov_spending_share, share_callable_group=value2gov_spending_share_group, group_by=["income_group", "year"], + additional_group_by=additional_grouper, indicator_name="Share of government spending (%)", ) @@ -93,17 +97,11 @@ def chart1_1_pipeline() -> None: usd_constant_data=total_spending_usd_constant, group_by=["income_group", "year"] ) - # ---- Share of Government spending ----------------------> - - combined_govx = spending_share_of_government( - usd_constant_data=total_spending_usd_constant - ) - # ---- Combine all --------------------------> # Combine the different views of the data df = pd.concat( - [combined_pc, combined_total, combined_gdp, combined_govx], + [combined_pc, combined_total, combined_gdp], ignore_index=True, ) diff --git a/scripts/charts/section3.py b/scripts/charts/section3.py index f8b0a60..2507a09 100644 --- a/scripts/charts/section3.py +++ b/scripts/charts/section3.py @@ -14,6 +14,7 @@ spending_share_of_gdp, total_usd_spending, ) +from scripts.charts.section1 import spending_share_of_government from scripts.config import PATHS # Load a dictionary with dataframes for the different versions of "health_spending_by_source" data @@ -258,6 +259,43 @@ def create_tooltip_3_1(df: pd.DataFrame) -> pd.DataFrame: return df.filter(["Country", "year", "tooltip"], axis=1) +def create_tooltip_1_2(df: pd.DataFrame) -> pd.DataFrame: + """Create the text for the tooltips to be used on the chart""" + + # Get only total spending (as a DataFrame copy) + df = ( + df.query( + "source == 'domestic general government' and " + "indicator != 'Share of government spending (%)'" + ) + .copy(deep=True) + .melt(id_vars=["year", "source", "indicator"], var_name="Country") + .pivot(index=["year", "source", "entity"], columns="indicator", values="value") + .reset_index() + ) + + # For every column, replace any NaNs with a dash and format the numbers + for column in [ + "Per capita spending ($US)", + "Share of GDP (%)", + ]: + df[column] = format_number(df[column], as_units=True, decimals=1).replace( + "nan", "-" + ) + + # Create the tooltip text + df["tooltip"] = ( + "Per person: US$ " + + df["Per capita spending ($US)"] + + "
" + + "As a share of GDP: " + + df["Share of GDP (%)"] + + "%
" + ) + # Return a dataframe with country, year and tooltip + return df.filter(["Country", "year", "tooltip"], axis=1) + + def chart_3_1(): """Pipeline to create the chart""" @@ -287,7 +325,7 @@ def chart_3_1(): # ---- Share of GDP ----------------------> combined_gdp = spending_share_of_gdp( usd_constant_data=total_spending, - group_by=["income_group", "year", "source"], + group_by=["income_group", "year"], additional_group_by=["source"], threshold=0.5, ) @@ -331,5 +369,39 @@ def chart_3_1(): share_df.to_csv(PATHS.output / "section3_chart1.csv", index=False) +def chart1_2_pipeline() -> None: + # Get total spending in constant USD + total_spending = get_spending(version="usd_constant") + + # # ---- Per capita spending ----------------------> + # combined_pc = per_capita_spending( + # spending_version_callable=get_spending, + # usd_constant_data=total_spending, + # additional_grouper=["source"], + # threshold=0.5, + # ) + # + # # ---- Share of GDP ----------------------> + # combined_gdp = spending_share_of_gdp( + # usd_constant_data=total_spending, + # group_by=["income_group", "year"], + # additional_group_by=["source"], + # threshold=0.5, + # ) + # # ---- Share of Government spending ----------------------> + + combined_govx = spending_share_of_government( + usd_constant_data=total_spending, additional_grouper=["source"] + ) + + data = pd.concat([combined_govx], ignore_index=True) + + data = data.query("source == 'domestic general government'") + + data.to_csv(PATHS.output / "section1_chart2.csv", index=False) + + if __name__ == "__main__": chart_3_1() + chart1_2_pipeline() +