A web application for exploring and analyzing the budget data of the Portland Metro area. This project aims to provide an interactive and user-friendly way to understand how public funds are allocated and spent across different departments.
- Interactive budget visualization using Chart.js
- Responsive design built with Tailwind CSS
- Type-safe development with TypeScript
- Easy to maintain and extend data structure
- Per capita expense comparisons
- Funding source analysis
- Parent-child relationship tracking for budget items
The application uses a structured JSON data model to represent budget information:
interface BudgetItem {
id: string; // Unique identifier
name: string; // Department or program name
administrativeUnit: string; // City, County, Metro
cityName: string; // City name for comparison
totalExpense: number; // Total expense in dollars
totalRevenue: number; // Total revenue in dollars
perCapitaExpense: number; // Per capita expense for comparison
year: number; // Fiscal year
grouping: string; // Category grouping
parentId: string | null; // Parent department ID
children: string[]; // Child department IDs
fundingSources: string[]; // Sources of funding
notes: string; // Additional notes
references: Reference[]; // Data sources and references
allocation: number; // Percentage of total budget
description: string; // Brief description
}- Node.js 18.0 or later
- npm (comes with Node.js)
- Clone the repository:
git clone [your-repo-url]
cd portland_works- Install dependencies:
npm install- Run the development server:
npm run dev- Open http://localhost:3000 in your browser.
/src/app- Next.js app router pages and layouts/src/components- Reusable React components/src/components/charts- Chart components using Chart.js/src/data- JSON data files containing budget information/src/types- TypeScript type definitions
This project is configured for deployment to GitHub Pages using GitHub Actions. The deployment process is automated:
- Push your changes to the main branch
- GitHub Actions will automatically build and deploy the site
- The site will be available at
https://[your-username].github.io/portland_works
If you need to deploy manually:
- Build the project:
npm run build- Push to your GitHub repository:
git push origin main- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.