This project explores NYC campaign donations using:
- PostgreSQL for data cleaning and transformation
- SQL queries for meaningful reports
- Tableau for interactive visuals highlighting top donors, fund trends, donation growth, and US state distribution.
The dataset comes from NYC Open Data’s public Campaign Contributions table (https://data.cityofnewyork.us/d/rjkp-yttg), which contains detailed donation records including:
- Donor Name, City, State, ZIP
- Recipient (Fund Name)
- Contribution Date
- Contribution Amount
For this project, the raw data was imported into PostgreSQL, cleaned and transformed using SQL queries to:
- Standardize column names
- Filter out invalid records (negative or null donations)
- Convert dates to proper date formats
- Prepare summary tables for reporting
- PostgreSQL: for data storage, cleaning, and reusable SQL Views.
- DBeaver: for developing and testing SQL queries in a visual, convenient IDE.
- Tableau: for building interactive visualizations and dashboards.
- Total donations per fund
- Donation trends over time
- Top 10 individual donors
- Donations summarized by state
- Year-over-Year % change
- Donor retention — donors who gave in consecutive years
- Average donation per fund
- Fund popularity (unique donors per fund)
These were implemented as SQL Views in PostgreSQL, then connected to Tableau.
-
Top 10 Donors What it shows: Who contributed the most money overall. Key Insight: Highlights key donors whose large contributions can significantly influence fundraising totals. Useful to spot potential major backers and repeat high-value supporters.
-
Total Donations per Fund What it shows: How much money each political fund or candidate has raised in total. Key Insight: Makes it easy to see which campaigns attract the most financial support. Helps identify the top-performing funds and where donor money is concentrated.
-
Donation Trend Over Time What it shows: Donations by month/year to spot seasonal or campaign cycle peaks. Key Insight: Reveal clear spikes during election years and fundraising drives. Shows how public engagement and donor enthusiasm shift over time.
-
% Change Year Over Year What it shows: The growth or decline in total donations compared to the previous year. Key Insight: Tracks whether overall fundraising is gaining momentum or losing steam. Helps spot exceptional growth years or drops that could signal political or economic shifts.
-
Fund Popularity What it shows: How many unique donors contribute to each fund. Key Insight: Highlights which funds have broad community support versus those reliant on a few major donors. Useful to understand grassroots backing versus big-donor dependence.
-
Average Donation per Fund What it shows: The average size of a donation for each fund. Key Insight: Shows whether a fund raises money mainly through small donations from many people or larger contributions from fewer donors.
-
Donations by State What it shows: Geographic distribution of contributions across the U.S. Key Insight: Maps out which states contribute the most. Reveals regional hotspots of political giving and potential target areas for campaign outreach.
-
Donor Retention What it shows: How many donors gave in consecutive years. Key Insight: Measures donor loyalty and repeat support.
- Run the SQL scripts (Donation.sql) in your PostgreSQL environment to create tables and views.
- Open the Tableau workbook (.twbx) and connect to your local or extracted data.
- Or, view the live dashboard directly