Closed td928 closed 2 years ago
You're totally right ab the keep SE flag not doing anything. we should remove that and the add MOE flag. Added an enhancement in this issue
I ran the code on my machine and all looks good. made one change which is to send the z-score back to 90% confidence interval. I also changed the name of a file.
Also Te your linter doesn't seem to be set up right because the code you're pushing still uses single instead of double quotes.
Overview
very simple work on the CV to follow the recipe in PFF. Apology for the very bad numbering for this branch which was directed at the issue #80 . I also created a separate issue specific to this work #179 .
variance_measurement
added to existing MOE calculation file as a function, the cv calculation is run with the variance_measurement function.
calculate_count and calculate_fractions
Where the
variance_measurement
is run are moved more upstream immediately after the survey package is run. This design helps to simplify the later pivoting and renaming operations later. Also it is noted that moe was not properly added to the final resultskeep_SE
The keep_SE flag is used to decide whether to drop all
se
columns at the end of calculation. However, it should be flagged here that these
columns are not included in the current implementation indev
regardless of the value of this flag because the final reorder columns do not includese
. See code below for reference. It is a bigger design decision on whether the flag should be incorporated in the PUMAggregator class to keep those columns.https://github.com/NYCPlanning/db-equitable-development-tool/blob/1adfe2ddd1674816c5a7c4728eeecfe697ef96f2/aggregate/PUMS/aggregate_PUMS.py#L243-L249