Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified data/nyc_parking_violations.db
Binary file not shown.
Binary file modified data/prod_nyc_parking_violations.db
Binary file not shown.
4 changes: 4 additions & 0 deletions nyc_parking_violations_ao/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

target/
dbt_packages/
logs/
1 change: 1 addition & 0 deletions nyc_parking_violations_ao/.user.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
id: 1a9a2d63-204c-42a0-b85c-bbd98e63a240
15 changes: 15 additions & 0 deletions nyc_parking_violations_ao/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Welcome to your new dbt project!

### Using the starter project

Try running the following commands:
- dbt run
- dbt test


### Resources:
- Learn more about dbt [in the docs](https://docs.getdbt.com/docs/introduction)
- Check out [Discourse](https://discourse.getdbt.com/) for commonly asked questions and answers
- Join the [chat](https://community.getdbt.com/) on Slack for live discussions and support
- Find [dbt events](https://events.getdbt.com) near you
- Check out [the blog](https://blog.getdbt.com/) for the latest news on dbt's development and best practices
Empty file.
53 changes: 53 additions & 0 deletions nyc_parking_violations_ao/dbt_project.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@

# Name your project! Project names should contain only lowercase characters
# and underscores. A good package name should reflect your organization's
# name or the intended use of these models
name: 'nyc_parking_violations_ao'
version: '1.0.0'
config-version: 2

# This setting configures which "profile" dbt uses for this project.
profile: 'nyc_parking_violations_ao'

# These configurations specify where dbt should look for different types of files.
# The `model-paths` config, for example, states that models in this project can be
# found in the "models/" directory. You probably won't need to change these!
model-paths: ["models"]
analysis-paths: ["analyses"]
test-paths: ["tests"]
seed-paths: ["seeds"]
macro-paths: ["macros"]
snapshot-paths: ["snapshots"]

clean-targets: # directories to be removed by `dbt clean`
- "target"
- "dbt_packages"


# Configuring models
# Full documentation: https://docs.getdbt.com/docs/configuring-models

# In this example config, we tell dbt to build all models in the example/
# directory as views. These settings can be overridden in the individual model
# files using the `{{ config(...) }}` macro.
models:
nyc_parking_violations_ao:
# Config indicated by + and applies to all files under models/example/
example:
+materialized: ephemeral
bronze:
+materialized: view
silver:
silver_parking_violation_codes:
+materialized: ephemeral
silver_parking_violations:
+materialized: ephemeral
silver_violation_tickets:
+materialized: view
silver_violation_vehicles:
+materialized: view
gold:
+materialized: table
tests:
+store_failures: true

Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
SELECT
code AS violation_code,
definition,
manhattan_96th_st_below,
all_other_areas
FROM
parking_violation_codes
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
SELECT
summons_number,
registration_state,
plate_type,
issue_date,
violation_code,
vehicle_body_type,
vehicle_make,
issuing_agency,
vehicle_expiration_date,
violation_location,
violation_precinct,
issuer_precinct,
issuer_code,
issuer_command,
issuer_squad,
violation_time,
violation_county,
violation_legal_code,
vehicle_color,
vehicle_year,
FROM
parking_violations_2023
107 changes: 107 additions & 0 deletions nyc_parking_violations_ao/models/docs/docs_block.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
{% docs violation_code %}
Code representing the specific parking violation.
{% enddocs %}

{% docs definition %}
Description of the violation for a respective code.
{% enddocs %}

{% docs manhattan_96th_st_below %}
The fee in $USD for a violation on or below Manhattan 96th Street.
{% enddocs %}

{% docs all_other_areas %}
The fee in $USD for a violation not on or below Manhattan 96th Street.
{% enddocs %}

{% docs summons_number %}
Unique identifier for each summons issued for a parking violation.
{% enddocs %}

{% docs registration_state %}
The state where the vehicle is registered.
{% enddocs %}

{% docs plate_type %}
The type of license plate.
{% enddocs %}

{% docs issue_date %}
The date when the summons was issued.
{% enddocs %}

{% docs vehicle_body_type %}
The body type of the vehicle involved in the violation.
{% enddocs %}

{% docs vehicle_make %}
The make or brand of the vehicle.
{% enddocs %}

{% docs issuing_agency %}
The agency that issued the summons.
{% enddocs %}

{% docs vehicle_expiration_date %}
The date when the vehicle's registration expires.
{% enddocs %}

{% docs violation_location %}
General location where the violation occurred.
{% enddocs %}

{% docs violation_precinct %}
Precinct where the violation was identified.
{% enddocs %}

{% docs issuer_precinct %}
Precinct of the officer or official who issued the summons.
{% enddocs %}

{% docs issuer_code %}
Unique code identifying the issuer.
{% enddocs %}

{% docs issuer_command %}
Command or unit of the issuer.
{% enddocs %}

{% docs issuer_squad %}
Squad detail for the issuer.
{% enddocs %}

{% docs violation_time %}
Time when the violation occurred.
{% enddocs %}

{% docs violation_county %}
County where the violation took place.
{% enddocs %}

{% docs violation_legal_code %}
Legal code associated with the violation.
{% enddocs %}

{% docs vehicle_color %}
Color of the vehicle involved in the violation.
{% enddocs %}

{% docs vehicle_year %}
Manufacturing year of the vehicle.
{% enddocs %}

{% docs fee_usd %}
The fee charged for a parking violation, specified in USD. This fee varies depending on the location of the violation.
{% enddocs %}

{% docs is_manhattan_96th_st_below %}
A boolean value indicating whether the violation occurred in Manhattan on or below 96th Street.
{% enddocs %}

{% docs ticket_count %}
The total number of tickets issued for a specific violation code.
{% enddocs %}

{% docs total_revenue_usd %}
The total revenue accumulated from tickets, based on the violation code. This sum is represented in USD.
{% enddocs %}
Loading