back to the projects

City Battle

Any two French cities, head to head, on open data

City Battle screenshot
City Battle

Overview

City Battle puts two French cities side by side, and animated bars show which one wins on population, area, density, altitude, bars, restaurants and swimming pools. Pick the two yourself or roll the dice for a random pair. A leaderboard ranks every city on every stat, so you can find the commune with the most bars per inhabitant. The data covers 35,000+ communes, from opendata.gouv.fr.

Why I built this

A friend's brother is forever comparing cities with each other. That made a quick side project, and a good excuse to play with French open data.

Features

  • Combat mode. Two cities side by side, with animated stat bars showing which one wins each category.
  • Random matchup. Roll the dice to draw two random French communes.
  • Leaderboard. Ranks every city on every stat, so you can find the commune with the most bars per inhabitant.
  • 35,000+ cities. The data comes from opendata.gouv.fr.
  • The stats. Population, area, density, altitude, bars, restaurants, swimming pools and more.

Tech stack

Frontend

HTML CSS JavaScript

Data

Open Data France JSON CSV

Infrastructure

GitHub Actions VPS