Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
evaaepelde committed Feb 15, 2024
1 parent 265089e commit 30c9769
Show file tree
Hide file tree
Showing 7 changed files with 343 additions and 257 deletions.
Binary file modified tests/testthat/test_inputs/DI_impact.RData
Binary file not shown.
Binary file modified tests/testthat/test_inputs/D_impacts.RData
Binary file not shown.
10 changes: 5 additions & 5 deletions tests/testthat/test_inputs/ex_dataset_expenses.csv
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
NUMERO,FACTOR,NMEMBERS,REGION,MUNISIZE,ZONE,HHTYPE,AGERP,GENDERRP,COUNTRYRP,STUDIESRP,REGMR,GASTOT_CNR,EUR_A_0111_CNR,EUR_A_0112_CNR,EUR_A_0113_CNR,EUR_A_0114_CNR
1,1667,1,Andalucía,>10.000,Urban,Elderly alone,Elder,Women,Spain,Without studies,Ownership,48035121,936972,475556,459558,46163035
2,800,2,Baleares,>10.000,Semi-urban,Elderly couples,Elder,Men,Rest of world,Primary education,Ownership,12556374,141847.56,155361.82,78774.24,12180390
3,390,3,Castilla y León,>10.000,Urban,Couples with children,Young,Women,Spain,Higher education,Rented,8707674,223205.74,506736.98,433788.12,7543943
4,734,4,Comunidad Valenciana,>10.000,Semi-urban,Couples with children,Adult,Men,EU27,Higher education,Ownership,13642171,725488.8,880212.52,2123.85,12034346
5,996,5,Navarra,<10.000,Rural,Couples with children,Adult,Women,Other Europe,Post-secondary education,Ownership,24007170,304459.64,612082.52,270376.66,22820251
1,1667,1,Andalucía,>10.000,Urban,Elderly alone,Elder,Woman,Spain,Without studies,Ownership,48035121,936972,475556,459558,46163035
2,800,2,Baleares,>10.000,Semi-urban,Elderly couples,Elder,Man,Rest of world,Primary education,Ownership,12556374,141847.56,155361.82,78774.24,12180390
3,390,3,Castilla y León,>10.000,Urban,Couples with children,Young,Woman,Spain,Higher education,Rented,8707674,223205.74,506736.98,433788.12,7543943
4,734,4,Comunidad Valenciana,>10.000,Semi-urban,Couples with children,Adult,Man,EU27,Higher education,Ownership,13642171,725488.8,880212.52,2123.85,12034346
5,996,5,Navarra,<10.000,Rural,Couples with children,Adult,Woman,Other Europe,Post-secondary education,Ownership,24007170,304459.64,612082.52,270376.66,22820251
10 changes: 5 additions & 5 deletions tests/testthat/test_inputs/ex_dataset_expenses_ps.csv
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"NUMERO","FACTOR","NMEMBERS","REGION","MUNISIZE","ZONE","HHTYPE","AGERP","GENDERRP","COUNTRYRP","STUDIESRP","REGMR","GASTOT_CNR","EUR_A_0111_CNR","EUR_A_0112_CNR","EUR_A_0113_CNR","EUR_A_0114_CNR","EUR_A_0111_Scenario1","EUR_A_0112_Scenario1","EUR_A_0113_Scenario1","EUR_A_0114_Scenario1","EUR_A_0111_Scenario2","EUR_A_0112_Scenario2","EUR_A_0113_Scenario2","EUR_A_0114_Scenario2","EUR_A_0111_Scenario3","EUR_A_0112_Scenario3","EUR_A_0113_Scenario3","EUR_A_0114_Scenario3","GASTOT_Scenario1","GASTOT_Scenario2","GASTOT_Scenario3"
1,1667,1,"Andalucía",">10.000","Urban","Elderly alone","Elder ","Women","Spain","Without studies","Ownership",48035121,936972,475556,459558,46163035,1873944,475556,459558,46163035,936972,1426668,459558,46163035,936972,475556,1838232,46163035,48972093,48986233,49413795
2,800,2,"Baleares",">10.000","Semi-urban","Elderly couples","Elder ","Men","Rest of world","Primary education","Ownership",12556374,141847.56,155361.82,78774.24,12180390,283695.12,155361.82,78774.24,12180390,141847.56,466085.46,78774.24,12180390,141847.56,155361.82,315096.96,12180390,12698221.18,12867097.26,12792696.34
3,390,3,"Castilla y León",">10.000","Urban","Couples with children","Young","Women","Spain","Higher education","Rented",8707674,223205.74,506736.98,433788.12,7543943,446411.48,506736.98,433788.12,7543943,223205.74,1520210.94,433788.12,7543943,223205.74,506736.98,1735152.48,7543943,8930879.58,9721147.8,10009038.2
4,734,4,"Comunidad Valenciana",">10.000","Semi-urban","Couples with children","Adult","Men","EU27","Higher education","Ownership",13642171,725488.8,880212.52,2123.85,12034346,1450977.6,880212.52,2123.85,12034346,725488.8,2640637.56,2123.85,12034346,725488.8,880212.52,8495.4,12034346,14367659.97,15402596.21,13648542.72
5,996,5,"Navarra","<10.000","Rural","Couples with children","Adult","Women","Other Europe","Post-secondary education","Ownership",24007170,304459.64,612082.52,270376.66,22820251,608919.28,612082.52,270376.66,22820251,304459.64,1836247.56,270376.66,22820251,304459.64,612082.52,1081506.64,22820251,24311629.46,25231334.86,24818299.8
1,1667,1,"Andalucía",">10.000","Urban","Elderly alone","Elder","Woman","Spain","Without studies","Ownership",48035121,936972,475556,459558,46163035,1873944,475556,459558,46163035,936972,1426668,459558,46163035,936972,475556,1838232,46163035,48972093,48986233,49413795
2,800,2,"Baleares",">10.000","Semi-urban","Elderly couples","Elder","Man","Rest of world","Primary education","Ownership",12556374,141847.56,155361.82,78774.24,12180390,283695.12,155361.82,78774.24,12180390,141847.56,466085.46,78774.24,12180390,141847.56,155361.82,315096.96,12180390,12698221.18,12867097.26,12792696.34
3,390,3,"Castilla y León",">10.000","Urban","Couples with children","Young","Woman","Spain","Higher education","Rented",8707674,223205.74,506736.98,433788.12,7543943,446411.48,506736.98,433788.12,7543943,223205.74,1520210.94,433788.12,7543943,223205.74,506736.98,1735152.48,7543943,8930879.58,9721147.8,10009038.2
4,734,4,"Comunidad Valenciana",">10.000","Semi-urban","Couples with children","Adult","Man","EU27","Higher education","Ownership",13642171,725488.8,880212.52,2123.85,12034346,1450977.6,880212.52,2123.85,12034346,725488.8,2640637.56,2123.85,12034346,725488.8,880212.52,8495.4,12034346,14367659.97,15402596.21,13648542.72
5,996,5,"Navarra","<10.000","Rural","Couples with children","Adult","Woman","Other Europe","Post-secondary education","Ownership",24007170,304459.64,612082.52,270376.66,22820251,608919.28,612082.52,270376.66,22820251,304459.64,1836247.56,270376.66,22820251,304459.64,612082.52,1081506.64,22820251,24311629.46,25231334.86,24818299.8
10 changes: 5 additions & 5 deletions tests/testthat/test_inputs/ex_dataset_renamed.csv
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
NUMERO,FACTOR,NMEMBERS,REGION,MUNISIZE,ZONE,HHTYPE,AGERP,GENDERRP,COUNTRYRP,STUDIESRP,REGMR
1,1667,1,Andalucía,>10.000,Urban,Elderly alone,Elder ,Women,Spain,Without studies,Ownership
2,800,2,Baleares,>10.000,Semi-urban,Elderly couples,Elder ,Men,Rest of world,Primary education,Ownership
3,390,3,Castilla y León,>10.000,Urban,Couples with children,Young,Women,Spain,Higher education,Rented
4,734,4,Comunidad Valenciana,>10.000,Semi-urban,Couples with children,Adult,Men,EU27,Higher education,Ownership
5,996,5,Navarra,<10.000,Rural,Couples with children,Adult,Women,Other Europe,Post-secondary education,Ownership
1,1667,1,Andalucía,>10.000,Urban,Elderly alone,Elder,Woman,Spain,Without studies,Ownership
2,800,2,Baleares,>10.000,Semi-urban,Elderly couples,Elder,Man,Rest of world,Primary education,Ownership
3,390,3,Castilla y León,>10.000,Urban,Couples with children,Young,Woman,Spain,Higher education,Rented
4,734,4,Comunidad Valenciana,>10.000,Semi-urban,Couples with children,Adult,Man,EU27,Higher education,Ownership
5,996,5,Navarra,<10.000,Rural,Couples with children,Adult,Woman,Other Europe,Post-secondary education,Ownership
53 changes: 53 additions & 0 deletions tests/testthat/test_inputs/shocks_cdii.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
names,coicop,Scenario1,Scenario2,Scenario3
Bread and cereals,EUR_A_0111,2,3,1
Meat,EUR_A_0112,1,1,1
Fish,EUR_A_0113,1,1,1
"Milk, cheese and eggs",EUR_A_0114,1,1,1
Oils and fats,EUR_A_0115,1,1,1
Fruits,EUR_A_0116,1,1,1
Vegetables including potatoes and other root vegetables,EUR_A_0117,1,1,1
"Sugar, preserves, honey, chocolate, confectionery and ice cream",EUR_A_0118,1,1,1
Food products not included above,EUR_A_0119,1,1,1
Non-alcoholic beverages,EUR_A_012,1,1,1
Alcoholic beverages,EUR_A_021,1,1,1
Tabacco,EUR_A_022,1,1,1
Narcotics,EUR_A_023,1,1,1
Articles of clothing,EUR_A_031,1,1,1
Footwear,EUR_A_032,1,1,1
Real rentals,EUR_A_041,1,1,1
Imputed rents,EUR_A_042,1,1,1
Current expenses of maintenance and repair of the housing,EUR_A_043,1,1,1
Other services related to housing,EUR_A_044,1,1,1
"Electricity, gas and other fuels",EUR_A_045,1.2,1,3
"Furniture, furnishing articles, carpets and other floor coverings and their repairs",EUR_A_051,1,1,1
Textile articles for the home and their repairs,EUR_A_052,1,1,1
"Heating and applicances, refrigerators, washing machines and other large domestic applicances; accesories and their repairs",EUR_A_053,1,1,1
"Glassware, crockery, cutlery, other household utensils and their repairs",EUR_A_054,1,1,1
Tools for home and garden,EUR_A_055,1,1,1
Goods and services for the current maintenance of the home,EUR_A_056,1,1,1
"Medicines and other pharmaceutical products, devices and therapeutic material",EUR_A_061,1,1,1
Out-of-hospital medical and paramedical services,EUR_A_062,1,1,1
Hospital services,EUR_A_063,1,1,1
Purchase of vehicles,EUR_A_071,1,1,1
Use of personal vehicles,EUR_A_072,1,1,1
Terrestrial public transport,EUR_A_073_T,1,1.5,2
Air transport,EUR_A_073_A,1,1,1
Maritim transport,EUR_A_073_M,1,1,1
Postal services,EUR_A_081,1,1,1
Telephone and fax equipment,EUR_A_082,1,1,1
"Telephone, telegraph and fax services",EUR_A_083,1,1,1
"Audiovisual, photographic and information processing equipment and accessories including their repairs",EUR_A_091,1,1,1
Other important durable goods for leisure and culture,EUR_A_092,1,1,1
"Other recreational items and equipment, flowers, gardening, and pets",EUR_A_093,1,1,1
Recreational and cultural services,EUR_A_094,1,1,1
"Press, bookstore and stationery",EUR_A_095,1,1,1
All-include vacations,EUR_A_096,1,1,1
Education,EUR_A_101_105,1,1,1
Food and drinks outside the home,EUR_A_111,1,1,1
Accommodation services,EUR_A_112,1,1,1
Personal care,EUR_A_121,1,1,1
Personal effects not previously declared,EUR_A_122,1,1,1
Social protection,EUR_A_123,1,1,1
Insurance services,EUR_A_124,1,1,1
Financial services not declared elsewhere,EUR_A_125,1,1,1
Other services not declared elsewhere,EUR_A_126_128,1,1,1
Loading

0 comments on commit 30c9769

Please sign in to comment.