A comprehensive D3.js-based interactive data visualization platform analyzing global aid flows from the AidData dataset. Explore funding relationships, aid purposes, and temporal trends across 40 years of international development assistance.
The project features a single unified dashboard (index.html) combining four complementary views into one cohesive interface:
1. Aid Flow Network
- Purpose: Sankey-style network showing flows from top 20 donors to top 10 recipients
- Features:
- Left/right ranked lists of donors and recipients
- Link width and color gradient encode total commitment amounts
- Interactive click filtering to highlight connections
- Detail bar chart for top partnerships
- Hover tooltips with transaction details
2. Aid Purpose Breakdown
- Purpose: Purpose-centric analysis across five major aid categories
- Features:
- Gradient-colored links showing purpose composition
- Dual pie charts: pair-level and country-level analysis
- Interactive selection to explore purpose distributions
- Purpose legend identifying education, health, infrastructure, etc.
- Dropdown menus for quick country pair selection
3. Timeline Explorer
- Purpose: Time-series analysis of aid flows (1973β2013)
- Features:
- Stacked or 100% area chart showing flows over time
- Brush selection to zoom into specific time ranges
- Heatmap strip chart (years Γ countries) for activity visualization
- Pie chart showing composition at selected year
- Toggle between Donor/Recipient perspective
- Year-locking to persist selections while exploring
- Ranked side panel with top 20 donors or 10 recipients
4. Unified Dashboard Layout
- Top Left: Purpose breakdown donut chart
- Top Right: Main aid flow network
- Bottom: Timeline with area chart and strip chart
- Benefit: Explore all dimensions simultaneously and see correlations between network structure, purpose allocation, and temporal trends
| Technology | Purpose |
|---|---|
| D3.js v7 | Data binding, scales, axes, SVG rendering, interactive transitions |
| HTML5 & CSS3 | Semantic markup, responsive flexbox layouts, modern styling |
| JavaScript (ES6+) | Data aggregation (rollups), state management, event handling |
| CSV Data | 8.4 MB dataset with donor, recipient, year, amount, and purpose columns |
DataVis-final/
βββ index.html # π― Main dashboard (unified entry point)
βββ aid-flow-visualization.js # Network visualization module
βββ aid-purpose-breakdown.js # Purpose breakdown module
βββ aid-timeline-explorer.js # Timeline explorer module
βββ aiddata-countries-only.csv # Dataset (8.4 MB)
βββ README.md # Project documentation
Single Entry Point: Only index.html - opens the unified dashboard with all four visualizations (network flow, purpose breakdown, timeline explorer, and combined dashboard) fully integrated into one cohesive interface.
- Web Browser (Chrome, Firefox, Safari, Edge β any modern browser)
- Python 3 or Node.js (for local HTTP server)
- Internet Connection (first load to fetch D3.js from CDN)
cd /path/to/DataVis-final
python3 -m http.server 8000
# Open http://localhost:8000 in your browsercd /path/to/DataVis-final
npx http-server
# Follow the printed local address (e.g., http://localhost:8080)- Install the Live Server extension in VS Code
- Right-click
index.htmlorvis1.html - Select "Open with Live Server"
- Unified Dashboard:
http://localhost:8000/index.html - Direct URL (automatic):
http://localhost:8000/(automatically loads index.html)
All features are available in the single index.html dashboard:
- Explore: Hover over links and nodes to see tooltip details
- Focus: Click any country node to highlight its partnerships
- Reset: Click blank area or the same node again to reset
- Details: Use the bar chart below to see top partners
- Select Pair: Click on a network link (top right)
- View Pie: Pie chart shows purpose composition for that donor-recipient pair
- Country Mode: Click a country node or use dropdown to select
- Toggle View: Switch between Donor and Recipient perspective
- Browse: Hover over the strip chart to see values at each year
- Zoom: Drag on the strip chart to brush-select a time range; main chart zooms
- Lock Year: Click axis label to lock a year; pie updates but you can still browse
- Select Entity: Click side list to focus on specific donor or recipient
- Toggle Scale: Switch between absolute (stacked) and 100% (normalized) views
- Normalize: Checkbox to show percentage shares instead of absolute amounts
Source: AidData
File: aiddata-countries-only.csv (8.4 MB)
| Column | Description |
|---|---|
donor |
Country or organization providing aid |
recipient |
Country receiving aid |
commitment_amount_usd_constant |
Funding amount in USD (constant value) |
year |
Year of commitment (1973β2013) |
coalesced_purpose_name |
Primary aid category/purpose |
- Time Range: 1973β2013 (41 years)
- Top Donors: 20 countries by total amount
- Top Recipients: 10 countries by total amount
- Top Purposes: 5 categories (e.g., Education, Health, Infrastructure)
- Records: Millions of individual aid records aggregated by donor-recipient-year-purpose
Each visualization is self-contained in its own JavaScript file:
- Edit
aid-flow-visualization.jsto customize Visualization 1 - Edit
aid-purpose-breakdown.jsto customize Visualization 2 - Edit
aid-timeline-explorer.jsto customize Visualization 3
// Example from aid-flow-visualization.js
const MAIN_WIDTH = 1100; // SVG width
const MAIN_HEIGHT = 620; // SVG height
const BASE_OPACITY = 0.75; // Default link opacity
const NODE_RADIUS = 7; // Node circle radius- Replace
aiddata-countries-only.csvwith your own CSV file - Ensure columns match the expected schema (donor, recipient, amount, year, purpose)
- Refresh the browser; D3 automatically reloads and re-aggregates
CSS is embedded in each HTML file within <style> tags. Customize colors, fonts, and spacing there.
- Links: Show tooltip with donor, recipient, amount
- Nodes: Highlight connected links
- Timeline: Show vertical focus line at mouse position
- Network nodes: Focus on that country's flows; update detail chart
- Timeline year labels: Lock/unlock that year view
- Pie charts: (Interactive but no click action in current version)
- No keyboard shortcuts currently implemented (future enhancement opportunity)
- Data Size: 8.4 MB CSV loads in ~1β2 seconds
- Rendering: Top 20 donors Γ top 10 recipients = 200 max links; smooth 60 FPS
- Timeline: 40 years Γ 30 entities = 1,200 cells; efficient band scales
- Recommended: Chrome or Firefox for best performance; Safari slightly slower
- Ensure
aiddata-countries-only.csvis in the same directory as HTML files - Make sure you're accessing via HTTP (not
file://)
- Check browser console (F12 β Console tab) for error messages
- Ensure HTTP server is running:
python3 -m http.server 8000 - Verify D3.js CDN is accessible (requires internet)
- Hard refresh browser (Cmd+Shift+R on Mac, Ctrl+Shift+R on Windows)
- Clear browser cache
- Test in a different browser
- β Google JavaScript Style Guide compliance throughout
- β 2-space indentation (consistent across all files)
- β camelCase for variables and functions
- β UPPER_CASE for constants
- β English comments for clarity and team collaboration
- β
Descriptive file naming (e.g.,
aid-flow-visualization.js) - β
Single unified entry point (
index.html) - β Professional code organization ready for production
To contribute improvements:
- Create a new branch:
git checkout -b feature/your-feature - Make changes to the relevant files
- Test in all three visualizations
- Commit with clear messages:
git commit -m "feat: add new feature" - Push and create a Pull Request
- Follow Google JavaScript Style Guide
- Use 2-space indentation
- Add JSDoc comments for new functions
- Name variables in camelCase, constants in UPPER_CASE
This project is for educational and analytical purposes. The AidData dataset is provided under AidData's terms. Respect intellectual property and cite sources appropriately.
Project: CSE 5544 Data Visualization
Data Source: AidData
D3.js: Mike Bostock et al.
If you encounter issues:
- Check the Troubleshooting section above
- Review browser console for error messages (F12)
- Consult the QUICK_START.md guide
- Read JSDoc comments in the JavaScript files
- D3.js Documentation: https://d3js.org/
- AidData: https://www.aiddata.org/
- Google JavaScript Style Guide: https://google.github.io/styleguide/javascriptguide.html
- MDN Web Docs: https://developer.mozilla.org/
- Keyboard navigation (arrow keys, Enter/Escape)
- Export functionality (PNG, SVG, CSV of filtered data)
- Mobile-responsive design
- Accessibility improvements (ARIA labels, screen reader support)
- Unit tests for data aggregation functions
- Dark mode toggle
- Additional visualizations (choropleth map, scatter plot)
- Search and filter UI
Last Updated: February 2, 2026
Status: Production Ready β
Version: 2.0 (Refactored & Optimized)
Start exploring! Open index.html in your browser (via HTTP server) and discover global aid patterns. π