From 7e6277f292c7e479963441c1be4b45328839a213 Mon Sep 17 00:00:00 2001 From: nikhilwoodruff <35577657+nikhilwoodruff@users.noreply.github.com> Date: Tue, 5 Dec 2023 12:52:42 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20=20@=206f131?= =?UTF-8?q?13a391109c434bf0385b478e7e9a3fd0a55=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _sources/model/validation.ipynb | 1778 ++++++++++++++++- examples/income-sources.html | 4 +- index.html | 80 +- model/validation.html | 39 +- programs/contrib/ubi-center/carbon-tax.html | 4 +- programs/gov/dcms/bbc/tv-licence.html | 164 +- programs/gov/dwp/pension-credit.html | 28 +- programs/gov/dwp/universal-credit.html | 14 +- programs/gov/hmrc/child-benefit.html | 180 +- programs/gov/hmrc/fuel-duty.html | 4 +- programs/gov/hmrc/income-tax.html | 74 +- programs/gov/hmrc/national-insurance.html | 8 +- programs/gov/hmrc/stamp-duty.html | 12 +- .../gov/ofgem/energy-price-guarantee.html | 8 +- .../land-and-buildings-transaction-tax.html | 8 +- programs/gov/wra/land-transaction-tax.html | 4 +- reports/model/validation.err.log | 37 +- searchindex.js | 2 +- usage/getting-started.html | 28 +- 19 files changed, 2144 insertions(+), 332 deletions(-) diff --git a/_sources/model/validation.ipynb b/_sources/model/validation.ipynb index cd7e9098b..2c7e9223e 100644 --- a/_sources/model/validation.ipynb +++ b/_sources/model/validation.ipynb @@ -12,14 +12,1782 @@ }, { "cell_type": "code", - "execution_count": 25, + "execution_count": 3, "id": "afa12877", "metadata": { "tags": [ "hide-input" ] }, - "outputs": [], + "outputs": [ + { + "data": { + "application/vnd.plotly.v1+json": { + "config": { + "plotlyServerURL": "https://plot.ly" + }, + "data": [ + { + "alignmentgroup": "True", + "customdata": [ + [ + "UKMOD estimates aggregate Tax Credits
to be £4.0 billion
in 2023." + ], + [ + "UKMOD estimates aggregate Pension Credit
to be £4.8 billion
in 2023." + ], + [ + "UKMOD estimates aggregate Housing Benefit
to be £9.0 billion
in 2023." + ], + [ + "UKMOD estimates aggregate Child Benefit
to be £11.4 billion
in 2023." + ], + [ + "UKMOD estimates aggregate Universal Credit
to be £43.7 billion
in 2023." + ], + [ + "UKMOD estimates aggregate National Insurance
to be £170.9 billion
in 2023." + ], + [ + "UKMOD estimates aggregate Income Tax
to be £235.8 billion
in 2023." + ] + ], + "hovertemplate": "%{customdata[0]}", + "legendgroup": "UKMOD", + "marker": { + "color": "#D8E6F3", + "pattern": { + "shape": "" + } + }, + "name": "UKMOD", + "offsetgroup": "UKMOD", + "orientation": "h", + "showlegend": true, + "textposition": "auto", + "type": "bar", + "x": [ + 4.034, + 4.768, + 8.969, + 11.357, + 43.736, + 170.93200000000002, + 235.819 + ], + "xaxis": "x", + "y": [ + "Tax Credits", + "Pension Credit", + "Housing Benefit", + "Child Benefit", + "Universal Credit", + "National Insurance", + "Income Tax" + ], + "yaxis": "y" + }, + { + "alignmentgroup": "True", + "customdata": [ + [ + "Official estimates aggregate Pension Credit
to be £5.4 billion
in 2023." + ], + [ + "Official estimates aggregate Tax Credits
to be £6.9 billion
in 2023." + ], + [ + "Official estimates aggregate Child Benefit
to be £12.2 billion
in 2023." + ], + [ + "Official estimates aggregate Housing Benefit
to be £14.8 billion
in 2023." + ], + [ + "Official estimates aggregate Universal Credit
to be £49.8 billion
in 2023." + ], + [ + "Official estimates aggregate National Insurance
to be £168.1 billion
in 2023." + ], + [ + "Official estimates aggregate Income Tax
to be £240.5 billion
in 2023." + ] + ], + "hovertemplate": "%{customdata[0]}", + "legendgroup": "Official", + "marker": { + "color": "#808080", + "pattern": { + "shape": "" + } + }, + "name": "Official", + "offsetgroup": "Official", + "orientation": "h", + "showlegend": true, + "textposition": "auto", + "type": "bar", + "x": [ + 5.437, + 6.939, + 12.169, + 14.777, + 49.751, + 168.062899371, + 240.5370069 + ], + "xaxis": "x", + "y": [ + "Pension Credit", + "Tax Credits", + "Child Benefit", + "Housing Benefit", + "Universal Credit", + "National Insurance", + "Income Tax" + ], + "yaxis": "y" + }, + { + "alignmentgroup": "True", + "customdata": [ + [ + "PolicyEngine estimates aggregate Pension Credit
to be £5.7 billion
in 2023." + ], + [ + "PolicyEngine estimates aggregate Tax Credits
to be £7.9 billion
in 2023." + ], + [ + "PolicyEngine estimates aggregate Child Benefit
to be £12.2 billion
in 2023." + ], + [ + "PolicyEngine estimates aggregate Housing Benefit
to be £14.6 billion
in 2023." + ], + [ + "PolicyEngine estimates aggregate Universal Credit
to be £48.5 billion
in 2023." + ], + [ + "PolicyEngine estimates aggregate National Insurance
to be £164.7 billion
in 2023." + ], + [ + "PolicyEngine estimates aggregate Income Tax
to be £211.2 billion
in 2023." + ] + ], + "hovertemplate": "%{customdata[0]}", + "legendgroup": "PolicyEngine", + "marker": { + "color": "#17354F", + "pattern": { + "shape": "" + } + }, + "name": "PolicyEngine", + "offsetgroup": "PolicyEngine", + "orientation": "h", + "showlegend": true, + "textposition": "auto", + "type": "bar", + "x": [ + 5.716800014103888, + 7.8837541849403, + 12.168675106094156, + 14.564548934461316, + 48.475609170684386, + 164.69818933192443, + 211.1923993499099 + ], + "xaxis": "x", + "y": [ + "Pension Credit", + "Tax Credits", + "Child Benefit", + "Housing Benefit", + "Universal Credit", + "National Insurance", + "Income Tax" + ], + "yaxis": "y" + } + ], + "frames": [ + { + "data": [ + { + "alignmentgroup": "True", + "customdata": [ + [ + "UKMOD estimates aggregate Tax Credits
to be £4.0 billion
in 2023." + ], + [ + "UKMOD estimates aggregate Pension Credit
to be £4.8 billion
in 2023." + ], + [ + "UKMOD estimates aggregate Housing Benefit
to be £9.0 billion
in 2023." + ], + [ + "UKMOD estimates aggregate Child Benefit
to be £11.4 billion
in 2023." + ], + [ + "UKMOD estimates aggregate Universal Credit
to be £43.7 billion
in 2023." + ], + [ + "UKMOD estimates aggregate National Insurance
to be £170.9 billion
in 2023." + ], + [ + "UKMOD estimates aggregate Income Tax
to be £235.8 billion
in 2023." + ] + ], + "hovertemplate": "model=UKMOD
year=2023
value=%{x}
variable=%{y}", + "legendgroup": "UKMOD", + "marker": { + "color": "#D8E6F3", + "pattern": { + "shape": "" + } + }, + "name": "UKMOD", + "offsetgroup": "UKMOD", + "orientation": "h", + "showlegend": true, + "textposition": "auto", + "type": "bar", + "x": [ + 4.034, + 4.768, + 8.969, + 11.357, + 43.736, + 170.93200000000002, + 235.819 + ], + "xaxis": "x", + "y": [ + "Tax Credits", + "Pension Credit", + "Housing Benefit", + "Child Benefit", + "Universal Credit", + "National Insurance", + "Income Tax" + ], + "yaxis": "y" + }, + { + "alignmentgroup": "True", + "customdata": [ + [ + "Official estimates aggregate Pension Credit
to be £5.4 billion
in 2023." + ], + [ + "Official estimates aggregate Tax Credits
to be £6.9 billion
in 2023." + ], + [ + "Official estimates aggregate Child Benefit
to be £12.2 billion
in 2023." + ], + [ + "Official estimates aggregate Housing Benefit
to be £14.8 billion
in 2023." + ], + [ + "Official estimates aggregate Universal Credit
to be £49.8 billion
in 2023." + ], + [ + "Official estimates aggregate National Insurance
to be £168.1 billion
in 2023." + ], + [ + "Official estimates aggregate Income Tax
to be £240.5 billion
in 2023." + ] + ], + "hovertemplate": "model=Official
year=2023
value=%{x}
variable=%{y}", + "legendgroup": "Official", + "marker": { + "color": "#808080", + "pattern": { + "shape": "" + } + }, + "name": "Official", + "offsetgroup": "Official", + "orientation": "h", + "showlegend": true, + "textposition": "auto", + "type": "bar", + "x": [ + 5.437, + 6.939, + 12.169, + 14.777, + 49.751, + 168.062899371, + 240.5370069 + ], + "xaxis": "x", + "y": [ + "Pension Credit", + "Tax Credits", + "Child Benefit", + "Housing Benefit", + "Universal Credit", + "National Insurance", + "Income Tax" + ], + "yaxis": "y" + }, + { + "alignmentgroup": "True", + "customdata": [ + [ + "PolicyEngine estimates aggregate Pension Credit
to be £5.7 billion
in 2023." + ], + [ + "PolicyEngine estimates aggregate Tax Credits
to be £7.9 billion
in 2023." + ], + [ + "PolicyEngine estimates aggregate Child Benefit
to be £12.2 billion
in 2023." + ], + [ + "PolicyEngine estimates aggregate Housing Benefit
to be £14.6 billion
in 2023." + ], + [ + "PolicyEngine estimates aggregate Universal Credit
to be £48.5 billion
in 2023." + ], + [ + "PolicyEngine estimates aggregate National Insurance
to be £164.7 billion
in 2023." + ], + [ + "PolicyEngine estimates aggregate Income Tax
to be £211.2 billion
in 2023." + ] + ], + "hovertemplate": "model=PolicyEngine
year=2023
value=%{x}
variable=%{y}", + "legendgroup": "PolicyEngine", + "marker": { + "color": "#17354F", + "pattern": { + "shape": "" + } + }, + "name": "PolicyEngine", + "offsetgroup": "PolicyEngine", + "orientation": "h", + "showlegend": true, + "textposition": "auto", + "type": "bar", + "x": [ + 5.716800014103888, + 7.8837541849403, + 12.168675106094156, + 14.564548934461316, + 48.475609170684386, + 164.69818933192443, + 211.1923993499099 + ], + "xaxis": "x", + "y": [ + "Pension Credit", + "Tax Credits", + "Child Benefit", + "Housing Benefit", + "Universal Credit", + "National Insurance", + "Income Tax" + ], + "yaxis": "y" + } + ], + "name": "2023" + }, + { + "data": [ + { + "alignmentgroup": "True", + "customdata": [ + [ + "UKMOD estimates aggregate Tax Credits
to be £2.3 billion
in 2024." + ], + [ + "UKMOD estimates aggregate Pension Credit
to be £5.0 billion
in 2024." + ], + [ + "UKMOD estimates aggregate Housing Benefit
to be £7.4 billion
in 2024." + ], + [ + "UKMOD estimates aggregate Child Benefit
to be £11.9 billion
in 2024." + ], + [ + "UKMOD estimates aggregate Universal Credit
to be £53.9 billion
in 2024." + ], + [ + "UKMOD estimates aggregate National Insurance
to be £173.4 billion
in 2024." + ], + [ + "UKMOD estimates aggregate Income Tax
to be £240.8 billion
in 2024." + ] + ], + "hovertemplate": "model=UKMOD
year=2024
value=%{x}
variable=%{y}", + "legendgroup": "UKMOD", + "marker": { + "color": "#D8E6F3", + "pattern": { + "shape": "" + } + }, + "name": "UKMOD", + "offsetgroup": "UKMOD", + "orientation": "h", + "showlegend": true, + "textposition": "auto", + "type": "bar", + "x": [ + 2.343, + 5.043, + 7.409, + 11.898, + 53.918, + 173.35899999999998, + 240.776 + ], + "xaxis": "x", + "y": [ + "Tax Credits", + "Pension Credit", + "Housing Benefit", + "Child Benefit", + "Universal Credit", + "National Insurance", + "Income Tax" + ], + "yaxis": "y" + }, + { + "alignmentgroup": "True", + "customdata": [ + [ + "Official estimates aggregate Tax Credits
to be £3.8 billion
in 2024." + ], + [ + "Official estimates aggregate Pension Credit
to be £5.7 billion
in 2024." + ], + [ + "Official estimates aggregate Child Benefit
to be £12.6 billion
in 2024." + ], + [ + "Official estimates aggregate Housing Benefit
to be £14.4 billion
in 2024." + ], + [ + "Official estimates aggregate Universal Credit
to be £57.8 billion
in 2024." + ], + [ + "Official estimates aggregate National Insurance
to be £171.7 billion
in 2024." + ], + [ + "Official estimates aggregate Income Tax
to be £253.0 billion
in 2024." + ] + ], + "hovertemplate": "model=Official
year=2024
value=%{x}
variable=%{y}", + "legendgroup": "Official", + "marker": { + "color": "#808080", + "pattern": { + "shape": "" + } + }, + "name": "Official", + "offsetgroup": "Official", + "orientation": "h", + "showlegend": true, + "textposition": "auto", + "type": "bar", + "x": [ + 3.759, + 5.722, + 12.608, + 14.437, + 57.782, + 171.668965421, + 253.049631509 + ], + "xaxis": "x", + "y": [ + "Tax Credits", + "Pension Credit", + "Child Benefit", + "Housing Benefit", + "Universal Credit", + "National Insurance", + "Income Tax" + ], + "yaxis": "y" + }, + { + "alignmentgroup": "True", + "customdata": [ + [ + "PolicyEngine estimates aggregate Pension Credit
to be £5.0 billion
in 2024." + ], + [ + "PolicyEngine estimates aggregate Tax Credits
to be £6.3 billion
in 2024." + ], + [ + "PolicyEngine estimates aggregate Housing Benefit
to be £13.2 billion
in 2024." + ], + [ + "PolicyEngine estimates aggregate Child Benefit
to be £17.2 billion
in 2024." + ], + [ + "PolicyEngine estimates aggregate Universal Credit
to be £56.6 billion
in 2024." + ], + [ + "PolicyEngine estimates aggregate National Insurance
to be £169.4 billion
in 2024." + ], + [ + "PolicyEngine estimates aggregate Income Tax
to be £230.9 billion
in 2024." + ] + ], + "hovertemplate": "model=PolicyEngine
year=2024
value=%{x}
variable=%{y}", + "legendgroup": "PolicyEngine", + "marker": { + "color": "#17354F", + "pattern": { + "shape": "" + } + }, + "name": "PolicyEngine", + "offsetgroup": "PolicyEngine", + "orientation": "h", + "showlegend": true, + "textposition": "auto", + "type": "bar", + "x": [ + 5.016642201046727, + 6.335329795314442, + 13.201956300617162, + 17.237807953930197, + 56.615312027237806, + 169.39473728503046, + 230.9414319051552 + ], + "xaxis": "x", + "y": [ + "Pension Credit", + "Tax Credits", + "Housing Benefit", + "Child Benefit", + "Universal Credit", + "National Insurance", + "Income Tax" + ], + "yaxis": "y" + } + ], + "name": "2024" + }, + { + "data": [ + { + "alignmentgroup": "True", + "customdata": [ + [ + "UKMOD estimates aggregate Tax Credits
to be £0.0 billion
in 2025." + ], + [ + "UKMOD estimates aggregate Pension Credit
to be £5.1 billion
in 2025." + ], + [ + "UKMOD estimates aggregate Housing Benefit
to be £5.5 billion
in 2025." + ], + [ + "UKMOD estimates aggregate Child Benefit
to be £11.9 billion
in 2025." + ], + [ + "UKMOD estimates aggregate Universal Credit
to be £61.9 billion
in 2025." + ], + [ + "UKMOD estimates aggregate National Insurance
to be £176.6 billion
in 2025." + ], + [ + "UKMOD estimates aggregate Income Tax
to be £246.5 billion
in 2025." + ] + ], + "hovertemplate": "model=UKMOD
year=2025
value=%{x}
variable=%{y}", + "legendgroup": "UKMOD", + "marker": { + "color": "#D8E6F3", + "pattern": { + "shape": "" + } + }, + "name": "UKMOD", + "offsetgroup": "UKMOD", + "orientation": "h", + "showlegend": true, + "textposition": "auto", + "type": "bar", + "x": [ + 0, + 5.124, + 5.471, + 11.874, + 61.863, + 176.55700000000002, + 246.492 + ], + "xaxis": "x", + "y": [ + "Tax Credits", + "Pension Credit", + "Housing Benefit", + "Child Benefit", + "Universal Credit", + "National Insurance", + "Income Tax" + ], + "yaxis": "y" + }, + { + "alignmentgroup": "True", + "customdata": [ + [ + "Official estimates aggregate Tax Credits
to be £0.2 billion
in 2025." + ], + [ + "Official estimates aggregate Pension Credit
to be £5.6 billion
in 2025." + ], + [ + "Official estimates aggregate Housing Benefit
to be £11.5 billion
in 2025." + ], + [ + "Official estimates aggregate Child Benefit
to be £12.5 billion
in 2025." + ], + [ + "Official estimates aggregate Universal Credit
to be £68.0 billion
in 2025." + ], + [ + "Official estimates aggregate National Insurance
to be £176.5 billion
in 2025." + ], + [ + "Official estimates aggregate Income Tax
to be £268.4 billion
in 2025." + ] + ], + "hovertemplate": "model=Official
year=2025
value=%{x}
variable=%{y}", + "legendgroup": "Official", + "marker": { + "color": "#808080", + "pattern": { + "shape": "" + } + }, + "name": "Official", + "offsetgroup": "Official", + "orientation": "h", + "showlegend": true, + "textposition": "auto", + "type": "bar", + "x": [ + 0.245, + 5.601, + 11.54, + 12.456, + 67.959, + 176.4756368, + 268.36672609 + ], + "xaxis": "x", + "y": [ + "Tax Credits", + "Pension Credit", + "Housing Benefit", + "Child Benefit", + "Universal Credit", + "National Insurance", + "Income Tax" + ], + "yaxis": "y" + }, + { + "alignmentgroup": "True", + "customdata": [ + [ + "PolicyEngine estimates aggregate Tax Credits
to be £2.4 billion
in 2025." + ], + [ + "PolicyEngine estimates aggregate Pension Credit
to be £4.6 billion
in 2025." + ], + [ + "PolicyEngine estimates aggregate Housing Benefit
to be £10.8 billion
in 2025." + ], + [ + "PolicyEngine estimates aggregate Child Benefit
to be £17.2 billion
in 2025." + ], + [ + "PolicyEngine estimates aggregate Universal Credit
to be £59.9 billion
in 2025." + ], + [ + "PolicyEngine estimates aggregate National Insurance
to be £181.0 billion
in 2025." + ], + [ + "PolicyEngine estimates aggregate Income Tax
to be £255.8 billion
in 2025." + ] + ], + "hovertemplate": "model=PolicyEngine
year=2025
value=%{x}
variable=%{y}", + "legendgroup": "PolicyEngine", + "marker": { + "color": "#17354F", + "pattern": { + "shape": "" + } + }, + "name": "PolicyEngine", + "offsetgroup": "PolicyEngine", + "orientation": "h", + "showlegend": true, + "textposition": "auto", + "type": "bar", + "x": [ + 2.441733981512122, + 4.583001415580091, + 10.765335944529406, + 17.151028316398943, + 59.902550849244356, + 181.01423598843414, + 255.79033352598896 + ], + "xaxis": "x", + "y": [ + "Tax Credits", + "Pension Credit", + "Housing Benefit", + "Child Benefit", + "Universal Credit", + "National Insurance", + "Income Tax" + ], + "yaxis": "y" + } + ], + "name": "2025" + } + ], + "layout": { + "barmode": "group", + "font": { + "color": "black", + "family": "Roboto Serif" + }, + "height": 600, + "images": [ + { + "sizex": 0.2, + "sizey": 0.2, + "source": "https://raw.githubusercontent.com/PolicyEngine/policyengine-app/master/src/images/logos/policyengine/blue.png", + "x": 1, + "xanchor": "right", + "xref": "paper", + "y": -0.15, + "yanchor": "bottom", + "yref": "paper" + } + ], + "legend": { + "title": { + "text": "" + }, + "tracegroupgap": 0 + }, + "margin": { + "t": 60 + }, + "modebar": { + "bgcolor": "rgba(0,0,0,0)", + "color": "rgba(0,0,0,0)" + }, + "sliders": [ + { + "active": 0, + "currentvalue": { + "prefix": "year=" + }, + "len": 0.9, + "pad": { + "b": 10, + "t": 60 + }, + "steps": [ + { + "args": [ + [ + "2023" + ], + { + "frame": { + "duration": 0, + "redraw": true + }, + "fromcurrent": true, + "mode": "immediate", + "transition": { + "duration": 0, + "easing": "linear" + } + } + ], + "label": "2023", + "method": "animate" + }, + { + "args": [ + [ + "2024" + ], + { + "frame": { + "duration": 0, + "redraw": true + }, + "fromcurrent": true, + "mode": "immediate", + "transition": { + "duration": 0, + "easing": "linear" + } + } + ], + "label": "2024", + "method": "animate" + }, + { + "args": [ + [ + "2025" + ], + { + "frame": { + "duration": 0, + "redraw": true + }, + "fromcurrent": true, + "mode": "immediate", + "transition": { + "duration": 0, + "easing": "linear" + } + } + ], + "label": "2025", + "method": "animate" + } + ], + "x": 0.1, + "xanchor": "left", + "y": 0, + "yanchor": "top" + } + ], + "template": { + "data": { + "bar": [ + { + "error_x": { + "color": "#2a3f5f" + }, + "error_y": { + "color": "#2a3f5f" + }, + "marker": { + "line": { + "color": "white", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "bar" + } + ], + "barpolar": [ + { + "marker": { + "line": { + "color": "white", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "barpolar" + } + ], + "carpet": [ + { + "aaxis": { + "endlinecolor": "#2a3f5f", + "gridcolor": "#C8D4E3", + "linecolor": "#C8D4E3", + "minorgridcolor": "#C8D4E3", + "startlinecolor": "#2a3f5f" + }, + "baxis": { + "endlinecolor": "#2a3f5f", + "gridcolor": "#C8D4E3", + "linecolor": "#C8D4E3", + "minorgridcolor": "#C8D4E3", + "startlinecolor": "#2a3f5f" + }, + "type": "carpet" + } + ], + "choropleth": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "choropleth" + } + ], + "contour": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "contour" + } + ], + "contourcarpet": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "contourcarpet" + } + ], + "heatmap": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "heatmap" + } + ], + "heatmapgl": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "heatmapgl" + } + ], + "histogram": [ + { + "marker": { + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "histogram" + } + ], + "histogram2d": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "histogram2d" + } + ], + "histogram2dcontour": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "histogram2dcontour" + } + ], + "mesh3d": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "mesh3d" + } + ], + "parcoords": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "parcoords" + } + ], + "pie": [ + { + "automargin": true, + "type": "pie" + } + ], + "scatter": [ + { + "fillpattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + }, + "type": "scatter" + } + ], + "scatter3d": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatter3d" + } + ], + "scattercarpet": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattercarpet" + } + ], + "scattergeo": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattergeo" + } + ], + "scattergl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattergl" + } + ], + "scattermapbox": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattermapbox" + } + ], + "scatterpolar": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterpolar" + } + ], + "scatterpolargl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterpolargl" + } + ], + "scatterternary": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterternary" + } + ], + "surface": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "surface" + } + ], + "table": [ + { + "cells": { + "fill": { + "color": "#EBF0F8" + }, + "line": { + "color": "white" + } + }, + "header": { + "fill": { + "color": "#C8D4E3" + }, + "line": { + "color": "white" + } + }, + "type": "table" + } + ] + }, + "layout": { + "annotationdefaults": { + "arrowcolor": "#2a3f5f", + "arrowhead": 0, + "arrowwidth": 1 + }, + "autotypenumbers": "strict", + "coloraxis": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "colorscale": { + "diverging": [ + [ + 0, + "#8e0152" + ], + [ + 0.1, + "#c51b7d" + ], + [ + 0.2, + "#de77ae" + ], + [ + 0.3, + "#f1b6da" + ], + [ + 0.4, + "#fde0ef" + ], + [ + 0.5, + "#f7f7f7" + ], + [ + 0.6, + "#e6f5d0" + ], + [ + 0.7, + "#b8e186" + ], + [ + 0.8, + "#7fbc41" + ], + [ + 0.9, + "#4d9221" + ], + [ + 1, + "#276419" + ] + ], + "sequential": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "sequentialminus": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ] + }, + "colorway": [ + "#636efa", + "#EF553B", + "#00cc96", + "#ab63fa", + "#FFA15A", + "#19d3f3", + "#FF6692", + "#B6E880", + "#FF97FF", + "#FECB52" + ], + "font": { + "color": "#2a3f5f" + }, + "geo": { + "bgcolor": "white", + "lakecolor": "white", + "landcolor": "white", + "showlakes": true, + "showland": true, + "subunitcolor": "#C8D4E3" + }, + "hoverlabel": { + "align": "left" + }, + "hovermode": "closest", + "mapbox": { + "style": "light" + }, + "paper_bgcolor": "white", + "plot_bgcolor": "white", + "polar": { + "angularaxis": { + "gridcolor": "#EBF0F8", + "linecolor": "#EBF0F8", + "ticks": "" + }, + "bgcolor": "white", + "radialaxis": { + "gridcolor": "#EBF0F8", + "linecolor": "#EBF0F8", + "ticks": "" + } + }, + "scene": { + "xaxis": { + "backgroundcolor": "white", + "gridcolor": "#DFE8F3", + "gridwidth": 2, + "linecolor": "#EBF0F8", + "showbackground": true, + "ticks": "", + "zerolinecolor": "#EBF0F8" + }, + "yaxis": { + "backgroundcolor": "white", + "gridcolor": "#DFE8F3", + "gridwidth": 2, + "linecolor": "#EBF0F8", + "showbackground": true, + "ticks": "", + "zerolinecolor": "#EBF0F8" + }, + "zaxis": { + "backgroundcolor": "white", + "gridcolor": "#DFE8F3", + "gridwidth": 2, + "linecolor": "#EBF0F8", + "showbackground": true, + "ticks": "", + "zerolinecolor": "#EBF0F8" + } + }, + "shapedefaults": { + "line": { + "color": "#2a3f5f" + } + }, + "ternary": { + "aaxis": { + "gridcolor": "#DFE8F3", + "linecolor": "#A2B1C6", + "ticks": "" + }, + "baxis": { + "gridcolor": "#DFE8F3", + "linecolor": "#A2B1C6", + "ticks": "" + }, + "bgcolor": "white", + "caxis": { + "gridcolor": "#DFE8F3", + "linecolor": "#A2B1C6", + "ticks": "" + } + }, + "title": { + "x": 0.05 + }, + "xaxis": { + "automargin": true, + "gridcolor": "#EBF0F8", + "linecolor": "#EBF0F8", + "ticks": "", + "title": { + "standoff": 15 + }, + "zerolinecolor": "#EBF0F8", + "zerolinewidth": 2 + }, + "yaxis": { + "automargin": true, + "gridcolor": "#EBF0F8", + "linecolor": "#EBF0F8", + "ticks": "", + "title": { + "standoff": 15 + }, + "zerolinecolor": "#EBF0F8", + "zerolinewidth": 2 + } + } + }, + "title": { + "text": "Errors against official estimates" + }, + "updatemenus": [ + { + "buttons": [ + { + "args": [ + null, + { + "frame": { + "duration": 500, + "redraw": true + }, + "fromcurrent": true, + "mode": "immediate", + "transition": { + "duration": 500, + "easing": "linear" + } + } + ], + "label": "▶", + "method": "animate" + }, + { + "args": [ + [ + null + ], + { + "frame": { + "duration": 0, + "redraw": true + }, + "fromcurrent": true, + "mode": "immediate", + "transition": { + "duration": 0, + "easing": "linear" + } + } + ], + "label": "◼", + "method": "animate" + } + ], + "direction": "left", + "pad": { + "r": 10, + "t": 70 + }, + "showactive": false, + "type": "buttons", + "x": 0.1, + "xanchor": "right", + "y": 0, + "yanchor": "top" + } + ], + "width": 800, + "xaxis": { + "anchor": "y", + "domain": [ + 0, + 1 + ], + "range": [ + -10, + 300 + ], + "title": { + "text": "Budgetary impact (£bn)" + } + }, + "yaxis": { + "anchor": "x", + "domain": [ + 0, + 1 + ], + "title": { + "text": "" + } + } + } + } + }, + "metadata": {}, + "output_type": "display_data" + } + ], "source": [ "from policyengine_uk import Microsimulation\n", "\n", @@ -242,7 +2010,7 @@ " )\n", "\n", "import plotly.express as px\n", - "from policyengine_core.charts import format_fig, BLUE_COLOR_SCALE, GRAY\n", + "from policyengine_core.charts import format_fig, BLUE_COLOUR_SCALE, GRAY\n", "\n", "fig = (\n", " px.bar(\n", @@ -257,9 +2025,9 @@ " color_discrete_map={\n", " \"Official\": GRAY,\n", " # \"Official (error)\": GRAY,\n", - " \"PolicyEngine\": BLUE_COLOR_SCALE[3],\n", + " \"PolicyEngine\": BLUE_COLOUR_SCALE[2],\n", " # \"PolicyEngine (error)\": BLUE_COLOR_SCALE[3],\n", - " \"UKMOD\": BLUE_COLOR_SCALE[0],\n", + " \"UKMOD\": BLUE_COLOUR_SCALE[0],\n", " # \"UKMOD (error)\": BLUE_COLOR_SCALE[0],\n", " },\n", " )\n", diff --git a/examples/income-sources.html b/examples/income-sources.html index af1ef02b9..e69e9183e 100644 --- a/examples/income-sources.html +++ b/examples/income-sources.html @@ -355,9 +355,9 @@

Pensioner income sources
-
-
-
-
-
-
-
-
-
-