Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
842b1d4
download Eurostat data and isolate required fertility data
jpycroft Mar 14, 2021
98e6c7f
pop and mort changes
jpycroft Mar 14, 2021
5d52e2f
add TO DO sections
jpycroft Mar 14, 2021
a0382d4
rename file EurostatDemogrpahics
jpycroft Mar 14, 2021
bbd7afa
correct manipulation of fert data
jpycroft Mar 18, 2021
0e3da1b
correct manipulation of fert data
jpycroft Mar 18, 2021
7fe2159
keep age less than zero and sort values by age
jpycroft Mar 18, 2021
08c1451
updates to file
jpycroft Mar 19, 2021
32c53aa
minor change
jpycroft Mar 19, 2021
112b5fd
produce fert_rates including estimating tails
jpycroft Apr 11, 2021
d3c722e
add USA demographics.py as template for UK demographics.py
jpycroft Apr 11, 2021
3697926
add UK version of get_fert based on EurostatDemographics.py - not tested
jpycroft Apr 11, 2021
872109a
format demographics.py using black
jpycroft Apr 12, 2021
b569cd2
format demographics.py with black-79
jpycroft Apr 12, 2021
5be0efb
Updated directory name to og_uk_calibrate
rickecon Apr 20, 2021
63e08ca
Updated imports, added new get_mort, and deleted all other functions …
rickecon Apr 20, 2021
3a91f9d
Added OG-UKplots.mplstyle
rickecon Apr 20, 2021
146efd0
Added mort_rate_data.csv data file in data folder
rickecon Apr 20, 2021
c148bc1
Added mort_rates.png to figures directory
rickecon Apr 20, 2021
69c178f
Added new parameter_plots.py module
rickecon Apr 20, 2021
a041a58
Added tests folder with one placeholder test
rickecon Apr 20, 2021
fc1674c
Fixed code typo in get_mort() in demographics.py
rickecon Apr 20, 2021
bf5ce61
Removed txfunc.py for now
rickecon Apr 20, 2021
8c2a32d
Added back txfunc.py
rickecon Apr 20, 2021
2afd6b8
Reformatted EurostatDemographics.py using black
rickecon Apr 20, 2021
dd48f28
Updated tests for get_mort() in test_demographics.py
rickecon Apr 20, 2021
126a215
Added eurostat package to environment.yml
rickecon Apr 20, 2021
c55896b
Changed import statement for parameter_plots.py module in demographic…
rickecon Apr 20, 2021
a3273ad
updated test_demographics.py get_mort tests
rickecon Apr 20, 2021
f307f6c
updates to oguk_calibrate folder
jpycroft Apr 20, 2021
995c235
Merge pull request #1 from rickecon/jpycroft-demog
jpycroft Apr 20, 2021
a87d9bf
remove PracticeNotes file
jpycroft Apr 20, 2021
8713246
Merge remote-tracking branch 'origin/demog' into demog
jpycroft Apr 20, 2021
3f96364
remove oguk_calibrate folder which has been replaced by og_uk_calibra…
jpycroft Apr 20, 2021
909a25c
updates to og_uk_calibrate, docs, environment
jpycroft Apr 23, 2021
ae58471
add test_get_fert, can visualise output if graph switch to True
jpycroft Apr 23, 2021
1d5a8a5
small changes to get_fert, function now tested
jpycroft Apr 23, 2021
d1da2b3
switch to graph equals False as standard
jpycroft Apr 23, 2021
1c94630
minor change line 375: use loc to avoid setting value on a copy of a…
jpycroft Apr 23, 2021
452d251
add get_imm_resid and the test; consider replacing with Eurostat net …
jpycroft Apr 23, 2021
c46dfac
W-I-P: prelim adding in of immsolve, get_pop_objs
jpycroft Apr 23, 2021
cf7ba01
complete get_pop_objs returns pop_objs; still need to revise get_imm_…
jpycroft Apr 25, 2021
875eb9a
change get_imm_resid to calculate imm_rates, inc. new code for new bo…
jpycroft May 6, 2021
e04e25a
as before, with black format updated
jpycroft May 6, 2021
027ab60
updating from upstream
jpycroft May 18, 2021
1c84f2f
complete get_pop_objs and corresponding test
jpycroft May 18, 2021
880e5f6
Merge remote-tracking branch 'origin/demog' into demog
jpycroft May 18, 2021
87e5e2f
complete get_pop_objs, black formatting
jpycroft May 18, 2021
0298833
macro_params for the UK
jpycroft May 18, 2021
9b88331
macro_params for the UK
jpycroft May 18, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions og_uk_calibrate/OG-UKplots.mplstyle
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
lines.linewidth : 1
font.family : serif
font.style : normal
font.variant : normal
font.weight : normal
font.stretch : normal
axes.prop_cycle : (cycler('color', 'brgcmykg')) + (cycler('linestyle', ["-","--","-.",":","-", "--", "-.", ":"]))
# color cycle for plot lines
# as list of string colorspecs:
# single letter, long name, or
# web-style hex
# Remove the plot frame lines. They are unnecessary chartjunk.
axes.spines.bottom : False
axes.spines.left : False
axes.spines.right : False
axes.spines.top : False

