-
Notifications
You must be signed in to change notification settings - Fork 0
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
Finalize/clean up ingest models, add additional preprocessing #1166
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
40afa80
cleanup #1155
fvankrieken c371fd7
add dcp_commercialoverlay to ingest
fvankrieken b1a886d
move ingest templates to 'dev' folder
fvankrieken ad740fa
add attributes section to ingest templates
fvankrieken 8f2d9e1
use sorted base, rework ingest models
fvankrieken aa6cd11
adjust tests for previous commit
fvankrieken 9a2c5bc
add acs2010 datasets to 'production'
fvankrieken da3e437
add columns to ingest templates
fvankrieken d6d4e4a
fix renaming of geom column
fvankrieken d9ca493
add default step to convert geoms to multi
fvankrieken c4ba473
REVIEW: remove one remaining BaseModel reference
fvankrieken f2ecc05
REVIEW: missing type signature
fvankrieken 2b856c3
make attributes field required in ingest config
fvankrieken File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
id: dcp_commercialoverlay | ||
acl: public-read | ||
|
||
attributes: | ||
name: DCP NYC Commercial Overlay Districts | ||
description: | | ||
Polygon features representing the within-tax-block limits for commercial overlay districts, | ||
as shown on the DCP zoning maps. Commercial overlay district designations are indicated in the OVERLAY attribute. | ||
url: https://www1.nyc.gov/site/planning/data-maps/open-data/dwn-gis-zoning.page#metadata | ||
|
||
ingestion: | ||
target_crs: EPSG:4326 | ||
source: | ||
type: edm_publishing_gis_dataset | ||
name: dcp_commercial_overlays | ||
file_format: | ||
type: shapefile | ||
crs: EPSG:2263 | ||
processing_steps: | ||
- name: rename_columns | ||
args: | ||
map: {"geom": "wkb_geometry"} | ||
|
||
columns: | ||
- id: overlay | ||
data_type: text | ||
- id: shape_leng | ||
data_type: decimal | ||
- id: shape_area | ||
data_type: decimal | ||
- id: wkb_geometry | ||
data_type: geometry |
72 changes: 24 additions & 48 deletions
72
dcpy/lifecycle/ingest/templates/dcp_pop_acs2010_demographic.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,28 @@ | ||
id: dcp_pop_acs2010_demographic | ||
acl: public-read | ||
source: | ||
type: local_file | ||
path: .library/upload/CCD2023_ACS0610Data_for1822Update.xlsx | ||
file_format: | ||
type: xlsx | ||
sheet_name: CCD2023_Dem0610 | ||
dtype: | ||
GeoID: str | ||
processing_steps: | ||
- name: clean_column_names | ||
args: | ||
lower: true | ||
- name: append_prev | ||
mode: append | ||
- name: upsert_column_of_previous_version | ||
args: | ||
key: [geotype, geoid] | ||
insert_behavior: error | ||
missing_key_behavior: error | ||
mode: update_column | ||
|
||
library_dataset: | ||
name: dcp_pop_acs2010_demographic | ||
version: "" | ||
acl: public-read | ||
source: | ||
script: | ||
name: excel | ||
path: https://nyc3.digitaloceanspaces.com/edm-recipes/inbox/dcp_pop_acs2010/{{ version }}/dcp_pop_acs.xlsx | ||
sheet_name: Dem0610 | ||
geometry: | ||
SRS: null | ||
type: NONE | ||
|
||
destination: | ||
geometry: | ||
SRS: null | ||
type: NONE | ||
fields: [] | ||
sql: null | ||
attributes: | ||
name: DCP Population 2010 ACS Demographic Data | ||
description: | | ||
This file is produced internally by the Population division. 2010 version is used as a reference dataset | ||
for the latest ACS data, and occasionally is modified so these different subsections are archived as their | ||
own recipe datasets so that they can easily be updated individually | ||
|
||
info: | ||
description: | | ||
## 2010 ACS file from Population | ||
This file is produced internally by the Population division. 2010 version is used as a reference dataset | ||
for the latest ACS data, and occasionally is modified so these different subsections are archived as their | ||
own recipe datasets so that they can easily be updated individually | ||
|
||
url: null | ||
dependents: [] | ||
ingestion: | ||
source: | ||
type: local_file | ||
path: .library/upload/CCD2023_ACS0610Data_for1822Update.xlsx | ||
file_format: | ||
type: xlsx | ||
sheet_name: CCD2023_Dem0610 | ||
dtype: | ||
GeoID: str | ||
processing_steps: | ||
- name: append_prev | ||
mode: append | ||
- name: upsert_column_of_previous_version | ||
args: | ||
key: [geotype, geoid] | ||
insert_behavior: error | ||
missing_key_behavior: error | ||
mode: update_column |
72 changes: 24 additions & 48 deletions
72
dcpy/lifecycle/ingest/templates/dcp_pop_acs2010_economic.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,28 @@ | ||
id: dcp_pop_acs2010_economic | ||
acl: public-read | ||
source: | ||
type: local_file | ||
path: .library/upload/CCD2023_ACS0610Data_for1822Update.xlsx | ||
file_format: | ||
type: xlsx | ||
sheet_name: CCD2023_Econ0610_NotInflated | ||
dtype: | ||
GeoID: str | ||
processing_steps: | ||
- name: clean_column_names | ||
args: | ||
lower: true | ||
- name: append_prev | ||
mode: append | ||
- name: upsert_column_of_previous_version | ||
args: | ||
key: [geotype, geoid] | ||
insert_behavior: error | ||
missing_key_behavior: error | ||
mode: update_column | ||
|
||
library_dataset: | ||
name: dcp_pop_acs2010_economic | ||
version: "" | ||
acl: public-read | ||
source: | ||
script: | ||
name: excel | ||
path: https://nyc3.digitaloceanspaces.com/edm-recipes/inbox/dcp_pop_acs2010/{{ version }}/dcp_pop_acs.xlsx | ||
sheet_name: Econ0610 | ||
geometry: | ||
SRS: null | ||
type: NONE | ||
|
||
destination: | ||
geometry: | ||
SRS: null | ||
type: NONE | ||
fields: [] | ||
sql: null | ||
attributes: | ||
name: DCP Population 2010 ACS Economic Data | ||
description: | | ||
This file is produced internally by the Population division. 2010 version is used as a reference dataset | ||
for the latest ACS data, and occasionally is modified so these different subsections are archived as their | ||
own recipe datasets so that they can easily be updated individually | ||
|
||
info: | ||
description: | | ||
## 2010 ACS file from Population | ||
This file is produced internally by the Population division. 2010 version is used as a reference dataset | ||
for the latest ACS data, and occasionally is modified so these different subsections are archived as their | ||
own recipe datasets so that they can easily be updated individually | ||
|
||
url: null | ||
dependents: [] | ||
ingestion: | ||
source: | ||
type: local_file | ||
path: .library/upload/CCD2023_ACS0610Data_for1822Update.xlsx | ||
file_format: | ||
type: xlsx | ||
sheet_name: CCD2023_Econ0610_NotInflated | ||
dtype: | ||
GeoID: str | ||
processing_steps: | ||
- name: append_prev | ||
mode: append | ||
- name: upsert_column_of_previous_version | ||
args: | ||
key: [geotype, geoid] | ||
insert_behavior: error | ||
missing_key_behavior: error | ||
mode: update_column |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
is this redundant since
transform.validate_process_steps
is called duringtransform.preprocess
?and if we do wanna validate early, would it make sense to do it during
configure.get_config
or mayberead_template
?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.
talked about it and we'll keep it here. it's nicer to assemble these pieces at a high-level rather than have ingest modules importing each other