-
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 1 commit
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
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
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 haven't seen this file. Nice! |
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 |
---|---|---|
@@ -1,6 +1,7 @@ | ||
id: dcp_atomicpolygons | ||
acl: public-read | ||
source: | ||
type: file_download | ||
url: https://s-media.nyc.gov/agencies/dcp/assets/files/zip/{{ dummy_jinja_var }}/bytes/nyap_{{ version }}.zip | ||
file_format: | ||
ingestion: | ||
source: | ||
type: file_download | ||
url: https://s-media.nyc.gov/agencies/dcp/assets/files/zip/{{ dummy_jinja_var }}/bytes/nyap_{{ version }}.zip | ||
file_format: |
22 changes: 22 additions & 0 deletions
22
dcpy/test/lifecycle/ingest/resources/templates/bpl_libraries.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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
id: bpl_libraries | ||
acl: public-read | ||
|
||
ingestion: | ||
source: | ||
type: api | ||
endpoint: https://www.bklynlibrary.org/locations/json | ||
format: json | ||
file_format: | ||
type: json | ||
json_read_fn: normalize | ||
json_read_kwargs: { "record_path": ["locations"] } | ||
geometry: | ||
geom_column: data.position | ||
crs: EPSG:4326 | ||
format: | ||
point_xy_str: "y, x" | ||
processing_steps: | ||
- name: clean_column_names | ||
args: | ||
replace: | ||
"data.": "" |
14 changes: 14 additions & 0 deletions
14
dcpy/test/lifecycle/ingest/resources/templates/dca_operatingbusinesses.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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
id: dca_operatingbusinesses | ||
acl: public-read | ||
|
||
ingestion: | ||
source: | ||
type: socrata | ||
org: nyc | ||
uid: w7w3-xahh | ||
format: csv | ||
file_format: | ||
type: csv | ||
geometry: | ||
geom_column: location | ||
crs: EPSG:4326 |
12 changes: 12 additions & 0 deletions
12
dcpy/test/lifecycle/ingest/resources/templates/dcp_addresspoints.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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
id: dcp-addresspoints | ||
acl: public-read | ||
|
||
ingestion: | ||
source: | ||
type: edm_publishing_gis_dataset | ||
name: dcp_address_points | ||
file_format: | ||
unzipped_filename: dcp_address_points.shp | ||
type: shapefile | ||
crs: EPSG:2263 | ||
target_crs: EPSG:4326 |
11 changes: 11 additions & 0 deletions
11
dcpy/test/lifecycle/ingest/resources/templates/dcp_atomicpolygons.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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
id: dcp_atomicpolygons | ||
acl: public-read | ||
|
||
ingestion: | ||
source: | ||
type: file_download | ||
url: https://s-media.nyc.gov/agencies/dcp/assets/files/zip/data-tools/bytes/nyap_{{ version }}.zip | ||
file_format: | ||
unzipped_filename: nyap_{{ version }}/nyap.shp | ||
type: shapefile | ||
crs: EPSG:2263 |
24 changes: 24 additions & 0 deletions
24
dcpy/test/lifecycle/ingest/resources/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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
id: dcp_pop_acs2010_demographic | ||
acl: public-read | ||
|
||
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: 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 |
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
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
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