This project provides an interactive visualization of how money flows through the American healthcare system using a Sankey diagram. The visualization helps users understand the complex relationships between different healthcare sectors and their financial interactions.
- Interactive Sankey diagram showing money flow between healthcare sectors
- Hover effects to display detailed information about each flow
- Responsive design that works on different screen sizes
- Clean, modern user interface
- Story-based navigation to explore different aspects of healthcare spending
- Interactive bar charts for detailed analysis
- Bibliography section with references and notes
- HTML5
- CSS3
- JavaScript
- D3.js (v7)
- D3-Sankey (v0.12.3)
healthcare-flow/
├── data/
│ ├── nodes.json # Node data for the Sankey diagram
│ ├── links.json # Link data for the Sankey diagram
│ ├── groups.json # Group definitions for nodes
│ ├── stories.json # Story definitions and navigation
│ └── bibliography.json # Bibliography data
├── index.html # Main HTML file
├── styles.css # CSS styles
├── data.js # Data loading and processing
├── sankey.js # Sankey diagram visualization
├── stories.js # Story navigation and display
├── storyCharts.js # Bar chart visualization
└── resize.js # Window resize handling
-
Clone this repository:
git clone https://github.com/[username]/healthcare-flow.git cd healthcare-flow
-
Run a local server (required for loading JSON files):
# Using Python 3 python3 -m http.server # Or using Node.js npx serve
-
Open your browser and navigate to:
- Python:
http://localhost:8000
- Node.js:
http://localhost:3000
- Python:
-
Push your code to a GitHub repository
-
Enable GitHub Pages:
- Go to repository Settings
- Scroll to "GitHub Pages" section
- Select source branch (main or gh-pages)
- Click Save
-
Your site will be available at:
https://[username].github.io/healthcare-flow
The visualization uses several JSON files:
nodes.json
: Represents different healthcare sectorslinks.json
: Represents the money flow between sectorsgroups.json
: Defines node groupings for hierarchical viewstories.json
: Contains story definitions and navigationbibliography.json
: Contains references and notes
To modify the visualization:
- Edit the data in the JSON files in the
data/
directory - Adjust styling in
styles.css
- Modify the visualization logic in
sankey.js
- Update stories in
stories.json
- Add or modify references in
bibliography.json
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
MIT License - feel free to use this project for your own purposes.