Skip to content
This repository has been archived by the owner on Mar 12, 2024. It is now read-only.

dep_cats_permits

SPTKL edited this page Jun 29, 2020 · 2 revisions

DEP CATS Permits

DDL

CREATE TABLE dep_cats_permits (
    requestid text,
    applicationid text,
    requesttype text,
    ownername text,
    expiration_date date,
    make text,
    model text,
    burnermake text,
    burnermodel text,
    primaryfuel text,
    secondaryfuel text,
    quantity text,
    issue_date date,
    status text,
    premisename text,
    housenum text,
    streetname text,
    address text,
    streetname_1 text,
    streetname_2 text,
    borough text,
    geo_housenum text,
    geo_streetname text,
    geo_address text,
    geo_bbl bigint,
    geo_bin text,
    geo_latitude double precision,
    geo_longitude double precision,
    geo_x_coord double precision,
    geo_y_coord double precision,
    geo_function text,
    geom geometry(Point,4326)
);

About

The dep_cats_permits dataset is coming from NYC Opendata. It contains information on current boiler and industrial operation permits in New York City registered with DEP. Data Engineering is enhancing this dataset by providing geospatial attributes using geosupport.

Also not all records coming from NYC Opendata are kept in the final dep_cats_permits, the following filter is applied to select relevant records:

SELECT ...
FROM dep_cats_permits
WHERE TRIM(status) != 'CANCELLED'
AND LEFT(applicationid, 1) != 'G'
AND (LEFT(applicationid, 1) != 'C'
    OR (requesttype != 'REGISTRATION'
        AND requesttype != 'REGISTRATION INSPECTION'
        AND requesttype != 'BOILER REGISTRATION II'))
AND (LEFT(applicationid, 2) != 'CA'
    OR requesttype != 'WORK PERMIT'
    OR TRIM(status) != 'EXPIRED')
Clone this wiki locally