AlisonLanski / IPEDSuploadables

Producing uploadable txt files for IPEDS reporting, one submission at a time
https://alisonlanski.github.io/IPEDSuploadables/
Other
8 stars 5 forks source link

under-the-hood improvements #79

Closed AlisonLanski closed 2 years ago

AlisonLanski commented 2 years ago

The main update is to change what happens in which function. With this update, the produce functions will 1) call set_report_path each time they are run and use the result locally (not saved to global env) 2) set the survey/part values for the final output file title 3) call the part function and have a standard df returned instead of a key-value df 4) send the variables and df above into the write_report function (for key-value txt output) or the write_report_csv function (new version of prettyfiles for csv output) or both, depending on the "format" variable

Write report has been simplified to call the formatting function and write out to the provided path. prettyfiles is now (again?) its own function.

This change makes the "produce" files a little messier, but cleans up the write-out functions, removes the need to pass as many variables through a chain of functions, and means that the "make" functions can produce a dataframe that can be examined within R if the user desires.

Other misc tweaks in this pull request are: A) removing the recode functions, since we aren't using them B) recoding "summarise" to "summarize" (majority rules!) C) taking out the data quality checks in com_D since they'll never be triggered D) adding a quick check to the start of each produce function for valid function arguments (will prevent someone asking for a non-existent part, for example)

No updates needed to vignettes because the user-facing functionality is the same.

71

Will need to rerun pkgdown and increment the version number when testing is complete