Free 2023 Data Update When You Buy Now. Details

readme.md

Cumulo /incomebyzipcode.com

DESCRIBE SITE

Development Setup

Debugging Build Time

To get times off the build run

bundle exec jekyll build --profile

Production Setup

See Bettercensus/lib/tasks/cumulo.rake

Production build: export JEKYLL_ENV=production; bundle exec jekyll build; purgecss -c purgecss.config.js

Deploying

configure netlify.toml

Purge CSS commands

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’

Maps

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.

TODO:

Title Tag

The template is [geoname] Income Statistics - Current Census Data for Zip Codes

Create Data Files

Run the ruby scripts in _docs. Create the table, then create the paragraphs. Export a CSV from Postgres.

Export the file:

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)