# ticks only on right and bottom
xtick.bottom : True # draw ticks on the bottom side
ytick.left : True # draw ticks on the left side

### GRIDS
axes.grid : True # display grid or not
grid.color : k # grid color
grid.linestyle : : # dotted
grid.linewidth : 0.5 # in points
grid.alpha : 0.2 # transparency, between 0.0 and 1.0

# Remove the tick marks; they are unnecessary with the tick lines we just plotted.
#plt.tick_params(axis="both", which="both", bottom="off", top="off",
# labelbottom="on", left="off", right="off", labelleft="on")
101 changes: 101 additions & 0 deletions og_uk_calibrate/data/demographic/mort_rate_data.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
age,tot_deaths,tot_pop,mort_rate_yr_data,mort_rate_yr_mod
0,2817.0,768431.0,0.0036659114481326235,0.0036659114481326235
1,186.0,777830.0,0.00023912680148618592,0.00023912680148618592
2,80.0,792428.0,0.00010095554422610004,0.00010095554422610004
3,83.0,798299.0,0.00010397106848436488,0.00010397106848436488
4,62.0,811766.0,7.637668983426258e-05,7.637668983426258e-05
5,72.0,834111.0,8.63194466923467e-05,8.63194466923467e-05
6,70.0,840862.0,8.32479051259303e-05,8.32479051259303e-05
7,57.0,826345.0,6.897845330945307e-05,6.897845330945307e-05
8,58.0,813666.0,7.12823197724865e-05,7.12823197724865e-05
9,44.0,812150.0,5.4177184017730714e-05,5.4177184017730714e-05
10,69.0,801653.0,8.607215341301036e-05,8.607215341301036e-05
11,61.0,780125.0,7.819259734016984e-05,7.819259734016984e-05
12,58.0,757439.0,7.65738231065472e-05,7.65738231065472e-05
13,74.0,736346.0,0.00010049623410733541,0.00010049623410733541
14,85.0,720098.0,0.00011803948906954331,0.00011803948906954331
15,121.0,704864.0,0.00017166432106051663,0.00017166432106051663
16,134.0,709643.0,0.00018882733994416911,0.00018882733994416911
17,181.0,730310.0,0.00024783995837384125,0.00024783995837384125
18,252.0,754755.0,0.0003338831806347755,0.0003338831806347755
19,278.0,779280.0,0.0003567395544605277,0.0003567395544605277
20,280.0,805843.0,0.00034746222279029537,0.00034746222279029537
21,315.0,826233.0,0.0003812483887716903,0.0003812483887716903
22,313.0,834269.0,0.00037517874930028566,0.00037517874930028566
23,311.0,854261.0,0.00036405735483651953,0.00036405735483651953
24,352.0,874065.0,0.0004027160451453839,0.0004027160451453839
25,389.0,892919.0,0.00043564981818059644,0.00043564981818059644
26,386.0,917061.0,0.0004209098413300751,0.0004209098413300751
27,402.0,919576.0,0.0004371579945540119,0.0004371579945540119
28,482.0,907471.0,0.0005311464498590038,0.0005311464498590038
29,489.0,907671.0,0.000538741460286822,0.000538741460286822
30,518.0,900379.0,0.0005753132847389821,0.0005753132847389821
31,544.0,892473.0,0.0006095422494574066,0.0006095422494574066
32,555.0,895166.0,0.0006199967380351801,0.0006199967380351801
33,630.0,884122.0,0.0007125713419641181,0.0007125713419641181
34,692.0,875903.0,0.0007900418196992132,0.0007900418196992132
35,721.0,878065.0,0.0008211237209090444,0.0008211237209090444
36,785.0,880930.0,0.0008911037199323442,0.0008911037199323442
37,925.0,883792.0,0.0010466263555225664,0.0010466263555225664
38,879.0,865959.0,0.0010150596044385474,0.0010150596044385474
39,934.0,819335.0,0.0011399488609665155,0.0011399488609665155
40,936.0,784445.0,0.001193200288101779,0.001193200288101779
41,994.0,785354.0,0.001265671276901881,0.001265671276901881
42,1175.0,800350.0,0.00146810770287999,0.00146810770287999
43,1316.0,814776.0,0.0016151678498139365,0.0016151678498139365
44,1437.0,840465.0,0.0017097678071067801,0.0017097678071067801
45,1643.0,877197.0,0.001873011421607689,0.001873011421607689
46,1854.0,910388.0,0.002036494329890113,0.002036494329890113
47,2021.0,914017.0,0.0022111186115794344,0.0022111186115794344
48,2176.0,914361.0,0.002379804038011245,0.002379804038011245
49,2370.0,925550.0,0.0025606396196855923,0.0025606396196855923
50,2525.0,931852.0,0.0027096577568111674,0.0027096577568111674
51,2768.0,937313.0,0.002953122382811291,0.002953122382811291
52,3008.0,940124.0,0.003199577928018006,0.003199577928018006
53,3298.0,938637.0,0.0035136053660786864,0.0035136053660786864
54,3399.0,923588.0,0.003680212389073916,0.003680212389073916
55,3672.0,903015.0,0.004066377634923008,0.004066377634923008
56,3935.0,877263.0,0.00448554196404043,0.00448554196404043
57,4257.0,844235.0,0.0050424348670690036,0.0050424348670690036
58,4524.0,817095.0,0.005536687900427735,0.005536687900427735
59,4655.0,798442.0,0.005830104127788869,0.005830104127788869
60,4955.0,774049.0,0.006401403528717174,0.006401403528717174
61,5299.0,745109.0,0.007111711172459331,0.007111711172459331
62,5601.0,717040.0,0.007811279705455762,0.007811279705455762
63,6010.0,702986.0,0.008549245646428236,0.008549245646428236
64,6247.0,697964.0,0.008950318354528313,0.008950318354528313
65,6999.0,681496.0,0.01027005294235036,0.01027005294235036
66,7340.0,671931.0,0.010923740681706902,0.010923740681706902
67,7902.0,678611.0,0.01164437358074066,0.01164437358074066
68,8987.0,691186.0,0.01300228881950734,0.01300228881950734
69,9990.0,714964.0,0.013972731494173133,0.013972731494173133
70,11517.0,759835.0,0.015157238084584154,0.015157238084584154
71,12883.0,695538.0,0.01852235248110096,0.01852235248110096
72,11537.0,593498.0,0.01943898715749674,0.01943898715749674
73,12405.0,579303.0,0.021413664351815888,0.021413664351815888
74,13543.0,554398.0,0.024428298803386737,0.024428298803386737
75,14012.0,502282.0,0.027896679554513203,0.027896679554513203
76,13764.0,446735.0,0.03081021187057204,0.03081021187057204
77,14255.0,426008.0,0.03346181292370096,0.03346181292370096
78,15743.0,424992.0,0.03704305022212183,0.03704305022212183
79,17102.0,410099.0,0.04170212558431013,0.04170212558431013
80,18199.0,386720.0,0.04705988829127017,0.04705988829127017
81,19340.0,359691.0,0.05376837340939862,0.05376837340939862
82,19625.0,333081.0,0.05891960213881908,0.05891960213881908
83,20743.0,303355.0,0.06837863229549537,0.06837863229549537
84,20861.0,274958.0,0.07586976920111435,0.07586976920111435
85,21530.0,253461.0,0.08494403478247146,0.08494403478247146
86,22777.0,232125.0,0.09812385568120624,0.09812385568120624
87,23045.0,206654.0,0.11151489930027969,0.11151489930027969
88,22857.0,178698.0,0.12790853842796227,0.12790853842796227
89,21718.0,150565.0,0.14424335004815197,0.14424335004815197
90,20428.0,127124.0,0.1606934961140304,0.1606934961140304
91,19126.0,106500.0,0.1795868544600939,0.1795868544600939
92,17543.0,87132.0,0.201338199513382,0.201338199513382
93,15434.0,70219.0,0.21979806035403524,0.21979806035403524
94,13463.0,55865.0,0.24099167636265997,0.24099167636265997
95,11372.0,43875.0,0.2591908831908832,0.2591908831908832
96,9537.0,33235.0,0.28695652173913044,0.28695652173913044
97,7956.0,22628.0,0.35159978787343116,0.35159978787343116
98,5806.0,12940.0,0.44868624420401854,0.44868624420401854
99,2948.0,7896.0,0.37335359675785207,1.0
Loading