-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
improve cdbg exports #1364
improve cdbg exports #1364
Changes from all commits
f032107
f3f2fd0
320a936
eb0e84c
574830f
c199425
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,16 @@ WITH block_groups AS ( | |
|
||
eligibility_calculation AS ( | ||
SELECT | ||
*, | ||
geoid, | ||
borough_name, | ||
borough_code, | ||
tract, | ||
block_group, | ||
round(total_floor_area::numeric)::integer AS total_floor_area, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what's the data type before the cast to numeric? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess double precision - I forgot you can't just round that. I do think you can just cast a double precision to integer to round though There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. gotcha. I wasn't sure if casting to integer would round correcting, always round in one direction, or truncate |
||
round(residential_floor_area::numeric)::integer AS residential_floor_area, | ||
round(residential_floor_area_percentage::numeric, 2) AS residential_floor_area_percentage, | ||
low_mod_income_population, | ||
round(low_mod_income_population_percentage::numeric, 2) AS low_mod_income_population_percentage, | ||
low_mod_income_population_percentage > 51 AND residential_floor_area_percentage > 50 AS eligibility_flag | ||
FROM block_groups | ||
), | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's just drop the config field entirely?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was gonna try enforcing them next, but in another PR
edit: gonna do the contracts here