On day two of the capstone project I started with a major setback. At about 5:30, my Alteryx crashed and I forgot to save my workflow so I ended up losing about 4 hours of work. After scouring my cache, autosave files and even my hidden files I finally gave up and decided to start over the next day. So, I began the day by rebuilding my two Alteryx workflows where I made calls to the US Census Bureau API to obtain housing data and neighborhood demographic data in NYC.
Luckily, I remember the exact steps I took so I was actually able to create a more efficient workflow that parsed and transformed my data for all 5 boroughs at once instead of doing one borough at a time. However, I arrived at my first, and main, relatively quickly when I attempted to pivot from rows to columns so that the structure was more sound. After, flattening my first array, the JSON parse tool automatically assigned and index, to what I thought was, each borough and tract pair. For reference, the borough ID and tract indicated the granularity of my data. However, when I pivoted my data based on that index, I got a plethora of concatenated rows.

This is not what I was expecting, so, after some investigating I discovered that the automatic id column that the JSON parse tool assigned to each row was not unique. Multiple counties could share an ID if they had a common tract number. My solution to this problem was to create a unique ID for each county and tract pair so that when I conducted the pivot my row would be defined by those two variables. I did this by creating a multi-row formula right after my JSON parse tool that partitioned each row by the ID that was already created. So, that each county and tract had a unique ID.
Another blocker that I ran into was during my data validation process. As I was scrolling through the US Census developers page, I found that they updated some of their table codes in 2024 so I had to parse the Excel file and search for every single code that I used to see if it changed and a few of them did! Luckily I caught this early.

Schema Development
After I finished my Alteryx flows and data dictionaries, I began building out my schema which ended up consisting of two fact tables and three dimension tables.

I decided to let the maintenance code violations dataset be my fact table because that is updated every time there is a new violation. One of the first issue I ran into when creating the fact table was determine which columns to include and eliminate so I cross-referenced my data dictionary with the user stories. If the New York Housing Authority is using my dashboard to determine which neighborhoods and buildings to prioritize for maintenance (in an equitable way) then a few key pieces of information they would need are:
- Locations: From the borough level down to the building level
- Violation Severity
- Time to Correct Violations
- Demographic Details (i.e. neighborhood density, racial makeup etc.)
Even as I was drawing out my schema I was contemplating on how I could visualize the Time to Correct Violations, but when I was reading the data dictionary for this dataset on NYC open data I noticed a glaring lack of specificity and context for their date field that led to some confusion.

There are seven different date fields that all mean something different without any clear distinction on when a violation was reported and when it was fixed. Most of my confusion was inspired by all the different "Certify" date fields because why is the does the column header contain that word when the description(s) indicates whether a violation was reported corrected/corrected. These naming conventions truly add lots of fuzz when attempting to understand the data. And, after looking at the data in Alteryx I found that the "NewCertifyByDate", "NewCorrectByDate" and "CertifiedDate" are mostly null! The amount of nulls in the "CertifiedDate" was especially alarming because does that mean the violation was never corrected? Ultimately, I only decided to drop the "NewCertifyByDate" and "NewCorrectByDate" to reduce the amount of nulls I'd have in my data.
Next Steps
- Connect Alteryx to Snowflake so that I can import my data and create my tables in SQL
- Use DDL and DML commands to make my tables in SQL. This will be done by tomorrow, but, ideally I want it done by the morning so I can sketch my dashboards.
- Build my two dashboards!
- Document, Document, Document!

