Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
add artificial example data
  • Loading branch information
walke committed Nov 5, 2019
1 parent a16ce10 commit 0179c8e
Show file tree
Hide file tree
Showing 11 changed files with 1,892 additions and 733 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Expand Up @@ -17,7 +17,7 @@ Description: This data management package provides some helper
Further the classes provide methods to make a subset for selected
calendar years or selected regions. The resulting subset
objects still contain the original header and footer information.
License: GPL-3 | file LICENCE
License: GPL-3
URL: https://github.molgen.mpg.de/walke/eoR
Encoding: UTF-8
Depends: R (>= 3.2.0)
Expand Down
712 changes: 0 additions & 712 deletions LICENCE

This file was deleted.

6 changes: 3 additions & 3 deletions demo/EX1.R
Expand Up @@ -5,9 +5,9 @@ require(data.table)
require(eoR)

# read all information from the file Exposures_1x1
# example data source: Human Mortality Database https://www.mortality.org/
# example data similar to data from Human Mortality Database https://www.mortality.org/
# period life tables 1x1 female
infile2 <- file.path(system.file(package="eoR"), "extdata", "DEUTNP.Exposures_1x1.txt")
infile2 <- file.path(system.file(package="eoR"), "extdata", "DEUTNP.Exposures_1x1m.txt")

e1 <- readEX1x1(infile2)

Expand All @@ -27,7 +27,7 @@ region(e1)
protocol(e1)

# select some years
(e2 <- selectYears(e1, c(1999,2000)))
(e2 <- selectYears(e1, c(2011,2012)))
# descriptive tables and a ranges
ex1(e2)[, table(Year)]
ex1(e2)[, table(Age)]
Expand Down
6 changes: 3 additions & 3 deletions demo/LT1.R
Expand Up @@ -5,9 +5,9 @@ require(data.table)
require(eoR)

# read all information from the file fltper_1x1
# example data source: Human Mortality Database https://www.mortality.org/
# example data similar to data from Human Mortality Database https://www.mortality.org/
# period life tables 1x1 female
infile <- file.path(system.file(package="eoR"), "extdata", "DEUTNP.fltper_1x1.txt")
infile <- file.path(system.file(package="eoR"), "extdata", "DEUTNP.fltper_1x1m.txt")

o1 <- readLT1x1(infile)

Expand All @@ -27,7 +27,7 @@ region(o1)
protocol(o1)

# select some years
(o2 <- selectYears(o1, c(1999,2000)))
(o2 <- selectYears(o1, c(2011,2012)))
# descriptive tables and a ranges
lt1(o2)[, table(Year)]
lt1(o2)[, table(Age)]
Expand Down
5 changes: 3 additions & 2 deletions demo/RD1.R
Expand Up @@ -6,10 +6,11 @@ require(eoR)


# read all information from 'GENESIS-Tabelle: 12613-02-02-4'
# example data similar to data from
# Statistische &Auml;mter des Bundes und der L&auml;nder, Deutschland, 2019
# Gestorbene nach Geschlecht, Nationalit&auml;t und Altersgruppen -
# Jahressumme - regionale Tiefe: Kreise und krfr. St&auml;dte
infile3 <- file.path(system.file(package="eoR"), "extdata", "12613-02-02-4.csv")
infile3 <- file.path(system.file(package="eoR"), "extdata", "12613-02-02-4m.csv")

d1 <- readRegDeath(infile3)

Expand Down Expand Up @@ -41,7 +42,7 @@ rd1(d2)
rd1total(d2)

# select a reagion
(d3 <- selectRegion(d2, "13003"))
(d3 <- selectRegion(d2, "03"))
# descriptive tables and a ranges
rd1(d3)[, table(Year)]
rd1(d3)[, table(Age_Name)]
Expand Down
5 changes: 3 additions & 2 deletions demo/RE1.R
Expand Up @@ -5,9 +5,10 @@ require(data.table)
require(eoR)

