Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions products/cscl/models/product/cdta2020/cdta2020_by_field.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
SELECT
{{ apply_text_formatting_from_seed('text_formatting__cdta2020_dat') }}
FROM {{ source('recipe_sources', 'dcp_cscl_cdtaequiv2020') }}
ORDER BY cdta_code
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
SELECT
{{ apply_text_formatting_from_seed('text_formatting__cdta2020_csv') }}
FROM {{ source('recipe_sources', 'dcp_cscl_cdtaequiv2020') }}
ORDER BY cdta_code
6 changes: 6 additions & 0 deletions products/cscl/models/product/cdta2020/cdta2020_csv.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
SELECT
cdta_code AS "CDTA_CODE",
cdta_name AS "CDTA_NAME",
cdta_type AS "CDTA_TYPE"
FROM {{ ref('cdta2020_by_field_csv') }}
ORDER BY cdta_code
1 change: 1 addition & 0 deletions products/cscl/models/product/cdta2020/cdta2020_dat.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{ select_rows_as_text(model='cdta2020_by_field') }}
4 changes: 4 additions & 0 deletions products/cscl/models/product/nta2020/nta2020_by_field.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
SELECT
{{ apply_text_formatting_from_seed('text_formatting__nta2020_dat') }}
FROM {{ source('recipe_sources', 'dcp_cscl_ntaequiv2020') }}
ORDER BY nta_code
4 changes: 4 additions & 0 deletions products/cscl/models/product/nta2020/nta2020_by_field_csv.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
SELECT
{{ apply_text_formatting_from_seed('text_formatting__nta2020_csv') }}
FROM {{ source('recipe_sources', 'dcp_cscl_ntaequiv2020') }}
ORDER BY nta_code
7 changes: 7 additions & 0 deletions products/cscl/models/product/nta2020/nta2020_csv.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
SELECT
nta_code AS "NTA_CODE",
nta_name AS "NTA_NAME",
nta_abbrev AS "NTA_ABBREV",
nta_type AS "NTA_TYPE"
FROM {{ ref('nta2020_by_field_csv') }}
ORDER BY nta_code
1 change: 1 addition & 0 deletions products/cscl/models/product/nta2020/nta2020_dat.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{ select_rows_as_text(model='nta2020_by_field') }}
4 changes: 4 additions & 0 deletions products/cscl/models/sources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ sources:
- name: dcp_cscl_nypdbeat
- name: dcp_cscl_censustract2010
- name: dcp_cscl_censustract2020
- name: dcp_cscl_cdta2020
- name: dcp_cscl_cdtaequiv2020
- name: dcp_cscl_nta2020
- name: dcp_cscl_ntaequiv2020
- name: dcp_cscl_firecompany
- name: dcp_cscl_healtharea
- name: dcp_cscl_nypdprecinct
Expand Down
1 change: 1 addition & 0 deletions products/cscl/profiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ dcp-de-postgres:
port: "{{ env_var('BUILD_ENGINE_PORT') | as_number }}"
dbname: "{{ env_var('BUILD_ENGINE_DB') }}"
schema: "{{ env_var('BUILD_ENGINE_SCHEMA') }}"
threads: 4
42 changes: 42 additions & 0 deletions products/cscl/recipe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,26 @@ inputs:
custom:
filename: ETL Working GDB.gdb.zip
layer_name: CensusTract2020
- name: dcp_cscl_gdb
import_as: dcp_cscl_cdta2020
custom:
filename: ETL Working GDB.gdb.zip
layer_name: CDTA2020
- name: dcp_cscl_gdb
import_as: dcp_cscl_cdtaequiv2020
custom:
filename: ETL Working GDB.gdb.zip
layer_name: CDTAEquiv2020
- name: dcp_cscl_gdb
import_as: dcp_cscl_nta2020
custom:
filename: ETL Working GDB.gdb.zip
layer_name: NTA2020
- name: dcp_cscl_gdb
import_as: dcp_cscl_ntaequiv2020
custom:
filename: ETL Working GDB.gdb.zip
layer_name: NTAEquiv2020
- name: dcp_cscl_gdb
import_as: dcp_cscl_healtharea
custom:
Expand Down Expand Up @@ -340,3 +360,25 @@ exports:
filename: StatenIslandThinFire.txt
format: dat
custom: { formatting: thinfire_dat }

# CDTA 2020
- name: cdta2020_dat
filename: CDTA2020.txt
format: dat
custom: { formatting: cdta2020_dat }
- name: cdta2020_csv
filename: CDTA2020.csv
format: csv
custom:
line_endings: crlf

# NTA 2020
- name: nta2020_dat
filename: NTA2020.txt
format: dat
custom: { formatting: nta2020_dat }
- name: nta2020_csv
filename: NTA2020.csv
format: csv
custom:
line_endings: crlf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
field_number,field_name,field_label,field_length,start_index,end_index,justify_and_fill,blank_if_none
CDTA1,cdta_code,CDTA Code,4,1,4,LJSF,FALSE
CDTA2,cdta_name,CDTA Name,75,5,79,LJSF,FALSE
CDTA3,cdta_type,CDTA Type,3,80,82,RJSF,FALSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
field_number,field_name,field_label,field_length,start_index,end_index,justify_and_fill,blank_if_none
CDTA1,cdta_code,CDTA Code,4,1,4,LJSF,FALSE
CDTA2,cdta_name,CDTA Name,77,5,81,LJSF,FALSE
CDTA3,cdta_type,CDTA Type,1,82,82,LJSF,FALSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
field_number,field_name,field_label,field_length,start_index,end_index,justify_and_fill,blank_if_none
NTA1,nta_code,NTA Code,6,1,6,LJSF,FALSE
NTA2,nta_name,NTA Name,75,7,81,RJSF,FALSE
NTA3,nta_abbrev,NTA Abbrev,10,82,91,RJSF,FALSE
NTA4,nta_type,NTA Type,1,92,92,LJSF,FALSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
field_number,field_name,field_label,field_length,start_index,end_index,justify_and_fill,blank_if_none
NTA1,nta_code,NTA Code,6,1,6,LJSF,FALSE
NTA2,nta_name,NTA Name,75,7,81,RJSF,FALSE
NTA3,nta_abbrev,NTA Abbrev,10,82,91,RJSF,FALSE
NTA4,nta_type,NTA Type,1,92,92,LJSF,FALSE
8 changes: 4 additions & 4 deletions products/factfinder/README.md
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved because CDTAs are "Geo types From NYC"?

Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,6 @@ collection of CBs, ranging from 1.2k to 8k people. When they get too large/small
Approximation of a neighborhood (e.g. Park Slope) built out of Census Tracts.
[census, ACS]

#### CDTA:
approximation of a CD, composed of NTAs.
[census, ACS]


So All together, the building blocks are:
#### CDTA > NTA > CT > CB
Expand All @@ -106,6 +102,10 @@ So All together, the building blocks are:
Redrawn each decade for census.
[census, ACS]

#### CDTA:
approximation of a CD, composed of NTAs.
[census, ACS]

#### CD (community district)
Similar in size/location to CCD, but are effectively unchanging (at least since 1975)
[census (non-detailed, similar to CB)]
Expand Down
Loading