<jupyter_start><jupyter_text>Downloading DOB Job Application Filings from Socrata<jupyter_code># Download the full 'DOB Job Application Filings' dataset.

import gzip

from openclean.data.source.socrata import Socrata


outfile = './ic3t-wcy2.tsv.gz'

with gzip.open(outfile, 'wb') as f:
    Socrata().dataset('ic3t-wcy2').write(f)
# Verify that the download was successful. Print dataset columns and number of rows.
# This example makes use of the streaming option to avoid loading the full data frame
# into memory.

from openclean.pipeline import stream

df = stream(outfile)


print('Schema\n------')
for col in df.columns:
    print("  '{}'".format(col))
    
print('\n{} rows.'.format(df.count()))<jupyter_output>Schema
------
  'Job #'
  'Doc #'
  'Borough'
  'House #'
  'Street Name'
  'Block'
  'Lot'
  'Bin #'
  'Job Type'
  'Job Status'
  'Job Status Descrp'
  'Latest Action Date'
  'Building Type'
  'Community - Board'
  'Cluster'
  'Landmarked'
  'Adult Estab'
  'Loft Board'
  'City Owned'
  'Little e'
  'PC Filed'
  'eFiling Filed'
  'Plumbing'
  'Mechanical'
  'Boiler'
  'Fuel Burning'
  'Fuel Storage'
  'Standpipe'
  'Sprinkler'
  'Fire Alarm'
  'Equipment'
  'Fire Suppression'
  'Curb Cut'
  'Other'
  'Other Description'
  'Applicant's First Name'
  'Applicant's Last Name'
  'Applicant Professional Title'
  'Applicant License #'
  'Professional Cert'
  'Pre- Filing Date'
  'Paid'
  'Fully Paid'
  'Assigned'
  'Approved'
  'Fully Permitted'
  'Initial Cost'
  'Total Est. Fee'
  'Fee Status'
  'Existing Zoning Sqft'
  'Proposed Zoning Sqft'
  'Horizontal Enlrgmt'
  'Vertical Enlrgmt'
  'Enlargement SQ Footage'
  'Street Frontage'
  'ExistingNo. of Stories'
  'Proposed No. of Stories'
  [...]
{'fraction_non_alphanumeric': 0.13109048723897912, 'fraction_numerical': 0.002320185614849188, 'mean_word_length': 3.5634920634920637, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '110430', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 681, 'n_tokens_neox': 661, 'n_words': 182, 'path': 'examples/notebooks/city-names/DOB Job Application Filings - Download.ipynb', 'repo_name': 'remram44/openclean-core', 'size': '1724'}