Class TaxDonorDataParser
java.lang.Object
simpaths.model.taxes.database.TaxDonorDataParser
CLASS TO MANAGE TRANSLATION OF CSV DATA FROM UKMOD TO DATABASE FOR DONORS USED TO IMPUTE TAX AND BENEFIT PAYMENTS
csv data are processed and saved to the DONORPERSON_{country code} table in the relational database. These data
are used as working variables to construct the DONORTAXUNIT_{country code} table, which is then used exclusively \
for imputing tax and benefit payments, drawing heavily on SQL calls made via Hibernate
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidconstructAggregateTaxDonorPopulationCSVfile(Country country, boolean showGui) Constructs the tax donor population based on the data stored in .txt files produced by UKMOD.static voiddatabaseFromCSV(Country country, int startYear, boolean isVisible) ENTRY POINT FOR MANAGERstatic voidpopulateDonorTaxUnitTables(Country country, boolean showGui) METHOD TO POPULATE TAX UNIT TABLES FROM PERSON LEVEL DATAstatic StringstringAppender(Collection<String> strings) METHOD TO CONVERT COLLECTION OF STRINGS TO COMMA-SEPARATED SINGLE STRINGstatic voidupdateDefaultDonorTables(Connection conn, Country country)
-
Constructor Details
-
TaxDonorDataParser
public TaxDonorDataParser()
-
-
Method Details
-
databaseFromCSV
ENTRY POINT FOR MANAGER- Parameters:
country- country object, defines the country codestartYear- first simulated year THE MANAGER IS 'run' FROM SimPathsStart
-
updateDefaultDonorTables
-
stringAppender
METHOD TO CONVERT COLLECTION OF STRINGS TO COMMA-SEPARATED SINGLE STRING- Parameters:
strings- collection of strings
-
constructAggregateTaxDonorPopulationCSVfile
Constructs the tax donor population based on the data stored in .txt files produced by UKMOD. Note that in order to store this information in an efficient way, we make the important assumption that all UKMOD output for a particular country is derived from the same input population (this is plausible, given that UKMOD is a static microsimulation). When running UKMOD, the most recent input population for a particular country should be used (currently IT_2014_a2.txt and UK_2013_a3.txt). This method constructs a .csv file that aggregates the information from multiple UKMOD output .txt files, picking up the relevant columns for each UKMOD policy scenario, that will eventually be parsed into the JAS-mine input database. -
populateDonorTaxUnitTables
METHOD TO POPULATE TAX UNIT TABLES FROM PERSON LEVEL DATA
-