Manually Upload Data to TAXSIM 35

library(usincometaxes)

usincometaxes sends data to the National Bureau of Economic Research’s (NBER) TAXSIM 35 server. The data must meet TAXSIM 35’s requirements for data types and column names. usincometaxes performs checks to ensure the data will be accepted by TAXSIM 35. It’s possible, however, that issues will slip through. This can produce cryptic errors that might be hard to location. If you receive errors that you cannot correct it could be helpful to manually upload your data to TAXSIM 35’s servers.

usincometaxes provides a function, create_dataset_for_taxsim(), to format your data for manual uploading. To use the function, prepare your dataset as you normally would to use taxsim_calculate_taxes(). For example, follow the formatting required for input columns. Then, supply the dataset to create_dataset_for_taxsim().

data(taxpayer_finances)

taxsim_dataset <- create_dataset_for_taxsim(taxpayer_finances)

knitr::kable(head(taxsim_dataset))
taxsimid year mstat state page sage depx age1 age2 age3 pwages swages dividends intrec stcg ltcg
1 2000 1 34 37 0 4 6 7 8 26361.75 0.00 2260.86 4340.19 2280.16 2060.29
2 2000 1 34 29 0 1 7 0 0 33966.34 0.00 1969.54 868.10 1064.50 2234.61
3 2000 2 34 36 30 1 13 0 0 174191.53 102286.98 1972.47 2048.31 1009.11 1226.34
4 2000 2 34 37 34 3 5 6 7 67604.57 53205.76 1173.95 881.67 3582.74 1405.74
5 2000 2 34 38 39 0 0 0 0 21176.78 21687.72 4614.91 1588.52 560.93 825.04
6 2000 1 34 36 0 1 2 0 0 53397.72 0.00 2067.41 1320.01 687.23 3548.07

Then, save this dataset as a csv file to your local computer. It is recommended to use readr::read_csv() to write out the dataset. write.csv tends to pose issues. Also note that you can name the .csv file anything you wish.

taxsim_filename <- 'taxsim_dataset.csv'

vroom::vroom_write(taxsim_dataset, taxsim_filename)

Now, manually upload the file taxsim_dataset.csv to TAXSIM 35’s server by going to (https://taxsim.nber.org/taxsim35/), navigating to the section titled ‘OR…Upload a (not too large) file with TAXSIM data:’, and uploading the .csv file:

Errors from the manual upload could guide you in solving any data formatting issues.