readme.md
DESCRIBE SITE
To get times off the build run
bundle exec jekyll build --profile
See Bettercensus/lib/tasks/cumulo.rake
Production build: export JEKYLL_ENV=production; bundle exec jekyll build; purgecss -c purgecss.config.js
configure netlify.toml
If purgecss.config.js exists: purgecss -c purgecss.config.js else purgecss –css ‘_site/assets/css/bootstrap.css’ –content ‘_site/*/.html’ –output ‘_site/css/bootstrap.css’
Do the same as Contrail - write the names of the zips you want into a variable ex.
var neighbors = “‘78745’,’78746’”;
Then defer load the scripts you need, then use the same JS from contrail to pull from a dataset in CARTO.
The template is [geoname] Income Statistics - Current Census Data for Zip Codes
Run the ruby scripts in _docs. Create the table, then create the paragraphs. Export a CSV from Postgres.
Export the production file as follows:
select
id,
geoname,
permalink,
abbrev,
geography_type,
median_household_income_paragraph,
average_household_income_paragraph,
per_capita_income_paragraph,
percent_high_income_households_paragraph,
median_household_income_table,
average_household_income_table,
per_capita_income_table,
percent_high_income_households_table,
median_household_income_by_age_householder_table,
neighbor_moes
from
cumulo_datas
where geography_type IN ('state','zip')
order by geoid
;
Note about the weird percent_high_income_households numbers (ex. 0.23e1) I think what’s happening is the new jam values are throwing off the storage. It’s not wrong but I will just have to add a step to format it when exporting. (ex. -666666666.0)
Go to the latest Tiger data you have, then run this after updating the table name
SELECT
name,
ROUND(CAST(ST_X(ST_CENTROID(ST_TRANSFORM(geom, 4326))) AS NUMERIC),4) AS lng,
ROUND(CAST(ST_Y(ST_CENTROID(ST_TRANSFORM(geom, 4326))) AS NUMERIC),4) AS lat
FROM tl_2023_us_zcta520
ORDER BY name;