Skip to content
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

DOB Safety Violations layout change #329

Open
austensen opened this issue May 7, 2024 · 0 comments
Open

DOB Safety Violations layout change #329

austensen opened this issue May 7, 2024 · 0 comments

Comments

@austensen
Copy link
Member

We got this error when updating the dob_safety_violations dataset. Seems like they changed the file layout, so we'll need to update our yaml

{'bin': '3116942', 'violationissuedate': '01/06/2006', 'violationnumber': '010606LL629112840', 'violationtype': 'LL6291', 'violationremarks': '', 'violationstatus': 'Active', 'devicenumber': '30000070181Y0001', 'devicetype': 'Boiler', 'cycleenddate': '12/31/2005', 'borough': 'Brooklyn', 'block': '5091', 'lot': '7', 'housenumber': '803', 'street': 'ROGERS AVENUE', 'city': 'New York', 'state': 'New York', 'postcode': '11226', 'latitude': '40.651182', 'longitude': '-73.952513', 'communityboard': '317', 'councildistrict': '40', 'bbl': '3050910007', 'censustract2020': '820', 'neighborhoodtabulationareanta2020': 'East Flatbush-Erasmus'}

  File "/app/load_dataset.py", line 410, in <module>
    main()
  File "/app/load_dataset.py", line 406, in main
    load_dataset(dataset)
  File "/app/load_dataset.py", line 344, in load_dataset
    ds.db_import()
  File "/usr/local/lib/python3.9/site-packages/nycdb/dataset.py", line 86, in db_import
    self.import_schema(schema)
  File "/usr/local/lib/python3.9/site-packages/nycdb/dataset.py", line 132, in import_schema
    batch = list(itertools.islice(rows, 0, BATCH_SIZE))
  File "/usr/local/lib/python3.9/site-packages/nycdb/typecast.py", line 233, in cast_rows
    yield self.cast_row(row)
  File "/usr/local/lib/python3.9/site-packages/nycdb/typecast.py", line 244, in cast_row
    d[column] = self.cast[column.lower()](val)
KeyError: 'postcode'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant