# AI Data Centers — Global Interactive Map

An interactive map showing 174 AI data centers worldwide (2024–2026), built with Leaflet.js.

## Features

- **174 real facilities** from Microsoft, Google, Meta, Amazon/AWS, Oracle, xAI, OpenAI, Apple, Anthropic, and more
- **Status filters** — Under Construction, Announced, Planned, Operational
- **Company & Region dropdowns** — filter by any company or geographic region
- **Live search** — search by company name, location, GPU type, etc.
- **Stats panel** — real-time stats with total investment, construction count, regional breakdown
- **Click popups** — detailed info per facility (investment, power, GPUs, description, source links)
- **Source coverage indicator** — shows how many records include linked public sources
- **Shareable filters** — search and filter state is preserved in the page URL
- **Reset control** — quickly return to the full global view
- **Dark theme** with CARTO dark basemap tiles
- **Fully responsive** — works on desktop and mobile

## How to Run Locally

### Option 1: Python (simplest)
```bash
cd ai-datacenters-map
python3 -m http.server 8000
```
Then open http://localhost:8000

### Option 2: Node.js
```bash
npx serve ai-datacenters-map
```

### Option 3: Just open the file
Double-click `index.html` in your browser. (Note: some browsers may block loading `data.js` from `file://` due to CORS — use a local server instead.)

## Files

- `index.html` — Complete app (HTML + CSS + JS)
- `data.js` — Dataset of 174 AI data centers with coordinates, investments, status, GPUs, and source URLs
- `validate-data.js` — Dataset quality checker for required fields, coordinates, statuses, duplicate IDs, and source coverage

## Data Validation

Run the validator before publishing data changes:

```bash
node validate-data.js
```

Missing source links are reported as warnings so the current dataset remains usable while source coverage improves. Invalid required fields, coordinates, statuses, duplicate IDs, or malformed source URLs are blocking errors.

## Data Sources

Data compiled from public reports including TechCrunch, OpenAI, Microsoft Blog, Texas Tribune, DataCenterKnowledge, Apple Newsroom, Forbes, Goldman Sachs, and others. All source URLs are included in the data and accessible via popup links.
