Demographic Population Growth¶
- Using 2023 as base, working out the change in population for each demographic group(0-4,5-9 etc), calculating the population change factor from ONS Projections.
- Creating GP List Projections, using the number of patients registered at GP list and population change factor from ONS Projections.
- Comparing and analysing ONS Projections and GP list Projections for each SNEE ICB areas
- Repeating the same for other ONS Scenarios
Importing libraries¶
In [1]:
# this is a bit of a hack to get relative imports
# to work as if these notebooks were in a package
from os import chdir
from pathlib import Path
if 'notebooks' in str(Path.cwd()):
chdir('..')
import pandas as pd
import matplotlib.pyplot as plt
from src.schemas import DataCatalog
import seaborn as sns
# project imports from src
from src.various_methods import PlotCounter
Loading the Data catalogue¶
In [2]:
catalog = DataCatalog.load_from_yaml("data_catalog.yaml")
In [3]:
#Initializing the plotCounter object
plot_counter = PlotCounter(name='demographic_pop_growth')
Loading & Preprocessing the Dataset - 'Patients Registered at a GP practice, October 2023'¶
In [4]:
#Loading the Dataset to get data on number of patients from GP List
gp_patients_reg_catalog_entry = catalog.single_data_sources[6]
gp_patients_reg = gp_patients_reg_catalog_entry.load()
print(gp_patients_reg_catalog_entry.zip_file.namelist())
print(gp_patients_reg.shape)
gp_patients_reg.head()
['gp-reg-pat-prac-quin-age.csv'] (334411, 9)
/workspaces/PrimaryCareDemandAndCapacity/src/schemas.py:146: DtypeWarning: Columns (4,5) have mixed types. Specify dtype option on import or set low_memory=False. return pd.read_csv(csv_file, **read_csv_kwargs)
Out[4]:
| PUBLICATION | EXTRACT_DATE | ORG_TYPE | ORG_CODE | ONS_CODE | POSTCODE | SEX | AGE_GROUP_5 | NUMBER_OF_PATIENTS | |
|---|---|---|---|---|---|---|---|---|---|
| 0 | GP_PRAC_PAT_LIST | 01Oct2023 | Comm Region | Y56 | E40000003 | NaN | ALL | ALL | 10927943 |
| 1 | GP_PRAC_PAT_LIST | 01Oct2023 | Comm Region | Y56 | E40000003 | NaN | FEMALE | 0_4 | 258852 |
| 2 | GP_PRAC_PAT_LIST | 01Oct2023 | Comm Region | Y56 | E40000003 | NaN | FEMALE | 10_14 | 300771 |
| 3 | GP_PRAC_PAT_LIST | 01Oct2023 | Comm Region | Y56 | E40000003 | NaN | FEMALE | 15_19 | 287618 |
| 4 | GP_PRAC_PAT_LIST | 01Oct2023 | Comm Region | Y56 | E40000003 | NaN | FEMALE | 20_24 | 385681 |
In [5]:
#Checking the values in AGE_GROUP column to match them with the ONS Projections data
print(gp_patients_reg['AGE_GROUP_5'].unique())
['ALL' '0_4' '10_14' '15_19' '20_24' '25_29' '30_34' '35_39' '40_44' '45_49' '50_54' '55_59' '5_9' '60_64' '65_69' '70_74' '75_79' '80_84' '85_89' '90_94' '95+']
In [6]:
#Replacing AGE_BANDS values to match the ONS_projection data
gp_patients_reg['AGE_GROUP_5'] = gp_patients_reg['AGE_GROUP_5'].replace({'90_94':'90+', '95+':'90+', '0_4':'0-4', '5_9':'5-9', '10_14':'10-14', '15_19':'15-19', '20_24':'20-24', '25_29':'25-29',
'30_34':'30-34', '35_39':'35-39', '40_44':'40-44', '45_49':'45-49', '50_54':'50-54', '55_59':'55-59', '60_64':'60-64',
'65_69':'65-69', '70_74':'70-74', '75_79':'75-79', '80_84':'80-84', '85_89':'85-89'})
#Renaming the column name to match with ONS projection data
gp_patients_reg = gp_patients_reg.rename(columns={'ONS_CODE':'AREA_CODE'})
#Dropping unused columns and rows corrsponding to 'ALL' for AGE_GROUP_5
gp_patients_reg = gp_patients_reg.loc[gp_patients_reg['AGE_GROUP_5']!='ALL'].drop(columns=['PUBLICATION','EXTRACT_DATE','ORG_TYPE','POSTCODE','SEX']).set_index('AREA_CODE')
print(gp_patients_reg['AGE_GROUP_5'].unique())
print(gp_patients_reg.shape)
gp_patients_reg.head()
['0-4' '10-14' '15-19' '20-24' '25-29' '30-34' '35-39' '40-44' '45-49' '50-54' '55-59' '5-9' '60-64' '65-69' '70-74' '75-79' '80-84' '85-89' '90+'] (311080, 3)
Out[6]:
| ORG_CODE | AGE_GROUP_5 | NUMBER_OF_PATIENTS | |
|---|---|---|---|
| AREA_CODE | |||
| E40000003 | Y56 | 0-4 | 258852 |
| E40000003 | Y56 | 10-14 | 300771 |
| E40000003 | Y56 | 15-19 | 287618 |
| E40000003 | Y56 | 20-24 | 385681 |
| E40000003 | Y56 | 25-29 | 535500 |
Filtering the data for Sub-ICB's under SNEE ICB¶
In [7]:
required_icb_code = ['06L', '06T', '07K']
snee_gp_patients_reg = gp_patients_reg[gp_patients_reg['ORG_CODE'].isin(required_icb_code)].groupby(['AREA_CODE','AGE_GROUP_5']).sum().drop(columns=['ORG_CODE'])
#Changing the Area code with SUB ICB name
new_index_values = {'E38000086': 'Ipswich and East Suffolk', 'E38000204': 'West Suffolk', 'E38000117': 'North East Essex'}
snee_gp_patients_reg = snee_gp_patients_reg.rename(index=new_index_values)
#The dataframe that will be combined later with ONS projection factors dataframe
snee_gp_patients_reg
Out[7]:
| NUMBER_OF_PATIENTS | ||
|---|---|---|
| AREA_CODE | AGE_GROUP_5 | |
| Ipswich and East Suffolk | 0-4 | 18148 |
| 10-14 | 24231 | |
| 15-19 | 23513 | |
| 20-24 | 19718 | |
| 25-29 | 22975 | |
| 30-34 | 26197 | |
| 35-39 | 27046 | |
| 40-44 | 26757 | |
| 45-49 | 24675 | |
| 5-9 | 22318 | |
| 50-54 | 28246 | |
| 55-59 | 29474 | |
| 60-64 | 27504 | |
| 65-69 | 24094 | |
| 70-74 | 22465 | |
| 75-79 | 21514 | |
| 80-84 | 13002 | |
| 85-89 | 8418 | |
| 90+ | 4944 | |
| North East Essex | 0-4 | 17141 |
| 10-14 | 21753 | |
| 15-19 | 19603 | |
| 20-24 | 22057 | |
| 25-29 | 23587 | |
| 30-34 | 25308 | |
| 35-39 | 23991 | |
| 40-44 | 22694 | |
| 45-49 | 21090 | |
| 5-9 | 20542 | |
| 50-54 | 23563 | |
| 55-59 | 24997 | |
| 60-64 | 23198 | |
| 65-69 | 20141 | |
| 70-74 | 19583 | |
| 75-79 | 20080 | |
| 80-84 | 11895 | |
| 85-89 | 7241 | |
| 90+ | 4104 | |
| West Suffolk | 0-4 | 12369 |
| 10-14 | 15470 | |
| 15-19 | 14609 | |
| 20-24 | 12434 | |
| 25-29 | 15253 | |
| 30-34 | 17380 | |
| 35-39 | 17559 | |
| 40-44 | 17408 | |
| 45-49 | 16273 | |
| 5-9 | 14201 | |
| 50-54 | 19191 | |
| 55-59 | 20598 | |
| 60-64 | 18664 | |
| 65-69 | 15853 | |
| 70-74 | 15371 | |
| 75-79 | 15362 | |
| 80-84 | 9427 | |
| 85-89 | 5679 | |
| 90+ | 3004 |
Loading & Preprocessing the Dataset - ONS Population projections¶
In [8]:
ons_projection_catalog_entry = catalog.scenario_data_sources[0].scenarios[0]
ons_projections = ons_projection_catalog_entry.load()
print(ons_projection_catalog_entry.zip_file.namelist())
print(ons_projections.shape)
ons_projections.head()
['2018 SNPP CCG pop females.csv', '2018 SNPP CCG pop males.csv', '2018 SNPP CCG pop persons.csv', 'SNPP Z2 CCG Pop_read me.txt'] (17940, 31)
Out[8]:
| AREA_CODE | AREA_NAME | COMPONENT | SEX | AGE_GROUP | 2018 | 2019 | 2020 | 2021 | 2022 | ... | 2034 | 2035 | 2036 | 2037 | 2038 | 2039 | 2040 | 2041 | 2042 | 2043 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | E38000004 | NHS Barking and Dagenham CCG | Population | persons | 0 | 3819.0 | 3539.476 | 3553.996 | 3545.026 | 3503.164 | ... | 3485.017 | 3512.290 | 3542.499 | 3574.884 | 3607.783 | 3638.390 | 3663.012 | 3682.648 | 3697.617 | 3706.681 |
| 1 | E38000004 | NHS Barking and Dagenham CCG | Population | persons | 1 | 3923.0 | 3841.214 | 3570.205 | 3583.060 | 3571.184 | ... | 3482.414 | 3507.074 | 3534.224 | 3564.456 | 3597.080 | 3630.402 | 3661.624 | 3687.005 | 3707.455 | 3723.301 |
| 2 | E38000004 | NHS Barking and Dagenham CCG | Population | persons | 2 | 4050.0 | 3912.292 | 3826.447 | 3565.341 | 3575.791 | ... | 3448.544 | 3469.903 | 3494.032 | 3520.703 | 3550.533 | 3582.885 | 3616.072 | 3647.352 | 3672.985 | 3693.800 |
| 3 | E38000004 | NHS Barking and Dagenham CCG | Population | persons | 3 | 3822.0 | 4036.658 | 3906.033 | 3816.546 | 3563.662 | ... | 3426.572 | 3442.075 | 3462.911 | 3486.569 | 3512.830 | 3542.304 | 3574.383 | 3607.421 | 3638.690 | 3664.447 |
| 4 | E38000004 | NHS Barking and Dagenham CCG | Population | persons | 4 | 3905.0 | 3805.264 | 4003.299 | 3879.217 | 3788.087 | ... | 3394.732 | 3405.045 | 3420.062 | 3440.323 | 3463.422 | 3489.140 | 3518.097 | 3549.706 | 3582.360 | 3613.373 |
5 rows × 31 columns
In [9]:
#Checking the values in AGE_GROUP column to match them with the GP List data
print(ons_projections['AGE_GROUP'].unique())
['0' '1' '2' '3' '4' '5' '6' '7' '8' '9' '10' '11' '12' '13' '14' '15' '16' '17' '18' '19' '20' '21' '22' '23' '24' '25' '26' '27' '28' '29' '30' '31' '32' '33' '34' '35' '36' '37' '38' '39' '40' '41' '42' '43' '44' '45' '46' '47' '48' '49' '50' '51' '52' '53' '54' '55' '56' '57' '58' '59' '60' '61' '62' '63' '64' '65' '66' '67' '68' '69' '70' '71' '72' '73' '74' '75' '76' '77' '78' '79' '80' '81' '82' '83' '84' '85' '86' '87' '88' '89' '90 and over' 'All ages']
In [10]:
#Removing values corresponding to 'All ages' in the 'AGE_GROUP' column and dropping unused columns
ons_projections_df = ons_projections.loc[ons_projections['AGE_GROUP']!='All ages'].drop(columns=['AREA_NAME','COMPONENT','SEX','2018','2019','2020','2021','2022']).set_index('AREA_CODE')
#Replacing '90 and over' with 90
ons_projections_df['AGE_GROUP'] = ons_projections_df['AGE_GROUP'].replace('90 and over', 90)
Appending new column having age bands data¶
In [11]:
#Specifying the bins and labels for new AGE BANDS columns
bins = [-1,4,9,14,19,24,29,34,39,44,49,54,59,64,69,74,79,84,89,float('inf')]
labels = ['0-4','5-9','10-14','15-19','20-24','25-29','30-34','35-39','40-44','45-49','50-54','55-59','60-64','65-69','70-74','75-79','80-84','85-89','90+']
#Converting AGE_GROUP data type to int
ons_projections_df['AGE_GROUP'] = ons_projections_df['AGE_GROUP'].astype(int)
#Adding the column for Age Bands as 'AGE_GROUP_5'
ons_projections_df['AGE_GROUP_5'] = pd.cut(ons_projections_df['AGE_GROUP'], bins=bins, labels=labels)
Filtering the data for Sub-ICB's under SNEE ICB¶
In [12]:
#Filtering the data to keep only SNEE ICB
required_icb = ['E38000086','E38000204','E38000117']
snee_ons_projections = ons_projections_df[ons_projections_df.index.isin(required_icb)].groupby(['AREA_CODE', 'AGE_GROUP_5']).sum().drop(columns=['AGE_GROUP'])
#Changing the Area code with SUB ICB name
new_index_values = {'E38000086': 'Ipswich and East Suffolk', 'E38000204': 'West Suffolk', 'E38000117': 'North East Essex'}
#We will be using this dataframe for ONS Projections data for SNEE
snee_ons_projections = snee_ons_projections.rename(index=new_index_values)
/tmp/ipykernel_8500/3095327778.py:3: FutureWarning: The default of observed=False is deprecated and will be changed to True in a future version of pandas. Pass observed=False to retain current behavior or observed=True to adopt the future default and silence this warning. snee_ons_projections = ons_projections_df[ons_projections_df.index.isin(required_icb)].groupby(['AREA_CODE', 'AGE_GROUP_5']).sum().drop(columns=['AGE_GROUP'])
Calculating the population change factor for each year keeping 2023 as baseline¶
In [13]:
pop_baseline = snee_ons_projections['2023']
snee_factors_ons_projections = snee_ons_projections.div(pop_baseline, axis=0).round(5)
snee_factors_ons_projections
Out[13]:
| 2023 | 2024 | 2025 | 2026 | 2027 | 2028 | 2029 | 2030 | 2031 | 2032 | ... | 2034 | 2035 | 2036 | 2037 | 2038 | 2039 | 2040 | 2041 | 2042 | 2043 | ||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| AREA_CODE | AGE_GROUP_5 | |||||||||||||||||||||
| Ipswich and East Suffolk | 0-4 | 1.0 | 0.99638 | 0.99166 | 0.98772 | 0.98553 | 0.98364 | 0.98201 | 0.98084 | 0.98037 | 0.98096 | ... | 0.98587 | 0.99017 | 0.99575 | 1.00261 | 1.01057 | 1.01936 | 1.02847 | 1.03732 | 1.04536 | 1.05213 |
| 5-9 | 1.0 | 0.98186 | 0.96520 | 0.94461 | 0.93286 | 0.92360 | 0.92068 | 0.91683 | 0.91373 | 0.91209 | ... | 0.90957 | 0.90881 | 0.90867 | 0.90947 | 0.91137 | 0.91440 | 0.91851 | 0.92378 | 0.93019 | 0.93759 | |
| 10-14 | 1.0 | 0.99682 | 0.98753 | 0.97903 | 0.96628 | 0.95654 | 0.93978 | 0.92478 | 0.90588 | 0.89510 | ... | 0.88394 | 0.88052 | 0.87779 | 0.87640 | 0.87525 | 0.87433 | 0.87377 | 0.87379 | 0.87470 | 0.87664 | |
| 15-19 | 1.0 | 1.01299 | 1.03028 | 1.04302 | 1.04840 | 1.04296 | 1.03836 | 1.02874 | 1.02327 | 1.01087 | ... | 0.98180 | 0.96470 | 0.94838 | 0.93697 | 0.92976 | 0.92690 | 0.92356 | 0.92121 | 0.91987 | 0.91878 | |
| 20-24 | 1.0 | 0.98982 | 0.99081 | 1.00977 | 1.03673 | 1.06567 | 1.08405 | 1.10702 | 1.12416 | 1.13668 | ... | 1.14056 | 1.13789 | 1.13290 | 1.11838 | 1.10632 | 1.09096 | 1.07547 | 1.05614 | 1.04208 | 1.03267 | |
| 25-29 | 1.0 | 0.98967 | 0.97371 | 0.95238 | 0.92440 | 0.90834 | 0.90184 | 0.90465 | 0.92140 | 0.94583 | ... | 0.99060 | 1.01087 | 1.02707 | 1.04152 | 1.04446 | 1.04637 | 1.04421 | 1.04045 | 1.02836 | 1.01699 | |
| 30-34 | 1.0 | 0.99216 | 0.98354 | 0.97085 | 0.96452 | 0.95820 | 0.94830 | 0.93494 | 0.91664 | 0.89210 | ... | 0.87145 | 0.87413 | 0.88974 | 0.91326 | 0.93922 | 0.95740 | 0.97734 | 0.99346 | 1.00838 | 1.01227 | |
| 35-39 | 1.0 | 1.01622 | 1.01891 | 1.02434 | 1.02210 | 1.01155 | 1.00474 | 0.99585 | 0.98348 | 0.97708 | ... | 0.96154 | 0.94893 | 0.93141 | 0.90793 | 0.89402 | 0.88778 | 0.89066 | 0.90627 | 0.93010 | 0.95657 | |
| 40-44 | 1.0 | 1.00086 | 1.00137 | 1.00462 | 1.01002 | 1.02521 | 1.04107 | 1.04453 | 1.05066 | 1.04930 | ... | 1.03271 | 1.02346 | 1.01113 | 1.00462 | 0.99870 | 0.98897 | 0.97650 | 0.95910 | 0.93579 | 0.92194 | |
| 45-49 | 1.0 | 0.99380 | 1.00784 | 1.02937 | 1.05611 | 1.07345 | 1.07508 | 1.07585 | 1.07972 | 1.08540 | ... | 1.11753 | 1.12149 | 1.12832 | 1.12744 | 1.11689 | 1.11035 | 1.10053 | 1.08764 | 1.08064 | 1.07457 | |
| 50-54 | 1.0 | 0.97167 | 0.94210 | 0.90264 | 0.87088 | 0.84511 | 0.84131 | 0.85352 | 0.87141 | 0.89379 | ... | 0.91083 | 0.91209 | 0.91538 | 0.92004 | 0.93318 | 0.94618 | 0.94971 | 0.95549 | 0.95510 | 0.94636 | |
| 55-59 | 1.0 | 1.00029 | 0.99321 | 0.99035 | 0.97795 | 0.96634 | 0.94008 | 0.91348 | 0.87715 | 0.84780 | ... | 0.82205 | 0.83437 | 0.85199 | 0.87372 | 0.88866 | 0.89123 | 0.89287 | 0.89630 | 0.90075 | 0.91326 | |
| 60-64 | 1.0 | 1.02950 | 1.06148 | 1.07661 | 1.09318 | 1.09503 | 1.09520 | 1.08818 | 1.08528 | 1.07285 | ... | 1.03313 | 1.00605 | 0.96839 | 0.93789 | 0.91445 | 0.91303 | 0.92731 | 0.94724 | 0.97108 | 0.98791 | |
| 65-69 | 1.0 | 1.01620 | 1.03693 | 1.07107 | 1.08967 | 1.11527 | 1.14889 | 1.18407 | 1.20191 | 1.22044 | ... | 1.22406 | 1.21662 | 1.21375 | 1.20121 | 1.18761 | 1.15902 | 1.13042 | 1.09059 | 1.05835 | 1.03442 | |
| 70-74 | 1.0 | 0.99316 | 0.98705 | 0.98888 | 1.00966 | 1.03341 | 1.05151 | 1.07421 | 1.10985 | 1.13106 | ... | 1.19458 | 1.23117 | 1.25102 | 1.27024 | 1.27400 | 1.27569 | 1.26873 | 1.26682 | 1.25485 | 1.24148 | |
| 75-79 | 1.0 | 1.02695 | 1.04713 | 1.05517 | 1.00230 | 0.97926 | 0.97372 | 0.96899 | 0.97236 | 0.99363 | ... | 1.03743 | 1.06122 | 1.09699 | 1.12006 | 1.14938 | 1.18551 | 1.22278 | 1.24368 | 1.26360 | 1.26866 | |
| 80-84 | 1.0 | 1.05266 | 1.10914 | 1.18079 | 1.31920 | 1.39170 | 1.42875 | 1.45659 | 1.46643 | 1.39659 | ... | 1.36312 | 1.35945 | 1.36741 | 1.40011 | 1.43745 | 1.46797 | 1.50407 | 1.55725 | 1.59372 | 1.63923 | |
| 85-89 | 1.0 | 1.03035 | 1.04081 | 1.04165 | 1.07405 | 1.11912 | 1.18464 | 1.25023 | 1.33168 | 1.49852 | ... | 1.62415 | 1.65293 | 1.66108 | 1.59117 | 1.56513 | 1.56647 | 1.56818 | 1.58407 | 1.62872 | 1.67801 | |
| 90+ | 1.0 | 1.02050 | 1.05386 | 1.07849 | 1.10754 | 1.14531 | 1.18303 | 1.20836 | 1.21703 | 1.26141 | ... | 1.40683 | 1.47863 | 1.55407 | 1.73912 | 1.84255 | 1.90952 | 1.95701 | 1.98720 | 2.00729 | 2.02946 | |
| North East Essex | 0-4 | 1.0 | 1.00571 | 1.00978 | 1.01416 | 1.01850 | 1.02223 | 1.02576 | 1.02947 | 1.03349 | 1.03817 | ... | 1.05069 | 1.05853 | 1.06748 | 1.07746 | 1.08827 | 1.09978 | 1.11149 | 1.12280 | 1.13320 | 1.14222 |
| 5-9 | 1.0 | 0.98900 | 0.97859 | 0.97297 | 0.96834 | 0.96532 | 0.96895 | 0.97125 | 0.97394 | 0.97681 | ... | 0.98181 | 0.98454 | 0.98767 | 0.99151 | 0.99638 | 1.00234 | 1.00932 | 1.01739 | 1.02649 | 1.03644 | |
| 10-14 | 1.0 | 1.01435 | 1.02244 | 1.02469 | 1.01331 | 1.00763 | 0.99590 | 0.98498 | 0.97762 | 0.97169 | ... | 0.97015 | 0.97153 | 0.97334 | 0.97546 | 0.97736 | 0.97932 | 0.98158 | 0.98429 | 0.98775 | 0.99226 | |
| 15-19 | 1.0 | 1.02622 | 1.05779 | 1.08235 | 1.11561 | 1.13161 | 1.14554 | 1.15420 | 1.15593 | 1.14302 | ... | 1.12213 | 1.11152 | 1.10058 | 1.09151 | 1.08434 | 1.08629 | 1.08651 | 1.08714 | 1.08830 | 1.08956 | |
| 20-24 | 1.0 | 1.00031 | 1.00752 | 1.02482 | 1.05203 | 1.08188 | 1.10493 | 1.13073 | 1.15082 | 1.17646 | ... | 1.19332 | 1.19600 | 1.19433 | 1.18238 | 1.17316 | 1.15743 | 1.14381 | 1.13026 | 1.11948 | 1.11193 | |
| 25-29 | 1.0 | 0.99561 | 0.99558 | 0.98581 | 0.96934 | 0.95807 | 0.95444 | 0.95926 | 0.97393 | 0.99831 | ... | 1.04646 | 1.06903 | 1.08733 | 1.10833 | 1.11647 | 1.12284 | 1.12506 | 1.12357 | 1.11249 | 1.10358 | |
| 30-34 | 1.0 | 1.00131 | 0.98774 | 0.97250 | 0.96267 | 0.95974 | 0.95366 | 0.95009 | 0.93886 | 0.92197 | ... | 0.90660 | 0.91105 | 0.92517 | 0.94840 | 0.97429 | 0.99442 | 1.01561 | 1.03286 | 1.05201 | 1.05923 | |
| 35-39 | 1.0 | 1.03335 | 1.06079 | 1.09679 | 1.12051 | 1.12159 | 1.12118 | 1.10739 | 1.09153 | 1.08132 | ... | 1.06977 | 1.06384 | 1.05037 | 1.03098 | 1.01835 | 1.01343 | 1.01836 | 1.03431 | 1.06029 | 1.08934 | |
| 40-44 | 1.0 | 1.00846 | 1.01943 | 1.02817 | 1.04268 | 1.06666 | 1.09636 | 1.11966 | 1.15072 | 1.17096 | ... | 1.16840 | 1.15496 | 1.13915 | 1.12897 | 1.12444 | 1.11597 | 1.10874 | 1.09424 | 1.07379 | 1.06063 | |
| 45-49 | 1.0 | 1.00111 | 1.01003 | 1.03046 | 1.05068 | 1.07435 | 1.08326 | 1.09413 | 1.10250 | 1.11611 | ... | 1.16725 | 1.18807 | 1.21617 | 1.23428 | 1.23135 | 1.22916 | 1.21557 | 1.19950 | 1.18924 | 1.18430 | |
| 50-54 | 1.0 | 0.97398 | 0.95924 | 0.93052 | 0.90756 | 0.89337 | 0.89541 | 0.90464 | 0.92351 | 0.94237 | ... | 0.97071 | 0.97987 | 0.98665 | 0.99749 | 1.01681 | 1.03873 | 1.05454 | 1.07604 | 1.08950 | 1.08571 | |
| 55-59 | 1.0 | 1.00429 | 1.00074 | 0.99382 | 0.98571 | 0.96919 | 0.94588 | 0.93210 | 0.90585 | 0.88492 | ... | 0.87580 | 0.88607 | 0.90514 | 0.92412 | 0.94368 | 0.95144 | 0.95979 | 0.96590 | 0.97539 | 0.99277 | |
| 60-64 | 1.0 | 1.03258 | 1.05756 | 1.08443 | 1.09641 | 1.10932 | 1.11400 | 1.11041 | 1.10400 | 1.09547 | ... | 1.05484 | 1.04041 | 1.01330 | 0.99184 | 0.97991 | 0.98513 | 0.99834 | 1.02039 | 1.04239 | 1.06403 | |
| 65-69 | 1.0 | 1.02503 | 1.05532 | 1.09081 | 1.13236 | 1.16213 | 1.19949 | 1.22924 | 1.25993 | 1.27515 | ... | 1.29533 | 1.29188 | 1.28592 | 1.27673 | 1.25890 | 1.23343 | 1.21786 | 1.18853 | 1.16574 | 1.15394 | |
| 70-74 | 1.0 | 0.97665 | 0.96923 | 0.97471 | 0.98560 | 1.00170 | 1.02723 | 1.05810 | 1.09370 | 1.13490 | ... | 1.20364 | 1.23427 | 1.26524 | 1.28200 | 1.29659 | 1.30290 | 1.30022 | 1.29599 | 1.28783 | 1.27155 | |
| 75-79 | 1.0 | 1.01976 | 1.02723 | 1.01970 | 0.95550 | 0.92645 | 0.90806 | 0.90303 | 0.90971 | 0.92186 | ... | 0.96403 | 0.99397 | 1.02820 | 1.06739 | 1.09797 | 1.13459 | 1.16460 | 1.19463 | 1.21199 | 1.22622 | |
| 80-84 | 1.0 | 1.05828 | 1.10734 | 1.17724 | 1.32221 | 1.39704 | 1.42544 | 1.43529 | 1.42431 | 1.34132 | ... | 1.28574 | 1.28196 | 1.29457 | 1.31527 | 1.34435 | 1.38299 | 1.42865 | 1.48040 | 1.53909 | 1.58681 | |
| 85-89 | 1.0 | 1.02811 | 1.04301 | 1.03939 | 1.06312 | 1.11313 | 1.18455 | 1.24375 | 1.32238 | 1.49431 | ... | 1.61645 | 1.62596 | 1.61058 | 1.52886 | 1.49925 | 1.48523 | 1.48754 | 1.50832 | 1.53980 | 1.58295 | |
| 90+ | 1.0 | 1.00750 | 1.03261 | 1.04933 | 1.07320 | 1.10290 | 1.13409 | 1.16020 | 1.16296 | 1.19697 | ... | 1.34250 | 1.40721 | 1.47710 | 1.65899 | 1.76337 | 1.82105 | 1.84684 | 1.85461 | 1.86229 | 1.88463 | |
| West Suffolk | 0-4 | 1.0 | 0.99756 | 0.99378 | 0.99074 | 0.98961 | 0.98855 | 0.98780 | 0.98764 | 0.98850 | 0.99079 | ... | 0.99944 | 1.00565 | 1.01313 | 1.02174 | 1.03128 | 1.04160 | 1.05217 | 1.06236 | 1.07165 | 1.07958 |
| 5-9 | 1.0 | 0.99914 | 1.00161 | 0.98782 | 0.98674 | 0.97791 | 0.97541 | 0.97190 | 0.96909 | 0.96799 | ... | 0.96632 | 0.96617 | 0.96693 | 0.96894 | 0.97220 | 0.97671 | 0.98235 | 0.98917 | 0.99708 | 1.00591 | |
| 10-14 | 1.0 | 0.99963 | 0.99100 | 0.98692 | 0.97459 | 0.96613 | 0.96293 | 0.96221 | 0.94826 | 0.94537 | ... | 0.93432 | 0.93087 | 0.92817 | 0.92704 | 0.92607 | 0.92541 | 0.92526 | 0.92594 | 0.92779 | 0.93082 | |
| 15-19 | 1.0 | 1.01433 | 1.03669 | 1.06387 | 1.07643 | 1.08640 | 1.08565 | 1.07440 | 1.07178 | 1.05813 | ... | 1.04511 | 1.03961 | 1.02691 | 1.02115 | 1.01325 | 1.01038 | 1.00687 | 1.00441 | 1.00321 | 1.00226 | |
| 20-24 | 1.0 | 0.99308 | 0.99321 | 1.00690 | 1.02733 | 1.05233 | 1.06834 | 1.09082 | 1.11315 | 1.12808 | ... | 1.14192 | 1.13873 | 1.13713 | 1.12522 | 1.11801 | 1.11119 | 1.10498 | 1.09070 | 1.08267 | 1.07473 | |
| 25-29 | 1.0 | 0.99339 | 0.98141 | 0.96465 | 0.94578 | 0.93361 | 0.92811 | 0.93027 | 0.94445 | 0.96516 | ... | 1.00590 | 1.02628 | 1.04468 | 1.05967 | 1.06698 | 1.06961 | 1.06729 | 1.06520 | 1.05441 | 1.04534 | |
| 30-34 | 1.0 | 0.99611 | 0.98954 | 0.97841 | 0.97631 | 0.97513 | 0.96751 | 0.95624 | 0.94035 | 0.92162 | ... | 0.90359 | 0.90626 | 0.92058 | 0.94194 | 0.96642 | 0.98433 | 1.00472 | 1.02224 | 1.03769 | 1.04444 | |
| 35-39 | 1.0 | 1.00830 | 1.00711 | 1.00960 | 1.00226 | 0.98398 | 0.97986 | 0.97299 | 0.96193 | 0.95878 | ... | 0.94787 | 0.93652 | 0.92059 | 0.90127 | 0.88902 | 0.88336 | 0.88655 | 0.90138 | 0.92369 | 0.94911 | |
| 40-44 | 1.0 | 1.00574 | 1.01460 | 1.02500 | 1.02592 | 1.04407 | 1.05346 | 1.05295 | 1.05665 | 1.05073 | ... | 1.02850 | 1.02075 | 1.00886 | 1.00480 | 1.00149 | 0.99210 | 0.97987 | 0.96279 | 0.94181 | 0.92868 | |
| 45-49 | 1.0 | 0.99583 | 1.00960 | 1.02734 | 1.06386 | 1.09081 | 1.09659 | 1.10516 | 1.11415 | 1.11531 | ... | 1.14477 | 1.14518 | 1.14974 | 1.14518 | 1.12762 | 1.12280 | 1.11391 | 1.10078 | 1.09611 | 1.09206 | |
| 50-54 | 1.0 | 0.96178 | 0.92718 | 0.88554 | 0.85050 | 0.82012 | 0.81762 | 0.82928 | 0.84510 | 0.87313 | ... | 0.89791 | 0.90388 | 0.91030 | 0.91154 | 0.92584 | 0.93506 | 0.93580 | 0.93994 | 0.93715 | 0.92401 | |
| 55-59 | 1.0 | 0.99958 | 0.99304 | 0.98556 | 0.96946 | 0.95355 | 0.92072 | 0.89021 | 0.85295 | 0.82162 | ... | 0.79460 | 0.80635 | 0.82232 | 0.84803 | 0.86697 | 0.87093 | 0.87608 | 0.88142 | 0.88288 | 0.89602 | |
| 60-64 | 1.0 | 1.03925 | 1.07281 | 1.09537 | 1.10889 | 1.11047 | 1.11151 | 1.10417 | 1.09750 | 1.08123 | ... | 1.03159 | 1.00020 | 0.96093 | 0.92790 | 0.90150 | 0.90181 | 0.91541 | 0.93387 | 0.96196 | 0.98272 | |
| 65-69 | 1.0 | 1.01367 | 1.03625 | 1.07055 | 1.10500 | 1.13735 | 1.18037 | 1.21863 | 1.24457 | 1.26062 | ... | 1.26497 | 1.25740 | 1.25147 | 1.23445 | 1.21741 | 1.18135 | 1.14840 | 1.10584 | 1.07014 | 1.04247 | |
| 70-74 | 1.0 | 0.98275 | 0.96725 | 0.96682 | 0.97974 | 0.99599 | 1.01075 | 1.03401 | 1.06843 | 1.10308 | ... | 1.17870 | 1.21691 | 1.24290 | 1.26018 | 1.26428 | 1.26623 | 1.25961 | 1.25480 | 1.23960 | 1.22300 | |
| 75-79 | 1.0 | 1.01626 | 1.02531 | 1.01825 | 0.95343 | 0.92180 | 0.90779 | 0.89574 | 0.89734 | 0.91079 | ... | 0.94232 | 0.96514 | 0.99837 | 1.03116 | 1.06275 | 1.10381 | 1.13949 | 1.16496 | 1.18217 | 1.18733 | |
| 80-84 | 1.0 | 1.05200 | 1.10849 | 1.17648 | 1.30937 | 1.38296 | 1.40809 | 1.41918 | 1.40978 | 1.32643 | ... | 1.27246 | 1.25922 | 1.26487 | 1.28693 | 1.31335 | 1.33873 | 1.37374 | 1.42349 | 1.47277 | 1.52088 | |
| 85-89 | 1.0 | 1.03983 | 1.05680 | 1.06564 | 1.09564 | 1.14142 | 1.20645 | 1.27564 | 1.35551 | 1.51460 | ... | 1.63548 | 1.65226 | 1.64282 | 1.55314 | 1.51539 | 1.50529 | 1.49740 | 1.51044 | 1.54223 | 1.58134 | |
| 90+ | 1.0 | 1.02621 | 1.06087 | 1.09780 | 1.13636 | 1.18085 | 1.22686 | 1.25600 | 1.27866 | 1.32340 | ... | 1.47519 | 1.54922 | 1.62895 | 1.80631 | 1.91627 | 1.98069 | 2.02036 | 2.04174 | 2.05451 | 2.07856 |
57 rows × 21 columns
Converting the population change factor dataframe to a dictionary for output¶
In [14]:
dict_snee_ons_factors = snee_factors_ons_projections.to_dict(orient='index')
dict_snee_ons_factors
Out[14]:
{('Ipswich and East Suffolk', '0-4'): {'2023': 1.0,
'2024': 0.99638,
'2025': 0.99166,
'2026': 0.98772,
'2027': 0.98553,
'2028': 0.98364,
'2029': 0.98201,
'2030': 0.98084,
'2031': 0.98037,
'2032': 0.98096,
'2033': 0.98279,
'2034': 0.98587,
'2035': 0.99017,
'2036': 0.99575,
'2037': 1.00261,
'2038': 1.01057,
'2039': 1.01936,
'2040': 1.02847,
'2041': 1.03732,
'2042': 1.04536,
'2043': 1.05213},
('Ipswich and East Suffolk', '5-9'): {'2023': 1.0,
'2024': 0.98186,
'2025': 0.9652,
'2026': 0.94461,
'2027': 0.93286,
'2028': 0.9236,
'2029': 0.92068,
'2030': 0.91683,
'2031': 0.91373,
'2032': 0.91209,
'2033': 0.91071,
'2034': 0.90957,
'2035': 0.90881,
'2036': 0.90867,
'2037': 0.90947,
'2038': 0.91137,
'2039': 0.9144,
'2040': 0.91851,
'2041': 0.92378,
'2042': 0.93019,
'2043': 0.93759},
('Ipswich and East Suffolk', '10-14'): {'2023': 1.0,
'2024': 0.99682,
'2025': 0.98753,
'2026': 0.97903,
'2027': 0.96628,
'2028': 0.95654,
'2029': 0.93978,
'2030': 0.92478,
'2031': 0.90588,
'2032': 0.8951,
'2033': 0.88648,
'2034': 0.88394,
'2035': 0.88052,
'2036': 0.87779,
'2037': 0.8764,
'2038': 0.87525,
'2039': 0.87433,
'2040': 0.87377,
'2041': 0.87379,
'2042': 0.8747,
'2043': 0.87664},
('Ipswich and East Suffolk', '15-19'): {'2023': 1.0,
'2024': 1.01299,
'2025': 1.03028,
'2026': 1.04302,
'2027': 1.0484,
'2028': 1.04296,
'2029': 1.03836,
'2030': 1.02874,
'2031': 1.02327,
'2032': 1.01087,
'2033': 0.99949,
'2034': 0.9818,
'2035': 0.9647,
'2036': 0.94838,
'2037': 0.93697,
'2038': 0.92976,
'2039': 0.9269,
'2040': 0.92356,
'2041': 0.92121,
'2042': 0.91987,
'2043': 0.91878},
('Ipswich and East Suffolk', '20-24'): {'2023': 1.0,
'2024': 0.98982,
'2025': 0.99081,
'2026': 1.00977,
'2027': 1.03673,
'2028': 1.06567,
'2029': 1.08405,
'2030': 1.10702,
'2031': 1.12416,
'2032': 1.13668,
'2033': 1.13758,
'2034': 1.14056,
'2035': 1.13789,
'2036': 1.1329,
'2037': 1.11838,
'2038': 1.10632,
'2039': 1.09096,
'2040': 1.07547,
'2041': 1.05614,
'2042': 1.04208,
'2043': 1.03267},
('Ipswich and East Suffolk', '25-29'): {'2023': 1.0,
'2024': 0.98967,
'2025': 0.97371,
'2026': 0.95238,
'2027': 0.9244,
'2028': 0.90834,
'2029': 0.90184,
'2030': 0.90465,
'2031': 0.9214,
'2032': 0.94583,
'2033': 0.97258,
'2034': 0.9906,
'2035': 1.01087,
'2036': 1.02707,
'2037': 1.04152,
'2038': 1.04446,
'2039': 1.04637,
'2040': 1.04421,
'2041': 1.04045,
'2042': 1.02836,
'2043': 1.01699},
('Ipswich and East Suffolk', '30-34'): {'2023': 1.0,
'2024': 0.99216,
'2025': 0.98354,
'2026': 0.97085,
'2027': 0.96452,
'2028': 0.9582,
'2029': 0.9483,
'2030': 0.93494,
'2031': 0.91664,
'2032': 0.8921,
'2033': 0.87772,
'2034': 0.87145,
'2035': 0.87413,
'2036': 0.88974,
'2037': 0.91326,
'2038': 0.93922,
'2039': 0.9574,
'2040': 0.97734,
'2041': 0.99346,
'2042': 1.00838,
'2043': 1.01227},
('Ipswich and East Suffolk', '35-39'): {'2023': 1.0,
'2024': 1.01622,
'2025': 1.01891,
'2026': 1.02434,
'2027': 1.0221,
'2028': 1.01155,
'2029': 1.00474,
'2030': 0.99585,
'2031': 0.98348,
'2032': 0.97708,
'2033': 0.97117,
'2034': 0.96154,
'2035': 0.94893,
'2036': 0.93141,
'2037': 0.90793,
'2038': 0.89402,
'2039': 0.88778,
'2040': 0.89066,
'2041': 0.90627,
'2042': 0.9301,
'2043': 0.95657},
('Ipswich and East Suffolk', '40-44'): {'2023': 1.0,
'2024': 1.00086,
'2025': 1.00137,
'2026': 1.00462,
'2027': 1.01002,
'2028': 1.02521,
'2029': 1.04107,
'2030': 1.04453,
'2031': 1.05066,
'2032': 1.0493,
'2033': 1.0391,
'2034': 1.03271,
'2035': 1.02346,
'2036': 1.01113,
'2037': 1.00462,
'2038': 0.9987,
'2039': 0.98897,
'2040': 0.9765,
'2041': 0.9591,
'2042': 0.93579,
'2043': 0.92194},
('Ipswich and East Suffolk', '45-49'): {'2023': 1.0,
'2024': 0.9938,
'2025': 1.00784,
'2026': 1.02937,
'2027': 1.05611,
'2028': 1.07345,
'2029': 1.07508,
'2030': 1.07585,
'2031': 1.07972,
'2032': 1.0854,
'2033': 1.10125,
'2034': 1.11753,
'2035': 1.12149,
'2036': 1.12832,
'2037': 1.12744,
'2038': 1.11689,
'2039': 1.11035,
'2040': 1.10053,
'2041': 1.08764,
'2042': 1.08064,
'2043': 1.07457},
('Ipswich and East Suffolk', '50-54'): {'2023': 1.0,
'2024': 0.97167,
'2025': 0.9421,
'2026': 0.90264,
'2027': 0.87088,
'2028': 0.84511,
'2029': 0.84131,
'2030': 0.85352,
'2031': 0.87141,
'2032': 0.89379,
'2033': 0.90879,
'2034': 0.91083,
'2035': 0.91209,
'2036': 0.91538,
'2037': 0.92004,
'2038': 0.93318,
'2039': 0.94618,
'2040': 0.94971,
'2041': 0.95549,
'2042': 0.9551,
'2043': 0.94636},
('Ipswich and East Suffolk', '55-59'): {'2023': 1.0,
'2024': 1.00029,
'2025': 0.99321,
'2026': 0.99035,
'2027': 0.97795,
'2028': 0.96634,
'2029': 0.94008,
'2030': 0.91348,
'2031': 0.87715,
'2032': 0.8478,
'2033': 0.82467,
'2034': 0.82205,
'2035': 0.83437,
'2036': 0.85199,
'2037': 0.87372,
'2038': 0.88866,
'2039': 0.89123,
'2040': 0.89287,
'2041': 0.8963,
'2042': 0.90075,
'2043': 0.91326},
('Ipswich and East Suffolk', '60-64'): {'2023': 1.0,
'2024': 1.0295,
'2025': 1.06148,
'2026': 1.07661,
'2027': 1.09318,
'2028': 1.09503,
'2029': 1.0952,
'2030': 1.08818,
'2031': 1.08528,
'2032': 1.07285,
'2033': 1.06032,
'2034': 1.03313,
'2035': 1.00605,
'2036': 0.96839,
'2037': 0.93789,
'2038': 0.91445,
'2039': 0.91303,
'2040': 0.92731,
'2041': 0.94724,
'2042': 0.97108,
'2043': 0.98791},
('Ipswich and East Suffolk', '65-69'): {'2023': 1.0,
'2024': 1.0162,
'2025': 1.03693,
'2026': 1.07107,
'2027': 1.08967,
'2028': 1.11527,
'2029': 1.14889,
'2030': 1.18407,
'2031': 1.20191,
'2032': 1.22044,
'2033': 1.22303,
'2034': 1.22406,
'2035': 1.21662,
'2036': 1.21375,
'2037': 1.20121,
'2038': 1.18761,
'2039': 1.15902,
'2040': 1.13042,
'2041': 1.09059,
'2042': 1.05835,
'2043': 1.03442},
('Ipswich and East Suffolk', '70-74'): {'2023': 1.0,
'2024': 0.99316,
'2025': 0.98705,
'2026': 0.98888,
'2027': 1.00966,
'2028': 1.03341,
'2029': 1.05151,
'2030': 1.07421,
'2031': 1.10985,
'2032': 1.13106,
'2033': 1.15905,
'2034': 1.19458,
'2035': 1.23117,
'2036': 1.25102,
'2037': 1.27024,
'2038': 1.274,
'2039': 1.27569,
'2040': 1.26873,
'2041': 1.26682,
'2042': 1.25485,
'2043': 1.24148},
('Ipswich and East Suffolk', '75-79'): {'2023': 1.0,
'2024': 1.02695,
'2025': 1.04713,
'2026': 1.05517,
'2027': 1.0023,
'2028': 0.97926,
'2029': 0.97372,
'2030': 0.96899,
'2031': 0.97236,
'2032': 0.99363,
'2033': 1.0182,
'2034': 1.03743,
'2035': 1.06122,
'2036': 1.09699,
'2037': 1.12006,
'2038': 1.14938,
'2039': 1.18551,
'2040': 1.22278,
'2041': 1.24368,
'2042': 1.2636,
'2043': 1.26866},
('Ipswich and East Suffolk', '80-84'): {'2023': 1.0,
'2024': 1.05266,
'2025': 1.10914,
'2026': 1.18079,
'2027': 1.3192,
'2028': 1.3917,
'2029': 1.42875,
'2030': 1.45659,
'2031': 1.46643,
'2032': 1.39659,
'2033': 1.36823,
'2034': 1.36312,
'2035': 1.35945,
'2036': 1.36741,
'2037': 1.40011,
'2038': 1.43745,
'2039': 1.46797,
'2040': 1.50407,
'2041': 1.55725,
'2042': 1.59372,
'2043': 1.63923},
('Ipswich and East Suffolk', '85-89'): {'2023': 1.0,
'2024': 1.03035,
'2025': 1.04081,
'2026': 1.04165,
'2027': 1.07405,
'2028': 1.11912,
'2029': 1.18464,
'2030': 1.25023,
'2031': 1.33168,
'2032': 1.49852,
'2033': 1.5807,
'2034': 1.62415,
'2035': 1.65293,
'2036': 1.66108,
'2037': 1.59117,
'2038': 1.56513,
'2039': 1.56647,
'2040': 1.56818,
'2041': 1.58407,
'2042': 1.62872,
'2043': 1.67801},
('Ipswich and East Suffolk', '90+'): {'2023': 1.0,
'2024': 1.0205,
'2025': 1.05386,
'2026': 1.07849,
'2027': 1.10754,
'2028': 1.14531,
'2029': 1.18303,
'2030': 1.20836,
'2031': 1.21703,
'2032': 1.26141,
'2033': 1.32495,
'2034': 1.40683,
'2035': 1.47863,
'2036': 1.55407,
'2037': 1.73912,
'2038': 1.84255,
'2039': 1.90952,
'2040': 1.95701,
'2041': 1.9872,
'2042': 2.00729,
'2043': 2.02946},
('North East Essex', '0-4'): {'2023': 1.0,
'2024': 1.00571,
'2025': 1.00978,
'2026': 1.01416,
'2027': 1.0185,
'2028': 1.02223,
'2029': 1.02576,
'2030': 1.02947,
'2031': 1.03349,
'2032': 1.03817,
'2033': 1.04388,
'2034': 1.05069,
'2035': 1.05853,
'2036': 1.06748,
'2037': 1.07746,
'2038': 1.08827,
'2039': 1.09978,
'2040': 1.11149,
'2041': 1.1228,
'2042': 1.1332,
'2043': 1.14222},
('North East Essex', '5-9'): {'2023': 1.0,
'2024': 0.989,
'2025': 0.97859,
'2026': 0.97297,
'2027': 0.96834,
'2028': 0.96532,
'2029': 0.96895,
'2030': 0.97125,
'2031': 0.97394,
'2032': 0.97681,
'2033': 0.97932,
'2034': 0.98181,
'2035': 0.98454,
'2036': 0.98767,
'2037': 0.99151,
'2038': 0.99638,
'2039': 1.00234,
'2040': 1.00932,
'2041': 1.01739,
'2042': 1.02649,
'2043': 1.03644},
('North East Essex', '10-14'): {'2023': 1.0,
'2024': 1.01435,
'2025': 1.02244,
'2026': 1.02469,
'2027': 1.01331,
'2028': 1.00763,
'2029': 0.9959,
'2030': 0.98498,
'2031': 0.97762,
'2032': 0.97169,
'2033': 0.96748,
'2034': 0.97015,
'2035': 0.97153,
'2036': 0.97334,
'2037': 0.97546,
'2038': 0.97736,
'2039': 0.97932,
'2040': 0.98158,
'2041': 0.98429,
'2042': 0.98775,
'2043': 0.99226},
('North East Essex', '15-19'): {'2023': 1.0,
'2024': 1.02622,
'2025': 1.05779,
'2026': 1.08235,
'2027': 1.11561,
'2028': 1.13161,
'2029': 1.14554,
'2030': 1.1542,
'2031': 1.15593,
'2032': 1.14302,
'2033': 1.13487,
'2034': 1.12213,
'2035': 1.11152,
'2036': 1.10058,
'2037': 1.09151,
'2038': 1.08434,
'2039': 1.08629,
'2040': 1.08651,
'2041': 1.08714,
'2042': 1.0883,
'2043': 1.08956},
('North East Essex', '20-24'): {'2023': 1.0,
'2024': 1.00031,
'2025': 1.00752,
'2026': 1.02482,
'2027': 1.05203,
'2028': 1.08188,
'2029': 1.10493,
'2030': 1.13073,
'2031': 1.15082,
'2032': 1.17646,
'2033': 1.18681,
'2034': 1.19332,
'2035': 1.196,
'2036': 1.19433,
'2037': 1.18238,
'2038': 1.17316,
'2039': 1.15743,
'2040': 1.14381,
'2041': 1.13026,
'2042': 1.11948,
'2043': 1.11193},
('North East Essex', '25-29'): {'2023': 1.0,
'2024': 0.99561,
'2025': 0.99558,
'2026': 0.98581,
'2027': 0.96934,
'2028': 0.95807,
'2029': 0.95444,
'2030': 0.95926,
'2031': 0.97393,
'2032': 0.99831,
'2033': 1.02535,
'2034': 1.04646,
'2035': 1.06903,
'2036': 1.08733,
'2037': 1.10833,
'2038': 1.11647,
'2039': 1.12284,
'2040': 1.12506,
'2041': 1.12357,
'2042': 1.11249,
'2043': 1.10358},
('North East Essex', '30-34'): {'2023': 1.0,
'2024': 1.00131,
'2025': 0.98774,
'2026': 0.9725,
'2027': 0.96267,
'2028': 0.95974,
'2029': 0.95366,
'2030': 0.95009,
'2031': 0.93886,
'2032': 0.92197,
'2033': 0.91075,
'2034': 0.9066,
'2035': 0.91105,
'2036': 0.92517,
'2037': 0.9484,
'2038': 0.97429,
'2039': 0.99442,
'2040': 1.01561,
'2041': 1.03286,
'2042': 1.05201,
'2043': 1.05923},
('North East Essex', '35-39'): {'2023': 1.0,
'2024': 1.03335,
'2025': 1.06079,
'2026': 1.09679,
'2027': 1.12051,
'2028': 1.12159,
'2029': 1.12118,
'2030': 1.10739,
'2031': 1.09153,
'2032': 1.08132,
'2033': 1.07739,
'2034': 1.06977,
'2035': 1.06384,
'2036': 1.05037,
'2037': 1.03098,
'2038': 1.01835,
'2039': 1.01343,
'2040': 1.01836,
'2041': 1.03431,
'2042': 1.06029,
'2043': 1.08934},
('North East Essex', '40-44'): {'2023': 1.0,
'2024': 1.00846,
'2025': 1.01943,
'2026': 1.02817,
'2027': 1.04268,
'2028': 1.06666,
'2029': 1.09636,
'2030': 1.11966,
'2031': 1.15072,
'2032': 1.17096,
'2033': 1.16979,
'2034': 1.1684,
'2035': 1.15496,
'2036': 1.13915,
'2037': 1.12897,
'2038': 1.12444,
'2039': 1.11597,
'2040': 1.10874,
'2041': 1.09424,
'2042': 1.07379,
'2043': 1.06063},
('North East Essex', '45-49'): {'2023': 1.0,
'2024': 1.00111,
'2025': 1.01003,
'2026': 1.03046,
'2027': 1.05068,
'2028': 1.07435,
'2029': 1.08326,
'2030': 1.09413,
'2031': 1.1025,
'2032': 1.11611,
'2033': 1.13948,
'2034': 1.16725,
'2035': 1.18807,
'2036': 1.21617,
'2037': 1.23428,
'2038': 1.23135,
'2039': 1.22916,
'2040': 1.21557,
'2041': 1.1995,
'2042': 1.18924,
'2043': 1.1843},
('North East Essex', '50-54'): {'2023': 1.0,
'2024': 0.97398,
'2025': 0.95924,
'2026': 0.93052,
'2027': 0.90756,
'2028': 0.89337,
'2029': 0.89541,
'2030': 0.90464,
'2031': 0.92351,
'2032': 0.94237,
'2033': 0.96284,
'2034': 0.97071,
'2035': 0.97987,
'2036': 0.98665,
'2037': 0.99749,
'2038': 1.01681,
'2039': 1.03873,
'2040': 1.05454,
'2041': 1.07604,
'2042': 1.0895,
'2043': 1.08571},
('North East Essex', '55-59'): {'2023': 1.0,
'2024': 1.00429,
'2025': 1.00074,
'2026': 0.99382,
'2027': 0.98571,
'2028': 0.96919,
'2029': 0.94588,
'2030': 0.9321,
'2031': 0.90585,
'2032': 0.88492,
'2033': 0.87258,
'2034': 0.8758,
'2035': 0.88607,
'2036': 0.90514,
'2037': 0.92412,
'2038': 0.94368,
'2039': 0.95144,
'2040': 0.95979,
'2041': 0.9659,
'2042': 0.97539,
'2043': 0.99277},
('North East Essex', '60-64'): {'2023': 1.0,
'2024': 1.03258,
'2025': 1.05756,
'2026': 1.08443,
'2027': 1.09641,
'2028': 1.10932,
'2029': 1.114,
'2030': 1.11041,
'2031': 1.104,
'2032': 1.09547,
'2033': 1.0786,
'2034': 1.05484,
'2035': 1.04041,
'2036': 1.0133,
'2037': 0.99184,
'2038': 0.97991,
'2039': 0.98513,
'2040': 0.99834,
'2041': 1.02039,
'2042': 1.04239,
'2043': 1.06403},
('North East Essex', '65-69'): {'2023': 1.0,
'2024': 1.02503,
'2025': 1.05532,
'2026': 1.09081,
'2027': 1.13236,
'2028': 1.16213,
'2029': 1.19949,
'2030': 1.22924,
'2031': 1.25993,
'2032': 1.27515,
'2033': 1.28971,
'2034': 1.29533,
'2035': 1.29188,
'2036': 1.28592,
'2037': 1.27673,
'2038': 1.2589,
'2039': 1.23343,
'2040': 1.21786,
'2041': 1.18853,
'2042': 1.16574,
'2043': 1.15394},
('North East Essex', '70-74'): {'2023': 1.0,
'2024': 0.97665,
'2025': 0.96923,
'2026': 0.97471,
'2027': 0.9856,
'2028': 1.0017,
'2029': 1.02723,
'2030': 1.0581,
'2031': 1.0937,
'2032': 1.1349,
'2033': 1.16584,
'2034': 1.20364,
'2035': 1.23427,
'2036': 1.26524,
'2037': 1.282,
'2038': 1.29659,
'2039': 1.3029,
'2040': 1.30022,
'2041': 1.29599,
'2042': 1.28783,
'2043': 1.27155},
('North East Essex', '75-79'): {'2023': 1.0,
'2024': 1.01976,
'2025': 1.02723,
'2026': 1.0197,
'2027': 0.9555,
'2028': 0.92645,
'2029': 0.90806,
'2030': 0.90303,
'2031': 0.90971,
'2032': 0.92186,
'2033': 0.93903,
'2034': 0.96403,
'2035': 0.99397,
'2036': 1.0282,
'2037': 1.06739,
'2038': 1.09797,
'2039': 1.13459,
'2040': 1.1646,
'2041': 1.19463,
'2042': 1.21199,
'2043': 1.22622},
('North East Essex', '80-84'): {'2023': 1.0,
'2024': 1.05828,
'2025': 1.10734,
'2026': 1.17724,
'2027': 1.32221,
'2028': 1.39704,
'2029': 1.42544,
'2030': 1.43529,
'2031': 1.42431,
'2032': 1.34132,
'2033': 1.30616,
'2034': 1.28574,
'2035': 1.28196,
'2036': 1.29457,
'2037': 1.31527,
'2038': 1.34435,
'2039': 1.38299,
'2040': 1.42865,
'2041': 1.4804,
'2042': 1.53909,
'2043': 1.58681},
('North East Essex', '85-89'): {'2023': 1.0,
'2024': 1.02811,
'2025': 1.04301,
'2026': 1.03939,
'2027': 1.06312,
'2028': 1.11313,
'2029': 1.18455,
'2030': 1.24375,
'2031': 1.32238,
'2032': 1.49431,
'2033': 1.58187,
'2034': 1.61645,
'2035': 1.62596,
'2036': 1.61058,
'2037': 1.52886,
'2038': 1.49925,
'2039': 1.48523,
'2040': 1.48754,
'2041': 1.50832,
'2042': 1.5398,
'2043': 1.58295},
('North East Essex', '90+'): {'2023': 1.0,
'2024': 1.0075,
'2025': 1.03261,
'2026': 1.04933,
'2027': 1.0732,
'2028': 1.1029,
'2029': 1.13409,
'2030': 1.1602,
'2031': 1.16296,
'2032': 1.19697,
'2033': 1.26014,
'2034': 1.3425,
'2035': 1.40721,
'2036': 1.4771,
'2037': 1.65899,
'2038': 1.76337,
'2039': 1.82105,
'2040': 1.84684,
'2041': 1.85461,
'2042': 1.86229,
'2043': 1.88463},
('West Suffolk', '0-4'): {'2023': 1.0,
'2024': 0.99756,
'2025': 0.99378,
'2026': 0.99074,
'2027': 0.98961,
'2028': 0.98855,
'2029': 0.9878,
'2030': 0.98764,
'2031': 0.9885,
'2032': 0.99079,
'2033': 0.99444,
'2034': 0.99944,
'2035': 1.00565,
'2036': 1.01313,
'2037': 1.02174,
'2038': 1.03128,
'2039': 1.0416,
'2040': 1.05217,
'2041': 1.06236,
'2042': 1.07165,
'2043': 1.07958},
('West Suffolk', '5-9'): {'2023': 1.0,
'2024': 0.99914,
'2025': 1.00161,
'2026': 0.98782,
'2027': 0.98674,
'2028': 0.97791,
'2029': 0.97541,
'2030': 0.9719,
'2031': 0.96909,
'2032': 0.96799,
'2033': 0.96701,
'2034': 0.96632,
'2035': 0.96617,
'2036': 0.96693,
'2037': 0.96894,
'2038': 0.9722,
'2039': 0.97671,
'2040': 0.98235,
'2041': 0.98917,
'2042': 0.99708,
'2043': 1.00591},
('West Suffolk', '10-14'): {'2023': 1.0,
'2024': 0.99963,
'2025': 0.991,
'2026': 0.98692,
'2027': 0.97459,
'2028': 0.96613,
'2029': 0.96293,
'2030': 0.96221,
'2031': 0.94826,
'2032': 0.94537,
'2033': 0.93678,
'2034': 0.93432,
'2035': 0.93087,
'2036': 0.92817,
'2037': 0.92704,
'2038': 0.92607,
'2039': 0.92541,
'2040': 0.92526,
'2041': 0.92594,
'2042': 0.92779,
'2043': 0.93082},
('West Suffolk', '15-19'): {'2023': 1.0,
'2024': 1.01433,
'2025': 1.03669,
'2026': 1.06387,
'2027': 1.07643,
'2028': 1.0864,
'2029': 1.08565,
'2030': 1.0744,
'2031': 1.07178,
'2032': 1.05813,
'2033': 1.05039,
'2034': 1.04511,
'2035': 1.03961,
'2036': 1.02691,
'2037': 1.02115,
'2038': 1.01325,
'2039': 1.01038,
'2040': 1.00687,
'2041': 1.00441,
'2042': 1.00321,
'2043': 1.00226},
('West Suffolk', '20-24'): {'2023': 1.0,
'2024': 0.99308,
'2025': 0.99321,
'2026': 1.0069,
'2027': 1.02733,
'2028': 1.05233,
'2029': 1.06834,
'2030': 1.09082,
'2031': 1.11315,
'2032': 1.12808,
'2033': 1.13863,
'2034': 1.14192,
'2035': 1.13873,
'2036': 1.13713,
'2037': 1.12522,
'2038': 1.11801,
'2039': 1.11119,
'2040': 1.10498,
'2041': 1.0907,
'2042': 1.08267,
'2043': 1.07473},
('West Suffolk', '25-29'): {'2023': 1.0,
'2024': 0.99339,
'2025': 0.98141,
'2026': 0.96465,
'2027': 0.94578,
'2028': 0.93361,
'2029': 0.92811,
'2030': 0.93027,
'2031': 0.94445,
'2032': 0.96516,
'2033': 0.98922,
'2034': 1.0059,
'2035': 1.02628,
'2036': 1.04468,
'2037': 1.05967,
'2038': 1.06698,
'2039': 1.06961,
'2040': 1.06729,
'2041': 1.0652,
'2042': 1.05441,
'2043': 1.04534},
('West Suffolk', '30-34'): {'2023': 1.0,
'2024': 0.99611,
'2025': 0.98954,
'2026': 0.97841,
'2027': 0.97631,
'2028': 0.97513,
'2029': 0.96751,
'2030': 0.95624,
'2031': 0.94035,
'2032': 0.92162,
'2033': 0.90949,
'2034': 0.90359,
'2035': 0.90626,
'2036': 0.92058,
'2037': 0.94194,
'2038': 0.96642,
'2039': 0.98433,
'2040': 1.00472,
'2041': 1.02224,
'2042': 1.03769,
'2043': 1.04444},
('West Suffolk', '35-39'): {'2023': 1.0,
'2024': 1.0083,
'2025': 1.00711,
'2026': 1.0096,
'2027': 1.00226,
'2028': 0.98398,
'2029': 0.97986,
'2030': 0.97299,
'2031': 0.96193,
'2032': 0.95878,
'2033': 0.95629,
'2034': 0.94787,
'2035': 0.93652,
'2036': 0.92059,
'2037': 0.90127,
'2038': 0.88902,
'2039': 0.88336,
'2040': 0.88655,
'2041': 0.90138,
'2042': 0.92369,
'2043': 0.94911},
('West Suffolk', '40-44'): {'2023': 1.0,
'2024': 1.00574,
'2025': 1.0146,
'2026': 1.025,
'2027': 1.02592,
'2028': 1.04407,
'2029': 1.05346,
'2030': 1.05295,
'2031': 1.05665,
'2032': 1.05073,
'2033': 1.03305,
'2034': 1.0285,
'2035': 1.02075,
'2036': 1.00886,
'2037': 1.0048,
'2038': 1.00149,
'2039': 0.9921,
'2040': 0.97987,
'2041': 0.96279,
'2042': 0.94181,
'2043': 0.92868},
('West Suffolk', '45-49'): {'2023': 1.0,
'2024': 0.99583,
'2025': 1.0096,
'2026': 1.02734,
'2027': 1.06386,
'2028': 1.09081,
'2029': 1.09659,
'2030': 1.10516,
'2031': 1.11415,
'2032': 1.11531,
'2033': 1.13395,
'2034': 1.14477,
'2035': 1.14518,
'2036': 1.14974,
'2037': 1.14518,
'2038': 1.12762,
'2039': 1.1228,
'2040': 1.11391,
'2041': 1.10078,
'2042': 1.09611,
'2043': 1.09206},
('West Suffolk', '50-54'): {'2023': 1.0,
'2024': 0.96178,
'2025': 0.92718,
'2026': 0.88554,
'2027': 0.8505,
'2028': 0.82012,
'2029': 0.81762,
'2030': 0.82928,
'2031': 0.8451,
'2032': 0.87313,
'2033': 0.8936,
'2034': 0.89791,
'2035': 0.90388,
'2036': 0.9103,
'2037': 0.91154,
'2038': 0.92584,
'2039': 0.93506,
'2040': 0.9358,
'2041': 0.93994,
'2042': 0.93715,
'2043': 0.92401},
('West Suffolk', '55-59'): {'2023': 1.0,
'2024': 0.99958,
'2025': 0.99304,
'2026': 0.98556,
'2027': 0.96946,
'2028': 0.95355,
'2029': 0.92072,
'2030': 0.89021,
'2031': 0.85295,
'2032': 0.82162,
'2033': 0.7954,
'2034': 0.7946,
'2035': 0.80635,
'2036': 0.82232,
'2037': 0.84803,
'2038': 0.86697,
'2039': 0.87093,
'2040': 0.87608,
'2041': 0.88142,
'2042': 0.88288,
'2043': 0.89602},
('West Suffolk', '60-64'): {'2023': 1.0,
'2024': 1.03925,
'2025': 1.07281,
'2026': 1.09537,
'2027': 1.10889,
'2028': 1.11047,
'2029': 1.11151,
'2030': 1.10417,
'2031': 1.0975,
'2032': 1.08123,
'2033': 1.06518,
'2034': 1.03159,
'2035': 1.0002,
'2036': 0.96093,
'2037': 0.9279,
'2038': 0.9015,
'2039': 0.90181,
'2040': 0.91541,
'2041': 0.93387,
'2042': 0.96196,
'2043': 0.98272},
('West Suffolk', '65-69'): {'2023': 1.0,
'2024': 1.01367,
'2025': 1.03625,
'2026': 1.07055,
'2027': 1.105,
'2028': 1.13735,
'2029': 1.18037,
'2030': 1.21863,
'2031': 1.24457,
'2032': 1.26062,
'2033': 1.26395,
'2034': 1.26497,
'2035': 1.2574,
'2036': 1.25147,
'2037': 1.23445,
'2038': 1.21741,
'2039': 1.18135,
'2040': 1.1484,
'2041': 1.10584,
'2042': 1.07014,
'2043': 1.04247},
('West Suffolk', '70-74'): {'2023': 1.0,
'2024': 0.98275,
'2025': 0.96725,
'2026': 0.96682,
'2027': 0.97974,
'2028': 0.99599,
'2029': 1.01075,
'2030': 1.03401,
'2031': 1.06843,
'2032': 1.10308,
'2033': 1.13576,
'2034': 1.1787,
'2035': 1.21691,
'2036': 1.2429,
'2037': 1.26018,
'2038': 1.26428,
'2039': 1.26623,
'2040': 1.25961,
'2041': 1.2548,
'2042': 1.2396,
'2043': 1.223},
('West Suffolk', '75-79'): {'2023': 1.0,
'2024': 1.01626,
'2025': 1.02531,
'2026': 1.01825,
'2027': 0.95343,
'2028': 0.9218,
'2029': 0.90779,
'2030': 0.89574,
'2031': 0.89734,
'2032': 0.91079,
'2033': 0.92685,
'2034': 0.94232,
'2035': 0.96514,
'2036': 0.99837,
'2037': 1.03116,
'2038': 1.06275,
'2039': 1.10381,
'2040': 1.13949,
'2041': 1.16496,
'2042': 1.18217,
'2043': 1.18733},
('West Suffolk', '80-84'): {'2023': 1.0,
'2024': 1.052,
'2025': 1.10849,
'2026': 1.17648,
'2027': 1.30937,
'2028': 1.38296,
'2029': 1.40809,
'2030': 1.41918,
'2031': 1.40978,
'2032': 1.32643,
'2033': 1.2867,
'2034': 1.27246,
'2035': 1.25922,
'2036': 1.26487,
'2037': 1.28693,
'2038': 1.31335,
'2039': 1.33873,
'2040': 1.37374,
'2041': 1.42349,
'2042': 1.47277,
'2043': 1.52088},
('West Suffolk', '85-89'): {'2023': 1.0,
'2024': 1.03983,
'2025': 1.0568,
'2026': 1.06564,
'2027': 1.09564,
'2028': 1.14142,
'2029': 1.20645,
'2030': 1.27564,
'2031': 1.35551,
'2032': 1.5146,
'2033': 1.60627,
'2034': 1.63548,
'2035': 1.65226,
'2036': 1.64282,
'2037': 1.55314,
'2038': 1.51539,
'2039': 1.50529,
'2040': 1.4974,
'2041': 1.51044,
'2042': 1.54223,
'2043': 1.58134},
('West Suffolk', '90+'): {'2023': 1.0,
'2024': 1.02621,
'2025': 1.06087,
'2026': 1.0978,
'2027': 1.13636,
'2028': 1.18085,
'2029': 1.22686,
'2030': 1.256,
'2031': 1.27866,
'2032': 1.3234,
'2033': 1.38922,
'2034': 1.47519,
'2035': 1.54922,
'2036': 1.62895,
'2037': 1.80631,
'2038': 1.91627,
'2039': 1.98069,
'2040': 2.02036,
'2041': 2.04174,
'2042': 2.05451,
'2043': 2.07856}}
Creating GP Projections dataframe¶
- by Multiplying each year's projection factor from ONS Projections with the number of patients from GP list
In [15]:
#Using the Inner join to join both the dataframes
snee_gp_projections = snee_factors_ons_projections.join(snee_gp_patients_reg['NUMBER_OF_PATIENTS'])
#Select the columns we want to multiply with
columns_to_multiply_by = snee_gp_projections.iloc[:, 0:21]
# Multiply the selected columns by the chosen column
result_columns = columns_to_multiply_by.multiply(snee_gp_projections['NUMBER_OF_PATIENTS'], axis=0).round(2)
#Final dataframe for GP Projections SNEE
snee_gp_projections = pd.concat([result_columns], axis=1)
snee_gp_projections.head()
Out[15]:
| 2023 | 2024 | 2025 | 2026 | 2027 | 2028 | 2029 | 2030 | 2031 | 2032 | ... | 2034 | 2035 | 2036 | 2037 | 2038 | 2039 | 2040 | 2041 | 2042 | 2043 | ||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| AREA_CODE | AGE_GROUP_5 | |||||||||||||||||||||
| Ipswich and East Suffolk | 0-4 | 18148.0 | 18082.30 | 17996.65 | 17925.14 | 17885.40 | 17851.10 | 17821.52 | 17800.28 | 17791.75 | 17802.46 | ... | 17891.57 | 17969.61 | 18070.87 | 18195.37 | 18339.82 | 18499.35 | 18664.67 | 18825.28 | 18971.19 | 19094.06 |
| 5-9 | 22318.0 | 21913.15 | 21541.33 | 21081.81 | 20819.57 | 20612.90 | 20547.74 | 20461.81 | 20392.63 | 20356.02 | ... | 20299.78 | 20282.82 | 20279.70 | 20297.55 | 20339.96 | 20407.58 | 20499.31 | 20616.92 | 20759.98 | 20925.13 | |
| 10-14 | 24231.0 | 24153.95 | 23928.84 | 23722.88 | 23413.93 | 23177.92 | 22771.81 | 22408.34 | 21950.38 | 21689.17 | ... | 21418.75 | 21335.88 | 21269.73 | 21236.05 | 21208.18 | 21185.89 | 21172.32 | 21172.81 | 21194.86 | 21241.86 | |
| 15-19 | 23513.0 | 23818.43 | 24224.97 | 24524.53 | 24651.03 | 24523.12 | 24414.96 | 24188.76 | 24060.15 | 23768.59 | ... | 23085.06 | 22682.99 | 22299.26 | 22030.98 | 21861.45 | 21794.20 | 21715.67 | 21660.41 | 21628.90 | 21603.27 | |
| 20-24 | 19718.0 | 19517.27 | 19536.79 | 19910.64 | 20442.24 | 21012.88 | 21375.30 | 21828.22 | 22166.19 | 22413.06 | ... | 22489.56 | 22436.92 | 22338.52 | 22052.22 | 21814.42 | 21511.55 | 21206.12 | 20824.97 | 20547.73 | 20362.19 |
5 rows × 21 columns
Creating visuals between ONS vs GP Projections(ONS projection factors*patients from GP list)¶
In [16]:
# Combining the ONS and GP dataframe such that an extra column is added with information of type of projection (this dataset will be used to plot barplots)
snee_ons_projections['source'] = 'ONS Projection'
snee_gp_projections['source'] = 'GP List Projection'
combined_df_2 = pd.concat([snee_ons_projections, snee_gp_projections], axis=0)
combined_df_2 = combined_df_2.reset_index()
combined_df_2['Area & projection'] = combined_df_2['AREA_CODE'] + " " + combined_df_2['source']
# Simply Combining the ONS and GP projections dataframe (this dataset will be used to plot lineplots and pyramids)
combined_df = snee_ons_projections.merge(snee_gp_projections, left_index=True, right_index=True, suffixes=('-ONS_Projection','-GP_Projection'))
Lineplot Barplots and Pyramid plot between 2023: ONS Projections VS GP list Projections¶
In [17]:
colors=['#003087', '#DA291C', '#78BE20']
#Plotting the Pyramid plot
plt.subplots(figsize=(15,6))
plt.xlabel('Age Group')
plt.ylabel('Population (persons)')
plt.title('GP(left) and ONS(right) Projections for 2023 - (SNEE ICB)')
#Creating a negative 2023 GP Projection column for plotting on pyramid
combined_df['N-2023-GP_Projection'] = -combined_df['2023-GP_Projection']
sns.barplot(x='2023-ONS_Projection', y='AGE_GROUP_5',hue='AREA_CODE', data=combined_df)
sns.barplot(x='N-2023-GP_Projection', y='AGE_GROUP_5',hue='AREA_CODE', data=combined_df, palette=colors)
plt.grid(True, linestyle='--', alpha=0.5)
plt.legend(loc='upper right')
plt.savefig(f'outputs/plots/{plot_counter.plot_name}.jpg', dpi=300)
#Plotting the Line PLot
plt.figure(figsize=(15,6))
plt.xlabel('Age Group')
plt.ylabel('Population (persons)')
plt.title('GP(:) and ONS(-) Projections for 2023 - (SNEE ICB)')
sns.lineplot(data=combined_df, x='AGE_GROUP_5', y='2023-ONS_Projection', hue='AREA_CODE')
sns.lineplot(data=combined_df, x='AGE_GROUP_5', y='2023-GP_Projection', hue='AREA_CODE', linestyle=':')
plt.grid(True, linestyle='--', alpha=0.5)
plt.legend(loc='upper right')
plt.savefig(f'outputs/plots/{plot_counter.plot_name}.jpg', dpi=300)
- We can see that ONS-Projections are close with GP-Patients list at older age groups for all 3 sub icb's
- For all 3 sub-icb's between age 20-24 to 45-49 the ONS-Projections are significantly lower that GP Patients list.
- For West Suffolk the GP Patients list are higher than ONS Projections except when the population is in age bands 0-4 and 90+
In [18]:
#Function to plot Barplot for each Sub Icb under SNEE separately
def bar_plots_pyramids(df_:pd.DataFrame, year:int)->None:
fig, axes = plt.subplots(3, figsize=(15,15))
for index, area in enumerate(df_.AREA_CODE.unique()):
sub_df = df_.loc[df_['AREA_CODE']==area].copy()
sns.barplot(sub_df, x='AGE_GROUP_5', y=str(year), hue='source', ax=axes[index], width=0.6)
axes[index].set_title(f"ONS Projection and GP Projection demographics: {area}, {year}")
axes[index].set_xlabel(f"Age group")
axes[index].set_ylabel(f"Population (persons)")
plt.savefig(f'outputs/plots/{plot_counter.plot_name}.jpg', dpi=300)
for i in [2023]:
bar_plots_pyramids(combined_df_2,i)
plt.show()
Lineplot Barplots and Pyramid plot between 2033: ONS Projections VS GP list Projections¶
In [19]:
#Plotting the pyramid plot
plt.figure(figsize=(15,6))
plt.xlabel('Population (persons)')
plt.ylabel('Age Group')
plt.title('GP(left) and ONS(right) Projections for 2033 - (SNEE ICB)')
#Creating a negative 2033 GP Projection column for plotting on pyramid
combined_df['N-2033-GP_Projection'] = -combined_df['2033-GP_Projection']
sns.barplot(x='2033-ONS_Projection', y='AGE_GROUP_5',hue='AREA_CODE', data=combined_df)
sns.barplot(x='N-2033-GP_Projection', y='AGE_GROUP_5',hue='AREA_CODE', data=combined_df, palette=colors)
plt.grid(True, linestyle='--', alpha=0.7)
plt.savefig(f'outputs/plots/{plot_counter.plot_name}.jpg', dpi=300)
#Plotting the lineplot
plt.figure(figsize=(15,6))
plt.xlabel('Age Group')
plt.ylabel('Population (persons)')
plt.title('GP(:) and ONS(-) Projections for 2033 - (SNEE ICB)')
sns.lineplot(data=combined_df, x='AGE_GROUP_5', y='2033-ONS_Projection', hue='AREA_CODE')
sns.lineplot(data=combined_df, x='AGE_GROUP_5', y='2033-GP_Projection', hue='AREA_CODE', linestyle=':')
plt.grid(True, linestyle='--', alpha=0.5)
plt.savefig(f'outputs/plots/{plot_counter.plot_name}.jpg', dpi=300)
- For North East Essex the GP Projections are very close to the ONS Projections from age group 0-4 to 20-24 and varies after than until almost collides from age group 65-69 until 90+
- For Ipswich and East Suffolk the GP projections are slightly lower than the ONS Projections from age group 50-54 until 90+
- For West Suffolk the GP Projections are higher than ONS Projections except when the population is in age bands 0-4 and 90+
In [20]:
#Function to plot Barplot for each Sub Icb under SNEE separately
def bar_plots_pyramids(df_:pd.DataFrame, year:int)->None:
fig, axes = plt.subplots(3, figsize=(15,15))
for index, area in enumerate(df_.AREA_CODE.unique()):
sub_df = df_.loc[df_['AREA_CODE']==area].copy()
sns.barplot(sub_df, x='AGE_GROUP_5', y=str(year), hue='source', ax=axes[index], width=0.6)
axes[index].set_title(f"ONS Projection and GP Projection demographics: {area}, {year}")
axes[index].set_xlabel(f"Age group")
axes[index].set_ylabel(f"Population (persons)")
plt.savefig(f'outputs/plots/{plot_counter.plot_name}.jpg', dpi=300)
for i in [2033]:
bar_plots_pyramids(combined_df_2,i)
plt.show()
Lineplot Barplots and Pyramid plot between 2023 and 2033 GP list Projections¶
In [21]:
#Plotting the pyramid plot
plt.figure(figsize=(15,6))
plt.xlabel('Population (person)')
plt.ylabel('Age Group')
plt.title('GP Projections for 2023(left) and 2033(right) - (SNEE ICB)')
sns.barplot(x='N-2023-GP_Projection', y='AGE_GROUP_5',hue='AREA_CODE', data=combined_df, palette=colors)
sns.barplot(x='2033-GP_Projection', y='AGE_GROUP_5',hue='AREA_CODE', data=combined_df)
plt.grid(True, linestyle='--', alpha=0.5)
plt.savefig(f'outputs/plots/{plot_counter.plot_name}.jpg', dpi=300)
#Plotting the linplot
plt.figure(figsize=(15,6))
plt.xlabel('Age Group')
plt.ylabel('Population (persons)')
plt.title('GP Projections for 2023(-) and 2033(:) - (SNEE ICB)')
sns.lineplot(data=combined_df, x='AGE_GROUP_5', y='2023-GP_Projection', hue='AREA_CODE')
sns.lineplot(data=combined_df, x='AGE_GROUP_5', y='2033-GP_Projection', hue='AREA_CODE', linestyle=':')
plt.grid(True, linestyle='--', alpha=0.5)
plt.savefig(f'outputs/plots/{plot_counter.plot_name}.jpg', dpi=300)
- The peak for GP_Projections 2033 in West suffolk and Ipswich & East Suffolk is at 65-69 and the peak for year 2023 is at 55-59, which is expected as we are comparing 10 years difference in projections
- The overall population projection is pointing towards the population getting older and confined to older age bands
Lineplot Barplots and Pyramid plot between 2023 and 2033 ONS Projections¶
In [22]:
#Plotting the Pyramid plot
fig, ax = plt.subplots(figsize=(15,6))
plt.xlabel('Population (persons)')
plt.ylabel('Age Group')
plt.title('ONS Projections for 2023(left) and 2033(right) - (SNEE ICB)')
combined_df['N-2023-ONS_Projection'] = -combined_df['2023-ONS_Projection']
sns.barplot(x='N-2023-ONS_Projection', y='AGE_GROUP_5', hue='AREA_CODE', data=combined_df, palette=colors)
sns.barplot(x='2033-ONS_Projection', y='AGE_GROUP_5', hue='AREA_CODE', data=combined_df)
plt.grid(True, linestyle='--', alpha=0.5)
plt.savefig(f'outputs/plots/{plot_counter.plot_name}.jpg', dpi=300)
#Plotting the lineplot
plt.figure(figsize=(15,6))
plt.xlabel('Age Group')
plt.ylabel('Population (persons)')
plt.title('ONS Projections for 2023(-) and 2033(:) - (SNEE ICB)')
sns.lineplot(data=combined_df, x='AGE_GROUP_5', y='2023-ONS_Projection', hue='AREA_CODE')
sns.lineplot(data=combined_df, x='AGE_GROUP_5', y='2033-ONS_Projection', hue='AREA_CODE', linestyle=':')
plt.grid(True, linestyle='--', alpha=0.5)
plt.savefig(f'outputs/plots/{plot_counter.plot_name}.jpg', dpi=300)
Implementing the same for other ONS scenarios¶
In [23]:
#Creating bins and labels for AGE_BANDS
bins = [-1,4,9,14,19,24,29,34,39,44,49,54,59,64,69,74,79,84,89,float('inf')]
labels = ['0-4','5-9','10-14','15-19','20-24','25-29','30-34','35-39','40-44','45-49','50-54','55-59','60-64','65-69','70-74','75-79','80-84','85-89','90+']
def generate_factors(df):
#Filtering the dataset to remove values corresponding to 'All ages' in the 'AGE_GROUP' column and dropping the unused columns
ons_projections_df = ons_projections.loc[ons_projections['AGE_GROUP']!='All ages'].drop(columns=['AREA_NAME','COMPONENT','SEX','2018','2019','2020','2021','2022']).set_index('AREA_CODE')
#Replacing '90 and over' with 90 in age column
ons_projections_df['AGE_GROUP'] = ons_projections_df['AGE_GROUP'].replace('90 and over', 90)
#Converting AGE_GROUP data type to int
ons_projections_df['AGE_GROUP'] = ons_projections_df['AGE_GROUP'].astype(int)
#Adding the column for Age Bands as 'AGE_GROUP_5'
ons_projections_df['AGE_GROUP_5'] = pd.cut(ons_projections_df['AGE_GROUP'], bins=bins, labels=labels)
#Filtering the data to keep only SNEE ICB
required_icb = ['E38000086','E38000204','E38000117']
snee_ons_projections = ons_projections_df[ons_projections_df.index.isin(required_icb)].groupby(['AREA_CODE', 'AGE_GROUP_5']).sum().drop(columns=['AGE_GROUP'])
#Calculating the population change factor for all years keeping 2023 as baseline
pop_baseline = snee_ons_projections['2023']
snee_factors_ons_projections = snee_ons_projections.div(pop_baseline, axis=0).round(5)
return snee_factors_ons_projections
ons_projection_catalog_entry = catalog.scenario_data_sources[0].scenarios[1]
ons_projections = ons_projection_catalog_entry.load()
print(ons_projection_catalog_entry.zip_file.namelist())
print(ons_projections.shape)
df = generate_factors(ons_projections)
df.head()
['2018 SNPP CCG pop females.csv', '2018 SNPP CCG pop males.csv', '2018 SNPP CCG pop persons.csv', 'SNPP Z2 10year CCG Pop_read me.txt'] (17940, 31)
/tmp/ipykernel_8500/698482157.py:21: FutureWarning: The default of observed=False is deprecated and will be changed to True in a future version of pandas. Pass observed=False to retain current behavior or observed=True to adopt the future default and silence this warning. snee_ons_projections = ons_projections_df[ons_projections_df.index.isin(required_icb)].groupby(['AREA_CODE', 'AGE_GROUP_5']).sum().drop(columns=['AGE_GROUP'])
Out[23]:
| 2023 | 2024 | 2025 | 2026 | 2027 | 2028 | 2029 | 2030 | 2031 | 2032 | ... | 2034 | 2035 | 2036 | 2037 | 2038 | 2039 | 2040 | 2041 | 2042 | 2043 | ||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| AREA_CODE | AGE_GROUP_5 | |||||||||||||||||||||
| E38000086 | 0-4 | 1.0 | 0.99659 | 0.99204 | 0.98878 | 0.98650 | 0.98523 | 0.98434 | 0.98415 | 0.98467 | 0.98661 | ... | 0.99398 | 0.99947 | 1.00618 | 1.01409 | 1.02303 | 1.03270 | 1.04258 | 1.05207 | 1.06065 | 1.06787 |
| 5-9 | 1.0 | 0.98353 | 0.96815 | 0.94827 | 0.93735 | 0.92840 | 0.92540 | 0.92151 | 0.91872 | 0.91686 | ... | 0.91524 | 0.91517 | 0.91577 | 0.91762 | 0.92048 | 0.92449 | 0.92957 | 0.93577 | 0.94306 | 0.95130 | |
| 10-14 | 1.0 | 0.99722 | 0.98855 | 0.98102 | 0.96943 | 0.96092 | 0.94544 | 0.93135 | 0.91288 | 0.90262 | ... | 0.89143 | 0.88787 | 0.88533 | 0.88370 | 0.88289 | 0.88237 | 0.88240 | 0.88304 | 0.88485 | 0.88762 | |
| 15-19 | 1.0 | 1.01346 | 1.03126 | 1.04401 | 1.04982 | 1.04466 | 1.04070 | 1.03174 | 1.02728 | 1.01600 | ... | 0.98928 | 0.97322 | 0.95704 | 0.94608 | 0.93862 | 0.93562 | 0.93218 | 0.92993 | 0.92850 | 0.92779 | |
| 20-24 | 1.0 | 0.99091 | 0.99216 | 1.01261 | 1.04085 | 1.07082 | 1.08994 | 1.11386 | 1.13118 | 1.14427 | ... | 1.14872 | 1.14627 | 1.14225 | 1.12874 | 1.11764 | 1.10302 | 1.08807 | 1.06888 | 1.05531 | 1.04607 |
5 rows × 21 columns
In [24]:
#Converting to Dictionary
dict_data = df.to_dict(orient='index')
dict_data
Out[24]:
{('E38000086', '0-4'): {'2023': 1.0,
'2024': 0.99659,
'2025': 0.99204,
'2026': 0.98878,
'2027': 0.9865,
'2028': 0.98523,
'2029': 0.98434,
'2030': 0.98415,
'2031': 0.98467,
'2032': 0.98661,
'2033': 0.98966,
'2034': 0.99398,
'2035': 0.99947,
'2036': 1.00618,
'2037': 1.01409,
'2038': 1.02303,
'2039': 1.0327,
'2040': 1.04258,
'2041': 1.05207,
'2042': 1.06065,
'2043': 1.06787},
('E38000086', '5-9'): {'2023': 1.0,
'2024': 0.98353,
'2025': 0.96815,
'2026': 0.94827,
'2027': 0.93735,
'2028': 0.9284,
'2029': 0.9254,
'2030': 0.92151,
'2031': 0.91872,
'2032': 0.91686,
'2033': 0.91588,
'2034': 0.91524,
'2035': 0.91517,
'2036': 0.91577,
'2037': 0.91762,
'2038': 0.92048,
'2039': 0.92449,
'2040': 0.92957,
'2041': 0.93577,
'2042': 0.94306,
'2043': 0.9513},
('E38000086', '10-14'): {'2023': 1.0,
'2024': 0.99722,
'2025': 0.98855,
'2026': 0.98102,
'2027': 0.96943,
'2028': 0.96092,
'2029': 0.94544,
'2030': 0.93135,
'2031': 0.91288,
'2032': 0.90262,
'2033': 0.89412,
'2034': 0.89143,
'2035': 0.88787,
'2036': 0.88533,
'2037': 0.8837,
'2038': 0.88289,
'2039': 0.88237,
'2040': 0.8824,
'2041': 0.88304,
'2042': 0.88485,
'2043': 0.88762},
('E38000086', '15-19'): {'2023': 1.0,
'2024': 1.01346,
'2025': 1.03126,
'2026': 1.04401,
'2027': 1.04982,
'2028': 1.04466,
'2029': 1.0407,
'2030': 1.03174,
'2031': 1.02728,
'2032': 1.016,
'2033': 1.00566,
'2034': 0.98928,
'2035': 0.97322,
'2036': 0.95704,
'2037': 0.94608,
'2038': 0.93862,
'2039': 0.93562,
'2040': 0.93218,
'2041': 0.92993,
'2042': 0.9285,
'2043': 0.92779},
('E38000086', '20-24'): {'2023': 1.0,
'2024': 0.99091,
'2025': 0.99216,
'2026': 1.01261,
'2027': 1.04085,
'2028': 1.07082,
'2029': 1.08994,
'2030': 1.11386,
'2031': 1.13118,
'2032': 1.14427,
'2033': 1.14548,
'2034': 1.14872,
'2035': 1.14627,
'2036': 1.14225,
'2037': 1.12874,
'2038': 1.11764,
'2039': 1.10302,
'2040': 1.08807,
'2041': 1.06888,
'2042': 1.05531,
'2043': 1.04607},
('E38000086', '25-29'): {'2023': 1.0,
'2024': 0.99337,
'2025': 0.98072,
'2026': 0.96163,
'2027': 0.9345,
'2028': 0.91984,
'2029': 0.91369,
'2030': 0.91678,
'2031': 0.93492,
'2032': 0.9606,
'2033': 0.98845,
'2034': 1.0072,
'2035': 1.02841,
'2036': 1.045,
'2037': 1.05988,
'2038': 1.06302,
'2039': 1.0652,
'2040': 1.06318,
'2041': 1.05987,
'2042': 1.04824,
'2043': 1.03732},
('E38000086', '30-34'): {'2023': 1.0,
'2024': 0.99298,
'2025': 0.98606,
'2026': 0.97515,
'2027': 0.97132,
'2028': 0.96649,
'2029': 0.95912,
'2030': 0.94761,
'2031': 0.9303,
'2032': 0.90566,
'2033': 0.89199,
'2034': 0.886,
'2035': 0.88896,
'2036': 0.90586,
'2037': 0.9306,
'2038': 0.95773,
'2039': 0.97662,
'2040': 0.99748,
'2041': 1.01414,
'2042': 1.02955,
'2043': 1.03361},
('E38000086', '35-39'): {'2023': 1.0,
'2024': 1.01577,
'2025': 1.01791,
'2026': 1.02295,
'2027': 1.02034,
'2028': 1.01031,
'2029': 1.00379,
'2030': 0.99618,
'2031': 0.98517,
'2032': 0.98086,
'2033': 0.97618,
'2034': 0.96849,
'2035': 0.95713,
'2036': 0.94021,
'2037': 0.91641,
'2038': 0.90293,
'2039': 0.89688,
'2040': 0.89994,
'2041': 0.91667,
'2042': 0.9416,
'2043': 0.96911},
('E38000086', '40-44'): {'2023': 1.0,
'2024': 0.99938,
'2025': 0.99851,
'2026': 0.99986,
'2027': 1.00378,
'2028': 1.01772,
'2029': 1.03313,
'2030': 1.03586,
'2031': 1.04139,
'2032': 1.0395,
'2033': 1.02967,
'2034': 1.02351,
'2035': 1.01545,
'2036': 1.00432,
'2037': 0.99968,
'2038': 0.99496,
'2039': 0.9869,
'2040': 0.97554,
'2041': 0.95874,
'2042': 0.93519,
'2043': 0.92171},
('E38000086', '45-49'): {'2023': 1.0,
'2024': 0.99549,
'2025': 1.01069,
'2026': 1.03319,
'2027': 1.06031,
'2028': 1.07726,
'2029': 1.07742,
'2030': 1.0769,
'2031': 1.07903,
'2032': 1.08326,
'2033': 1.09801,
'2034': 1.1139,
'2035': 1.11708,
'2036': 1.12338,
'2037': 1.12188,
'2038': 1.11157,
'2039': 1.10524,
'2040': 1.09658,
'2041': 1.08481,
'2042': 1.07964,
'2043': 1.07467},
('E38000086', '50-54'): {'2023': 1.0,
'2024': 0.97143,
'2025': 0.94202,
'2026': 0.90303,
'2027': 0.87198,
'2028': 0.84683,
'2029': 0.84415,
'2030': 0.85724,
'2031': 0.87595,
'2032': 0.89876,
'2033': 0.91354,
'2034': 0.9144,
'2035': 0.91459,
'2036': 0.91652,
'2037': 0.92009,
'2038': 0.93249,
'2039': 0.9453,
'2040': 0.94825,
'2041': 0.95365,
'2042': 0.95277,
'2043': 0.94418},
('E38000086', '55-59'): {'2023': 1.0,
'2024': 0.99966,
'2025': 0.9917,
'2026': 0.98856,
'2027': 0.97576,
'2028': 0.9639,
'2029': 0.93734,
'2030': 0.91074,
'2031': 0.87462,
'2032': 0.84576,
'2033': 0.823,
'2034': 0.82117,
'2035': 0.8342,
'2036': 0.8525,
'2037': 0.87458,
'2038': 0.88927,
'2039': 0.89076,
'2040': 0.89138,
'2041': 0.89362,
'2042': 0.89712,
'2043': 0.909},
('E38000086', '60-64'): {'2023': 1.0,
'2024': 1.03033,
'2025': 1.06336,
'2026': 1.07891,
'2027': 1.09617,
'2028': 1.09773,
'2029': 1.09738,
'2030': 1.08951,
'2031': 1.08636,
'2032': 1.07355,
'2033': 1.06074,
'2034': 1.03305,
'2035': 1.00573,
'2036': 0.96798,
'2037': 0.93776,
'2038': 0.91452,
'2039': 0.91385,
'2040': 0.92899,
'2041': 0.9497,
'2042': 0.97401,
'2043': 0.99065},
('E38000086', '65-69'): {'2023': 1.0,
'2024': 1.01517,
'2025': 1.03511,
'2026': 1.06859,
'2027': 1.08696,
'2028': 1.11303,
'2029': 1.14756,
'2030': 1.18404,
'2031': 1.20239,
'2032': 1.22159,
'2033': 1.22397,
'2034': 1.22465,
'2035': 1.21651,
'2036': 1.21359,
'2037': 1.20062,
'2038': 1.1868,
'2039': 1.1577,
'2040': 1.12875,
'2041': 1.08867,
'2042': 1.05667,
'2043': 1.03283},
('E38000086', '70-74'): {'2023': 1.0,
'2024': 0.99289,
'2025': 0.98606,
'2026': 0.98762,
'2027': 1.00755,
'2028': 1.03057,
'2029': 1.04764,
'2030': 1.06949,
'2031': 1.10447,
'2032': 1.12524,
'2033': 1.15361,
'2034': 1.19007,
'2035': 1.22809,
'2036': 1.24833,
'2037': 1.26833,
'2038': 1.27192,
'2039': 1.27335,
'2040': 1.26575,
'2041': 1.26375,
'2042': 1.25136,
'2043': 1.23787},
('E38000086', '75-79'): {'2023': 1.0,
'2024': 1.02702,
'2025': 1.04735,
'2026': 1.05525,
'2027': 1.00184,
'2028': 0.97796,
'2029': 0.97229,
'2030': 0.96691,
'2031': 0.96984,
'2032': 0.99047,
'2033': 1.01449,
'2034': 1.03262,
'2035': 1.05543,
'2036': 1.09066,
'2037': 1.11316,
'2038': 1.14283,
'2039': 1.17981,
'2040': 1.2185,
'2041': 1.23977,
'2042': 1.26041,
'2043': 1.26522},
('E38000086', '80-84'): {'2023': 1.0,
'2024': 1.05246,
'2025': 1.10923,
'2026': 1.18072,
'2027': 1.32,
'2028': 1.39305,
'2029': 1.43008,
'2030': 1.45819,
'2031': 1.46802,
'2032': 1.39737,
'2033': 1.36795,
'2034': 1.36266,
'2035': 1.35823,
'2036': 1.36549,
'2037': 1.39735,
'2038': 1.43398,
'2039': 1.46306,
'2040': 1.49777,
'2041': 1.55039,
'2042': 1.58615,
'2043': 1.63226},
('E38000086', '85-89'): {'2023': 1.0,
'2024': 1.03073,
'2025': 1.04112,
'2026': 1.04202,
'2027': 1.07463,
'2028': 1.11988,
'2029': 1.18532,
'2030': 1.25114,
'2031': 1.33227,
'2032': 1.50004,
'2033': 1.58296,
'2034': 1.62661,
'2035': 1.6557,
'2036': 1.66395,
'2037': 1.59346,
'2038': 1.56629,
'2039': 1.56764,
'2040': 1.56861,
'2041': 1.58373,
'2042': 1.62763,
'2043': 1.67617},
('E38000086', '90+'): {'2023': 1.0,
'2024': 1.01965,
'2025': 1.05227,
'2026': 1.07711,
'2027': 1.10467,
'2028': 1.14206,
'2029': 1.17994,
'2030': 1.20509,
'2031': 1.21397,
'2032': 1.25819,
'2033': 1.32134,
'2034': 1.40287,
'2035': 1.47453,
'2036': 1.54938,
'2037': 1.7344,
'2038': 1.83792,
'2039': 1.90481,
'2040': 1.95254,
'2041': 1.98238,
'2042': 2.00205,
'2043': 2.02341},
('E38000117', '0-4'): {'2023': 1.0,
'2024': 1.00128,
'2025': 0.99974,
'2026': 0.99845,
'2027': 0.99837,
'2028': 0.99929,
'2029': 1.00035,
'2030': 1.00257,
'2031': 1.0057,
'2032': 1.00965,
'2033': 1.01459,
'2034': 1.02088,
'2035': 1.02838,
'2036': 1.03717,
'2037': 1.04718,
'2038': 1.05815,
'2039': 1.06986,
'2040': 1.08182,
'2041': 1.09339,
'2042': 1.104,
'2043': 1.11319},
('E38000117', '5-9'): {'2023': 1.0,
'2024': 0.98679,
'2025': 0.97482,
'2026': 0.96759,
'2027': 0.9612,
'2028': 0.95538,
'2029': 0.9559,
'2030': 0.95427,
'2031': 0.95304,
'2032': 0.95291,
'2033': 0.95365,
'2034': 0.95449,
'2035': 0.95632,
'2036': 0.95899,
'2037': 0.96248,
'2038': 0.96695,
'2039': 0.97272,
'2040': 0.97961,
'2041': 0.98771,
'2042': 0.99695,
'2043': 1.00711},
('E38000117', '10-14'): {'2023': 1.0,
'2024': 1.01234,
'2025': 1.01879,
'2026': 1.01918,
'2027': 1.00562,
'2028': 0.99824,
'2029': 0.9851,
'2030': 0.97322,
'2031': 0.96485,
'2032': 0.95772,
'2033': 0.9514,
'2034': 0.9516,
'2035': 0.9499,
'2036': 0.94868,
'2037': 0.94853,
'2038': 0.94921,
'2039': 0.94998,
'2040': 0.95165,
'2041': 0.95413,
'2042': 0.95744,
'2043': 0.96174},
('E38000117', '15-19'): {'2023': 1.0,
'2024': 1.0256,
'2025': 1.05582,
'2026': 1.07936,
'2027': 1.1115,
'2028': 1.1266,
'2029': 1.13912,
'2030': 1.14634,
'2031': 1.14638,
'2032': 1.13231,
'2033': 1.12336,
'2034': 1.10983,
'2035': 1.09853,
'2036': 1.08744,
'2037': 1.07796,
'2038': 1.06951,
'2039': 1.06944,
'2040': 1.0673,
'2041': 1.06576,
'2042': 1.06547,
'2043': 1.06614},
('E38000117', '20-24'): {'2023': 1.0,
'2024': 0.99521,
'2025': 1.00187,
'2026': 1.01891,
'2027': 1.04653,
'2028': 1.07681,
'2029': 1.10075,
'2030': 1.1274,
'2031': 1.14819,
'2032': 1.17453,
'2033': 1.18587,
'2034': 1.19352,
'2035': 1.19693,
'2036': 1.19568,
'2037': 1.1838,
'2038': 1.17529,
'2039': 1.16055,
'2040': 1.14756,
'2041': 1.13446,
'2042': 1.1239,
'2043': 1.11601},
('E38000117', '25-29'): {'2023': 1.0,
'2024': 0.99569,
'2025': 0.99319,
'2026': 0.98067,
'2027': 0.96055,
'2028': 0.94531,
'2029': 0.93948,
'2030': 0.94435,
'2031': 0.95927,
'2032': 0.98405,
'2033': 1.0115,
'2034': 1.0331,
'2035': 1.05632,
'2036': 1.07521,
'2037': 1.09708,
'2038': 1.10594,
'2039': 1.1128,
'2040': 1.1155,
'2041': 1.11448,
'2042': 1.10378,
'2043': 1.09547},
('E38000117', '30-34'): {'2023': 1.0,
'2024': 0.99498,
'2025': 0.97531,
'2026': 0.95496,
'2027': 0.94237,
'2028': 0.93939,
'2029': 0.93356,
'2030': 0.92917,
'2031': 0.91693,
'2032': 0.89826,
'2033': 0.88484,
'2034': 0.87945,
'2035': 0.88391,
'2036': 0.89797,
'2037': 0.9212,
'2038': 0.94712,
'2039': 0.96744,
'2040': 0.98896,
'2041': 1.00655,
'2042': 1.0262,
'2043': 1.03402},
('E38000117', '35-39'): {'2023': 1.0,
'2024': 1.0294,
'2025': 1.05274,
'2026': 1.08535,
'2027': 1.10593,
'2028': 1.1029,
'2029': 1.09755,
'2030': 1.07902,
'2031': 1.05894,
'2032': 1.04645,
'2033': 1.04257,
'2034': 1.03528,
'2035': 1.02934,
'2036': 1.0156,
'2037': 0.99523,
'2038': 0.98107,
'2039': 0.97525,
'2040': 0.98013,
'2041': 0.99582,
'2042': 1.0216,
'2043': 1.05045},
('E38000117', '40-44'): {'2023': 1.0,
'2024': 1.0065,
'2025': 1.01485,
'2026': 1.02093,
'2027': 1.03244,
'2028': 1.05228,
'2029': 1.07896,
'2030': 1.09921,
'2031': 1.12781,
'2032': 1.14576,
'2033': 1.14147,
'2034': 1.13606,
'2035': 1.11872,
'2036': 1.09951,
'2037': 1.08755,
'2038': 1.08318,
'2039': 1.07517,
'2040': 1.06838,
'2041': 1.05404,
'2042': 1.03314,
'2043': 1.01895},
('E38000117', '45-49'): {'2023': 1.0,
'2024': 1.00179,
'2025': 1.01144,
'2026': 1.03201,
'2027': 1.05162,
'2028': 1.07454,
'2029': 1.08178,
'2030': 1.09046,
'2031': 1.09666,
'2032': 1.10789,
'2033': 1.12785,
'2034': 1.15344,
'2035': 1.17211,
'2036': 1.19868,
'2037': 1.21518,
'2038': 1.20971,
'2039': 1.20407,
'2040': 1.187,
'2041': 1.16796,
'2042': 1.15622,
'2043': 1.15146},
('E38000117', '50-54'): {'2023': 1.0,
'2024': 0.97342,
'2025': 0.95884,
'2026': 0.92983,
'2027': 0.90693,
'2028': 0.8932,
'2029': 0.89583,
'2030': 0.90568,
'2031': 0.9247,
'2032': 0.94304,
'2033': 0.96318,
'2034': 0.96997,
'2035': 0.97763,
'2036': 0.98298,
'2037': 0.99228,
'2038': 1.00925,
'2039': 1.03002,
'2040': 1.04462,
'2041': 1.06548,
'2042': 1.07817,
'2043': 1.0727},
('E38000117', '55-59'): {'2023': 1.0,
'2024': 1.00523,
'2025': 1.0018,
'2026': 0.99501,
'2027': 0.98731,
'2028': 0.97094,
'2029': 0.94702,
'2030': 0.93338,
'2031': 0.90681,
'2032': 0.88589,
'2033': 0.8739,
'2034': 0.8776,
'2035': 0.88848,
'2036': 0.90777,
'2037': 0.92646,
'2038': 0.94605,
'2039': 0.95309,
'2040': 0.96051,
'2041': 0.96574,
'2042': 0.97432,
'2043': 0.99018},
('E38000117', '60-64'): {'2023': 1.0,
'2024': 1.03239,
'2025': 1.0578,
'2026': 1.08573,
'2027': 1.09822,
'2028': 1.11207,
'2029': 1.11794,
'2030': 1.11473,
'2031': 1.10857,
'2032': 1.10061,
'2033': 1.08404,
'2034': 1.05966,
'2035': 1.04547,
'2036': 1.01794,
'2037': 0.99652,
'2038': 0.98492,
'2039': 0.99067,
'2040': 1.00452,
'2041': 1.02708,
'2042': 1.04912,
'2043': 1.07135},
('E38000117', '65-69'): {'2023': 1.0,
'2024': 1.02597,
'2025': 1.05648,
'2026': 1.09202,
'2027': 1.13335,
'2028': 1.16297,
'2029': 1.20078,
'2030': 1.23135,
'2031': 1.26367,
'2032': 1.27973,
'2033': 1.29553,
'2034': 1.30271,
'2035': 1.29984,
'2036': 1.29444,
'2037': 1.28617,
'2038': 1.26883,
'2039': 1.24296,
'2040': 1.22778,
'2041': 1.19822,
'2042': 1.17567,
'2043': 1.16445},
('E38000117', '70-74'): {'2023': 1.0,
'2024': 0.97722,
'2025': 0.97083,
'2026': 0.97785,
'2027': 0.99049,
'2028': 1.00799,
'2029': 1.03483,
'2030': 1.06647,
'2031': 1.10276,
'2032': 1.14453,
'2033': 1.17588,
'2034': 1.21479,
'2035': 1.2467,
'2036': 1.27971,
'2037': 1.29744,
'2038': 1.3136,
'2039': 1.32157,
'2040': 1.31963,
'2041': 1.31597,
'2042': 1.30879,
'2043': 1.29284},
('E38000117', '75-79'): {'2023': 1.0,
'2024': 1.01833,
'2025': 1.02478,
'2026': 1.01576,
'2027': 0.95074,
'2028': 0.92178,
'2029': 0.90402,
'2030': 0.9001,
'2031': 0.90824,
'2032': 0.92187,
'2033': 0.94019,
'2034': 0.9662,
'2035': 0.99672,
'2036': 1.03146,
'2037': 1.07122,
'2038': 1.10219,
'2039': 1.13988,
'2040': 1.17108,
'2041': 1.20308,
'2042': 1.22132,
'2043': 1.23715},
('E38000117', '80-84'): {'2023': 1.0,
'2024': 1.0595,
'2025': 1.10984,
'2026': 1.17973,
'2027': 1.32381,
'2028': 1.39736,
'2029': 1.42447,
'2030': 1.43294,
'2031': 1.42029,
'2032': 1.33656,
'2033': 1.30184,
'2034': 1.28214,
'2035': 1.27993,
'2036': 1.29437,
'2037': 1.31702,
'2038': 1.34775,
'2039': 1.38805,
'2040': 1.43474,
'2041': 1.4873,
'2042': 1.54712,
'2043': 1.59556},
('E38000117', '85-89'): {'2023': 1.0,
'2024': 1.0307,
'2025': 1.04732,
'2026': 1.04501,
'2027': 1.07125,
'2028': 1.12316,
'2029': 1.19611,
'2030': 1.25684,
'2031': 1.33641,
'2032': 1.50949,
'2033': 1.59692,
'2034': 1.62977,
'2035': 1.63723,
'2036': 1.61983,
'2037': 1.53695,
'2038': 1.50816,
'2039': 1.49516,
'2040': 1.49958,
'2041': 1.52276,
'2042': 1.55671,
'2043': 1.60249},
('E38000117', '90+'): {'2023': 1.0,
'2024': 1.007,
'2025': 1.03188,
'2026': 1.04907,
'2027': 1.07332,
'2028': 1.10347,
'2029': 1.13687,
'2030': 1.16449,
'2031': 1.16855,
'2032': 1.20439,
'2033': 1.26897,
'2034': 1.35309,
'2035': 1.4194,
'2036': 1.49026,
'2037': 1.67307,
'2038': 1.77805,
'2039': 1.83574,
'2040': 1.86105,
'2041': 1.86813,
'2042': 1.87662,
'2043': 1.90068},
('E38000204', '0-4'): {'2023': 1.0,
'2024': 0.99804,
'2025': 0.99514,
'2026': 0.9932,
'2027': 0.99175,
'2028': 0.99139,
'2029': 0.99138,
'2030': 0.99186,
'2031': 0.99326,
'2032': 0.99647,
'2033': 1.00075,
'2034': 1.00642,
'2035': 1.01335,
'2036': 1.02155,
'2037': 1.03089,
'2038': 1.04123,
'2039': 1.05236,
'2040': 1.06375,
'2041': 1.07477,
'2042': 1.0849,
'2043': 1.0936},
('E38000204', '5-9'): {'2023': 1.0,
'2024': 0.99966,
'2025': 1.00269,
'2026': 0.98954,
'2027': 0.98975,
'2028': 0.98149,
'2029': 0.97941,
'2030': 0.97659,
'2031': 0.97469,
'2032': 0.97338,
'2033': 0.97306,
'2034': 0.973,
'2035': 0.97344,
'2036': 0.97469,
'2037': 0.97753,
'2038': 0.98138,
'2039': 0.98652,
'2040': 0.99283,
'2041': 1.00033,
'2042': 1.00892,
'2043': 1.01847},
('E38000204', '10-14'): {'2023': 1.0,
'2024': 1.00215,
'2025': 0.99522,
'2026': 0.99184,
'2027': 0.98006,
'2028': 0.97196,
'2029': 0.9696,
'2030': 0.96974,
'2031': 0.95654,
'2032': 0.95504,
'2033': 0.94696,
'2034': 0.94487,
'2035': 0.94206,
'2036': 0.94018,
'2037': 0.93894,
'2038': 0.93863,
'2039': 0.93858,
'2040': 0.93899,
'2041': 0.9402,
'2042': 0.94286,
'2043': 0.9465},
('E38000204', '15-19'): {'2023': 1.0,
'2024': 1.0138,
'2025': 1.03692,
'2026': 1.06566,
'2027': 1.08023,
'2028': 1.09278,
'2029': 1.09398,
'2030': 1.0842,
'2031': 1.08198,
'2032': 1.06893,
'2033': 1.06149,
'2034': 1.05723,
'2035': 1.05312,
'2036': 1.04091,
'2037': 1.03671,
'2038': 1.02912,
'2039': 1.02667,
'2040': 1.02377,
'2041': 1.02196,
'2042': 1.02078,
'2043': 1.02049},
('E38000204', '20-24'): {'2023': 1.0,
'2024': 0.99424,
'2025': 0.99506,
'2026': 1.00984,
'2027': 1.03112,
'2028': 1.05656,
'2029': 1.07261,
'2030': 1.09603,
'2031': 1.11971,
'2032': 1.13568,
'2033': 1.14772,
'2034': 1.15219,
'2035': 1.14919,
'2036': 1.14755,
'2037': 1.13589,
'2038': 1.12864,
'2039': 1.12288,
'2040': 1.11777,
'2041': 1.1038,
'2042': 1.09698,
'2043': 1.08922},
('E38000204', '25-29'): {'2023': 1.0,
'2024': 0.99459,
'2025': 0.98324,
'2026': 0.96634,
'2027': 0.94662,
'2028': 0.9343,
'2029': 0.92947,
'2030': 0.93201,
'2031': 0.94699,
'2032': 0.96831,
'2033': 0.99286,
'2034': 1.00966,
'2035': 1.03078,
'2036': 1.0503,
'2037': 1.06585,
'2038': 1.07429,
'2039': 1.07738,
'2040': 1.07503,
'2041': 1.07303,
'2042': 1.0623,
'2043': 1.05352},
('E38000204', '30-34'): {'2023': 1.0,
'2024': 0.99717,
'2025': 0.99336,
'2026': 0.98395,
'2027': 0.98501,
'2028': 0.98607,
'2029': 0.97925,
'2030': 0.96783,
'2031': 0.95145,
'2032': 0.93182,
'2033': 0.91966,
'2034': 0.91452,
'2035': 0.91769,
'2036': 0.93294,
'2037': 0.95501,
'2038': 0.98021,
'2039': 0.99841,
'2040': 1.01965,
'2041': 1.03833,
'2042': 1.05444,
'2043': 1.06213},
('E38000204', '35-39'): {'2023': 1.0,
'2024': 1.00454,
'2025': 0.99927,
'2026': 1.00015,
'2027': 0.99197,
'2028': 0.97345,
'2029': 0.97057,
'2030': 0.96605,
'2031': 0.95649,
'2032': 0.95594,
'2033': 0.95526,
'2034': 0.94746,
'2035': 0.93604,
'2036': 0.91992,
'2037': 0.90009,
'2038': 0.88796,
'2039': 0.88278,
'2040': 0.88624,
'2041': 0.90169,
'2042': 0.92438,
'2043': 0.95023},
('E38000204', '40-44'): {'2023': 1.0,
'2024': 1.00509,
'2025': 1.01308,
'2026': 1.02258,
'2027': 1.02003,
'2028': 1.03547,
'2029': 1.04186,
'2030': 1.03805,
'2031': 1.04033,
'2032': 1.03384,
'2033': 1.01608,
'2034': 1.01286,
'2035': 1.00753,
'2036': 0.99713,
'2037': 0.99553,
'2038': 0.99392,
'2039': 0.98512,
'2040': 0.97284,
'2041': 0.95561,
'2042': 0.93421,
'2043': 0.92115},
('E38000204', '45-49'): {'2023': 1.0,
'2024': 0.99942,
'2025': 1.01593,
'2026': 1.03449,
'2027': 1.07249,
'2028': 1.09965,
'2029': 1.1047,
'2030': 1.11285,
'2031': 1.12128,
'2032': 1.11933,
'2033': 1.13597,
'2034': 1.1442,
'2035': 1.14158,
'2036': 1.14496,
'2037': 1.1397,
'2038': 1.12184,
'2039': 1.11839,
'2040': 1.11189,
'2041': 1.10026,
'2042': 1.098,
'2043': 1.09546},
('E38000204', '50-54'): {'2023': 1.0,
'2024': 0.95981,
'2025': 0.9244,
'2026': 0.88267,
'2027': 0.84908,
'2028': 0.81987,
'2029': 0.81979,
'2030': 0.83343,
'2031': 0.84986,
'2032': 0.87916,
'2033': 0.90008,
'2034': 0.90398,
'2035': 0.90971,
'2036': 0.91589,
'2037': 0.91504,
'2038': 0.92805,
'2039': 0.93561,
'2040': 0.93435,
'2041': 0.93781,
'2042': 0.93459,
'2043': 0.92133},
('E38000204', '55-59'): {'2023': 1.0,
'2024': 1.0,
'2025': 0.99324,
'2026': 0.98537,
'2027': 0.96808,
'2028': 0.95089,
'2029': 0.91622,
'2030': 0.88479,
'2031': 0.84736,
'2032': 0.81715,
'2033': 0.79167,
'2034': 0.79288,
'2035': 0.80626,
'2036': 0.82266,
'2037': 0.84957,
'2038': 0.86905,
'2039': 0.87268,
'2040': 0.8778,
'2041': 0.88305,
'2042': 0.88284,
'2043': 0.89507},
('E38000204', '60-64'): {'2023': 1.0,
'2024': 1.0402,
'2025': 1.07452,
'2026': 1.09782,
'2027': 1.11146,
'2028': 1.11351,
'2029': 1.11485,
'2030': 1.10726,
'2031': 1.10009,
'2032': 1.08239,
'2033': 1.06508,
'2034': 1.02947,
'2035': 0.99689,
'2036': 0.95728,
'2037': 0.92521,
'2038': 0.89927,
'2039': 0.9015,
'2040': 0.91672,
'2041': 0.93569,
'2042': 0.9652,
'2043': 0.98661},
('E38000204', '65-69'): {'2023': 1.0,
'2024': 1.01526,
'2025': 1.03876,
'2026': 1.07414,
'2027': 1.10998,
'2028': 1.14387,
'2029': 1.18823,
'2030': 1.22753,
'2031': 1.25441,
'2032': 1.27084,
'2033': 1.27472,
'2034': 1.27597,
'2035': 1.26821,
'2036': 1.26169,
'2037': 1.24316,
'2038': 1.22488,
'2039': 1.18663,
'2040': 1.15236,
'2041': 1.10932,
'2042': 1.07443,
'2043': 1.04705},
('E38000204', '70-74'): {'2023': 1.0,
'2024': 0.98359,
'2025': 0.96955,
'2026': 0.97026,
'2027': 0.98431,
'2028': 1.00119,
'2029': 1.01749,
'2030': 1.04177,
'2031': 1.07735,
'2032': 1.11365,
'2033': 1.14806,
'2034': 1.1927,
'2035': 1.23237,
'2036': 1.25952,
'2037': 1.27734,
'2038': 1.28187,
'2039': 1.28401,
'2040': 1.27717,
'2041': 1.27178,
'2042': 1.25516,
'2043': 1.23744},
('E38000204', '75-79'): {'2023': 1.0,
'2024': 1.01794,
'2025': 1.02797,
'2026': 1.02222,
'2027': 0.95868,
'2028': 0.92817,
'2029': 0.9146,
'2030': 0.90361,
'2031': 0.90612,
'2032': 0.92049,
'2033': 0.93719,
'2034': 0.9541,
'2035': 0.97787,
'2036': 1.01254,
'2037': 1.04716,
'2038': 1.08054,
'2039': 1.12367,
'2040': 1.16087,
'2041': 1.18753,
'2042': 1.2053,
'2043': 1.2107},
('E38000204', '80-84'): {'2023': 1.0,
'2024': 1.05278,
'2025': 1.1113,
'2026': 1.18106,
'2027': 1.31557,
'2028': 1.39183,
'2029': 1.41945,
'2030': 1.43202,
'2031': 1.42442,
'2032': 1.34231,
'2033': 1.3037,
'2034': 1.29011,
'2035': 1.27824,
'2036': 1.2852,
'2037': 1.30862,
'2038': 1.33637,
'2039': 1.36369,
'2040': 1.40029,
'2041': 1.45227,
'2042': 1.50436,
'2043': 1.55535},
('E38000204', '85-89'): {'2023': 1.0,
'2024': 1.04173,
'2025': 1.06066,
'2026': 1.07163,
'2027': 1.10333,
'2028': 1.15048,
'2029': 1.21711,
'2030': 1.28839,
'2031': 1.36993,
'2032': 1.53173,
'2033': 1.62687,
'2034': 1.65824,
'2035': 1.67653,
'2036': 1.66867,
'2037': 1.58015,
'2038': 1.54389,
'2039': 1.53492,
'2040': 1.52863,
'2041': 1.5434,
'2042': 1.57707,
'2043': 1.61827},
('E38000204', '90+'): {'2023': 1.0,
'2024': 1.02523,
'2025': 1.0587,
'2026': 1.09582,
'2027': 1.13541,
'2028': 1.18133,
'2029': 1.2282,
'2030': 1.25834,
'2031': 1.28225,
'2032': 1.32831,
'2033': 1.39569,
'2034': 1.48363,
'2035': 1.56014,
'2036': 1.64221,
'2037': 1.82325,
'2038': 1.93636,
'2039': 2.00264,
'2040': 2.04383,
'2041': 2.06636,
'2042': 2.08011,
'2043': 2.10614}}