# read all information from 'GENESIS-Tabelle: 12411-03-03-4'
# example data similar to data from
# Statistische &Auml;mter des Bundes und der L&auml;nder, Deutschland, 2019
# Bev&ouml;lkerung nach Geschlecht, Nationalit&auml;t und Altersgruppen
infile4 <- file.path(system.file(package="eoR"), "extdata", "12411-03-03-4.csv")
infile4 <- file.path(system.file(package="eoR"), "extdata", "12411-03-03-4m.csv")

r1 <- readRegExp(infile4)

Expand Down Expand Up @@ -40,7 +41,7 @@ re1(r2)
re1total(r2)

# select a reagion
(r3 <- selectRegion(r2, "13003"))
(r3 <- selectRegion(r2, "03"))
# descriptive tables and a ranges
re1(r3)[, table(Year)]
re1(r3)[, table(Age_Name)]
Expand Down
146 changes: 146 additions & 0 deletions inst/extdata/12411-03-03-4m.csv
@@ -0,0 +1,146 @@
example data similar to 12411-03-03-4.csv
some text
some text
some text
some text
some text
some text
;;;;Insgesamt;m�nnlich;more;more;;;;;
31.12.2011;01;Kreis-1;unter 3 Jahre;11097;5322;5775;10497;4972;5525;600;350;250
31.12.2011;01;Kreis-1;3 bis unter 6 Jahre;8878;4258;4620;8398;3978;4420;480;280;200
31.12.2011;01;Kreis-1;6 bis unter 10 Jahre;13317;6387;6930;12597;5967;6630;720;420;300
31.12.2011;01;Kreis-1;10 bis unter 15 Jahre;13317;6387;6930;12597;5967;6630;720;420;300
31.12.2011;01;Kreis-1;15 bis unter 18 Jahre;11097;5322;5775;10497;4972;5525;600;350;250
31.12.2011;01;Kreis-1;18 bis unter 20 Jahre;6658;3193;3465;6298;2983;3315;360;210;150
31.12.2011;01;Kreis-1;20 bis unter 25 Jahre;24414;11709;12705;23094;10939;12155;1320;770;550
31.12.2011;01;Kreis-1;25 bis unter 30 Jahre;31072;14902;16170;29393;13923;15470;1679;979;700
31.12.2011;01;Kreis-1;30 bis unter 35 Jahre;31072;14902;16170;29393;13923;15470;1679;979;700
31.12.2011;01;Kreis-1;35 bis unter 40 Jahre;37731;18096;19635;35691;16906;18785;2040;1190;850
31.12.2011;01;Kreis-1;40 bis unter 45 Jahre;35512;17032;18480;33592;15912;17680;1920;1120;800
31.12.2011;01;Kreis-1;45 bis unter 50 Jahre;31072;14902;16170;29393;13923;15470;1679;979;700
31.12.2011;01;Kreis-1;50 bis unter 55 Jahre;22195;10645;11550;20995;9945;11050;1200;700;500
31.12.2011;01;Kreis-1;55 bis unter 60 Jahre;17756;8516;9240;16796;7956;8840;960;560;400
31.12.2011;01;Kreis-1;60 bis unter 65 Jahre;15535;7450;8085;14696;6961;7735;839;489;350
31.12.2011;01;Kreis-1;65 bis unter 70 Jahre;13317;6387;6930;12597;5967;6630;720;420;300
31.12.2011;01;Kreis-1;70 bis unter 75 Jahre;8878;4258;4620;8398;3978;4420;480;280;200
31.12.2011;01;Kreis-1;75 bis unter 80 Jahre;4439;2129;2310;4199;1989;2210;240;140;100
31.12.2011;01;Kreis-1;80 bis unter 85 Jahre;2219;1064;1155;2099;994;1105;120;70;50
31.12.2011;01;Kreis-1;85 bis unter 90 Jahre;1331;638;693;1259;596;663;72;42;30
31.12.2011;01;Kreis-1;90 Jahre und mehr;887;425;462;839;397;442;48;28;20
31.12.2011;01;Kreis-1;Insgesamt;341794;163924;177870;323318;153148;170170;18476;10776;7700
31.12.2016;02;Kreis-2;unter 3 Jahre;16333;7833;8500;15450;7318;8132;883;515;368
31.12.2016;02;Kreis-2;3 bis unter 6 Jahre;13049;6258;6791;12344;5847;6497;705;411;294
31.12.2016;02;Kreis-2;6 bis unter 10 Jahre;19619;9409;10210;18559;8791;9768;1060;618;442
31.12.2016;02;Kreis-2;10 bis unter 15 Jahre;19619;9409;10210;18559;8791;9768;1060;618;442
31.12.2016;02;Kreis-2;15 bis unter 18 Jahre;16333;7833;8500;15450;7318;8132;883;515;368
31.12.2016;02;Kreis-2;18 bis unter 20 Jahre;9809;4704;5105;9279;4395;4884;530;309;221
31.12.2016;02;Kreis-2;20 bis unter 25 Jahre;35955;17244;18711;34011;16110;17901;1944;1134;810
31.12.2016;02;Kreis-2;25 bis unter 30 Jahre;45765;21949;23816;43291;20506;22785;2474;1443;1031
31.12.2016;02;Kreis-2;30 bis unter 35 Jahre;45765;21949;23816;43291;20506;22785;2474;1443;1031
31.12.2016;02;Kreis-2;35 bis unter 40 Jahre;55575;26654;28921;52571;24902;27669;3004;1752;1252
31.12.2016;02;Kreis-2;40 bis unter 45 Jahre;52333;25099;27234;49504;23449;26055;2829;1650;1179
31.12.2016;02;Kreis-2;45 bis unter 50 Jahre;45765;21949;23816;43291;20506;22785;2474;1443;1031
31.12.2016;02;Kreis-2;50 bis unter 55 Jahre;32713;15689;17024;30945;14658;16287;1768;1031;737
31.12.2016;02;Kreis-2;55 bis unter 60 Jahre;26143;12538;13605;24730;11714;13016;1413;824;589
31.12.2016;02;Kreis-2;60 bis unter 65 Jahre;22859;10963;11896;21623;10242;11381;1236;721;515
31.12.2016;02;Kreis-2;65 bis unter 70 Jahre;19619;9409;10210;18559;8791;9768;1060;618;442
31.12.2016;02;Kreis-2;70 bis unter 75 Jahre;13049;6258;6791;12344;5847;6497;705;411;294
31.12.2016;02;Kreis-2;75 bis unter 80 Jahre;6523;3128;3395;6171;2923;3248;352;205;147
31.12.2016;02;Kreis-2;80 bis unter 85 Jahre;3239;1553;1686;3064;1451;1613;175;102;73
31.12.2016;02;Kreis-2;85 bis unter 90 Jahre;1951;935;1016;1846;874;972;105;61;44
31.12.2016;02;Kreis-2;90 Jahre und mehr;1285;616;669;1216;576;640;69;40;29
31.12.2016;02;Kreis-2;Insgesamt;503301;241379;261922;476098;225515;250583;27203;15864;11339
31.12.2016;03;Kreis-3;unter 3 Jahre;30849;14795;16054;29182;13823;15359;1667;972;695
31.12.2016;03;Kreis-3;3 bis unter 6 Jahre;24679;11836;12843;23345;11058;12287;1334;778;556
31.12.2016;03;Kreis-3;6 bis unter 10 Jahre;37019;17754;19265;35018;16587;18431;2001;1167;834
31.12.2016;03;Kreis-3;10 bis unter 15 Jahre;37019;17754;19265;35018;16587;18431;2001;1167;834
31.12.2016;03;Kreis-3;15 bis unter 18 Jahre;30849;14795;16054;29182;13823;15359;1667;972;695
31.12.2016;03;Kreis-3;18 bis unter 20 Jahre;18508;8876;9632;17508;8293;9215;1000;583;417
31.12.2016;03;Kreis-3;20 bis unter 25 Jahre;67916;32573;35343;64244;30431;33813;3672;2142;1530
31.12.2016;03;Kreis-3;25 bis unter 30 Jahre;86425;41450;44975;81753;38725;43028;4672;2725;1947
31.12.2016;03;Kreis-3;30 bis unter 35 Jahre;86425;41450;44975;81753;38725;43028;4672;2725;1947
31.12.2016;03;Kreis-3;35 bis unter 40 Jahre;104936;50328;54608;99263;47019;52244;5673;3309;2364
31.12.2016;03;Kreis-3;40 bis unter 45 Jahre;98766;47369;51397;93426;44254;49172;5340;3115;2225
31.12.2016;03;Kreis-3;45 bis unter 50 Jahre;86425;41450;44975;81753;38725;43028;4672;2725;1947
31.12.2016;03;Kreis-3;50 bis unter 55 Jahre;61745;29613;32132;58407;27666;30741;3338;1947;1391
31.12.2016;03;Kreis-3;55 bis unter 60 Jahre;49360;23673;25687;46692;22117;24575;2668;1556;1112
31.12.2016;03;Kreis-3;60 bis unter 65 Jahre;43190;20714;22476;40855;19352;21503;2335;1362;973
31.12.2016;03;Kreis-3;65 bis unter 70 Jahre;37019;17754;19265;35018;16587;18431;2001;1167;834
31.12.2016;03;Kreis-3;70 bis unter 75 Jahre;24679;11836;12843;23345;11058;12287;1334;778;556
31.12.2016;03;Kreis-3;75 bis unter 80 Jahre;12338;5917;6421;11671;5528;6143;667;389;278
31.12.2016;03;Kreis-3;80 bis unter 85 Jahre;6167;2957;3210;5834;2763;3071;333;194;139
31.12.2016;03;Kreis-3;85 bis unter 90 Jahre;3683;1766;1917;3484;1650;1834;199;116;83
31.12.2016;03;Kreis-3;90 Jahre und mehr;2440;1170;1270;2308;1093;1215;132;77;55
31.12.2016;03;Kreis-3;Insgesamt;950437;455830;494607;899059;425864;473195;51378;29966;21412
31.12.2016;04;Kreis-4;unter 3 Jahre;-;-;-;-;-;-;-;-;-
31.12.2016;04;Kreis-4;3 bis unter 6 Jahre;-;-;-;-;-;-;-;-;-
31.12.2016;04;Kreis-4;6 bis unter 10 Jahre;-;-;-;-;-;-;-;-;-
31.12.2016;04;Kreis-4;10 bis unter 15 Jahre;-;-;-;-;-;-;-;-;-
31.12.2016;04;Kreis-4;15 bis unter 18 Jahre;-;-;-;-;-;-;-;-;-
31.12.2016;04;Kreis-4;18 bis unter 20 Jahre;-;-;-;-;-;-;-;-;-
31.12.2016;04;Kreis-4;20 bis unter 25 Jahre;-;-;-;-;-;-;-;-;-
31.12.2016;04;Kreis-4;25 bis unter 30 Jahre;-;-;-;-;-;-;-;-;-
31.12.2016;04;Kreis-4;30 bis unter 35 Jahre;-;-;-;-;-;-;-;-;-
31.12.2016;04;Kreis-4;35 bis unter 40 Jahre;-;-;-;-;-;-;-;-;-
31.12.2016;04;Kreis-4;40 bis unter 45 Jahre;-;-;-;-;-;-;-;-;-
31.12.2016;04;Kreis-4;45 bis unter 50 Jahre;-;-;-;-;-;-;-;-;-
31.12.2016;04;Kreis-4;50 bis unter 55 Jahre;-;-;-;-;-;-;-;-;-
31.12.2016;04;Kreis-4;55 bis unter 60 Jahre;-;-;-;-;-;-;-;-;-
31.12.2016;04;Kreis-4;60 bis unter 65 Jahre;-;-;-;-;-;-;-;-;-
31.12.2016;04;Kreis-4;65 bis unter 70 Jahre;-;-;-;-;-;-;-;-;-
31.12.2016;04;Kreis-4;70 bis unter 75 Jahre;-;-;-;-;-;-;-;-;-
31.12.2016;04;Kreis-4;75 bis unter 80 Jahre;-;-;-;-;-;-;-;-;-
31.12.2016;04;Kreis-4;80 bis unter 85 Jahre;-;-;-;-;-;-;-;-;-
31.12.2016;04;Kreis-4;85 bis unter 90 Jahre;-;-;-;-;-;-;-;-;-
31.12.2016;04;Kreis-4;90 Jahre und mehr;-;-;-;-;-;-;-;-;-
31.12.2016;04;Kreis-4;Insgesamt;-;-;-;-;-;-;-;-;-
31.12.2016;DX;Kreis-5;unter 3 Jahre;83585;40088;43497;79066;37452;41614;4519;2636;1883
31.12.2016;DX;Kreis-5;3 bis unter 6 Jahre;66849;32061;34788;63235;29953;33282;3614;2108;1506
31.12.2016;DX;Kreis-5;6 bis unter 10 Jahre;100274;48092;52182;94853;44930;49923;5421;3162;2259
31.12.2016;DX;Kreis-5;10 bis unter 15 Jahre;100274;48092;52182;94853;44930;49923;5421;3162;2259
31.12.2016;DX;Kreis-5;15 bis unter 18 Jahre;83585;40088;43497;79066;37452;41614;4519;2636;1883
31.12.2016;DX;Kreis-5;18 bis unter 20 Jahre;50114;24035;26079;47405;22455;24950;2709;1580;1129
31.12.2016;DX;Kreis-5;20 bis unter 25 Jahre;183862;88182;95680;173922;82384;91538;9940;5798;4142
31.12.2016;DX;Kreis-5;25 bis unter 30 Jahre;234022;112239;121783;221370;104859;116511;12652;7380;5272
31.12.2016;DX;Kreis-5;30 bis unter 35 Jahre;234022;112239;121783;221370;104859;116511;12652;7380;5272
31.12.2016;DX;Kreis-5;35 bis unter 40 Jahre;284183;136297;147886;268819;127335;141484;15364;8962;6402
31.12.2016;DX;Kreis-5;40 bis unter 45 Jahre;267448;128271;139177;252988;119836;133152;14460;8435;6025
31.12.2016;DX;Kreis-5;45 bis unter 50 Jahre;234022;112239;121783;221370;104859;116511;12652;7380;5272
31.12.2016;DX;Kreis-5;50 bis unter 55 Jahre;167171;80177;86994;158133;74905;83228;9038;5272;3766
31.12.2016;DX;Kreis-5;55 bis unter 60 Jahre;133701;64124;69577;126473;59908;66565;7228;4216;3012
31.12.2016;DX;Kreis-5;60 bis unter 65 Jahre;117010;56119;60891;110684;52429;58255;6326;3690;2636
31.12.2016;DX;Kreis-5;65 bis unter 70 Jahre;100274;48092;52182;94853;44930;49923;5421;3162;2259
31.12.2016;DX;Kreis-5;70 bis unter 75 Jahre;66849;32061;34788;63235;29953;33282;3614;2108;1506
31.12.2016;DX;Kreis-5;75 bis unter 80 Jahre;33424;16030;17394;31617;14976;16641;1807;1054;753
31.12.2016;DX;Kreis-5;80 bis unter 85 Jahre;16689;8004;8685;15787;7478;8309;902;526;376
31.12.2016;DX;Kreis-5;85 bis unter 90 Jahre;9986;4789;5197;9446;4474;4972;540;315;225
31.12.2016;DX;Kreis-5;90 Jahre und mehr;6658;3193;3465;6298;2983;3315;360;210;150
31.12.2016;DX;Kreis-5;Insgesamt;2574002;1234512;1339490;2434843;1153340;1281503;139159;81172;57987
__________
some text
some text
some text
some text
some text
some text
some text
some text
some text
some text
some text
some text
some text
some text
some text
some text
some text
some text
some text
some text
some text
some text
some text
some text
some text
some text
some text

0 comments on commit 0179c8e

Please sign in to comment.