Policy Visualizer is an AI-powered application that helps you explore and understand how different countries, ideologies, and political systems approach common policy challenges. Using the Gemini AI API, the application analyzes policy issues, clusters similar approaches, and provides interactive visualizations to help identify patterns and differences across global policy landscapes.
- AI-Driven Policy Analysis: Enter any policy challenge and receive a comprehensive analysis powered by Gemini AI
- Multi-Dimensional Clustering: Visualize policies grouped by various taxonomies (geographic, ideological, system-based, etc.)
- Interactive Visualization: Explore clusters and individual country approaches through an intuitive tabbed interface
- Detailed Summaries: Click on any cluster or country to view in-depth analysis and policy descriptions
- Responsive Design: Modern, dark-themed UI built with React and TypeScript
- Frontend: React 19.2 with TypeScript
- Build Tool: Vite 6.2
- AI Integration: Google Gemini API (@google/genai)
- Styling: Tailwind CSS (via utility classes)
- State Management: React Hooks
- Node.js (version 18 or higher recommended)
- A Gemini API key (get one from Google AI Studio)
-
Clone the repository:
git clone https://github.com/danielrosehill/Policy-Visualiser.git cd Policy-Visualiser -
Install dependencies:
npm install
-
Set up your API key:
- Create a
.env.localfile in the root directory - Add your Gemini API key:
GEMINI_API_KEY=your_api_key_here
- Create a
-
Run the development server:
npm run dev
-
Open your browser and navigate to
http://localhost:5173
npm run buildThe built files will be in the dist directory.
- Enter a policy challenge in the input field (e.g., "healthcare reform", "climate change mitigation", "immigration policy")
- Click "Visualize" to generate the analysis
- Explore different taxonomies through the tabs (by region, ideology, system type, etc.)
- Click on clusters to see their descriptions
- Click on individual countries/entities to read detailed policy summaries
Policy-Visualiser/
├── components/ # React components
│ ├── Header.tsx
│ ├── PolicyInput.tsx
│ ├── LoadingIndicator.tsx
│ ├── VisualizationTabs.tsx
│ ├── InfoModal.tsx
│ ├── ErrorDisplay.tsx
│ └── WelcomeScreen.tsx
├── services/ # API integration
│ └── geminiService.ts
├── App.tsx # Main application component
├── types.ts # TypeScript type definitions
├── index.tsx # Application entry point
├── vite.config.ts # Vite configuration
└── package.json # Project dependencies
This project contains a proof of concept (POC) that was autopopulated by Google AI Studio. It is intended as a code starter and may not yet have been manually reviewed and/or taken further. I create some Gemini POCs, in particular, to experiment with/test the capabilities of multimodal AI.
View the original app in AI Studio: https://ai.studio/apps/drive/1M1CKMJ8U3ZLoaM82nfTyyLm7-r4Z1oyM
- Gemini Vibe Coding Projects - Index of my Google AI Studio POCs
- GitHub Master Index - Complete index of all my GitHub projects
MIT
Daniel Rosehill
- Website: danielrosehill.com
- Email: [email protected]