Hi, I'm Jeremy

Mapdis - Synthetic AI-Generated GeoPolitiics Map

Display of the website with China and America selected, showing various countries shaded towards America or China
Picture of Jeremy Russell outdoors
Jeremy Russell

Visualizing Global Diplomatic Preferences with AI and Interactive Maps

Project Overview

In this project, I used AI-generated synthetic data and a React/Next.js front-end to create an interactive map that visualizes the likely preference of every country in any theoretical diplomatic dispute. This project leverages the power of AI to produce comprehensive and reliable geopolitical data, offering a unique perspective on global relationships.

Technical Implementation

Data Generation:

  • Tools Used: Python, OpenAI’s API for GPT-3.5 and GPT-4.
  • Process: I ran 4,000 batched API calls (3,000 to GPT-3.5 and 1,000 to GPT-4 for cost efficiency) to generate a relationship score for every one of the 20,000 dyadic country relationships. This involved prompt engineering, asynchronous processing, error handling, and rate limiting to ensure accuracy and efficiency.

Interactive Visualization:

  • Tools Used: Next.js, Tailwind CSS, shadcn/ui, Zustand, d3-Geo, Math.js.
  • Process: I used a mix of client-side and server-side rendering to enhance performance. The interactive visualization was deployed using Vercel’s built-in CI/CD, simplifying the deployment process.

Inspiration Behind the Project

I wanted to visualize the global geopolitical landscape in a condensed format, but found that comprehensive and reliable datasets were lacking. AI presented a promising solution to generate objective and consistent data at scale, allowing me to achieve this vision.

Primary Goals

  1. Reliability: Ensure the dataset produced is accurate and reflective of real-world events.
  2. User Engagement: Enable users to interact with the map, create conditions, and gain insights that are both interesting and trustworthy.

Technical Challenges and Solutions

Data Reliability:

  • Challenge: Ensuring the reliability of the AI-generated scores without manual verification.
  • Solution: Primed the models with context sentences and averaged results across multiple runs to achieve near-perfect reliability.

User Experience:

  • Challenge: Initial versions of the website had a complex user journey that was difficult to understand.
  • Solution: Segmented the website into two components: an “easy” mode (single country mode) and a more complex mode (conflict mode). Added intuitive controls, interactive examples, and extensive labeling to improve user comprehension.

Reflection

This project showcases my ability to handle complex technical challenges, from data generation using AI to building a performant and user-friendly front-end. The combination of AI, data visualization, and user-centered design highlights my skills and passion for leveraging technology to solve real-world problems. I am excited to bring this expertise to a junior developer role, where I can continue to grow and contribute to innovative projects.