This is a Datasette project designed to visualize the T100 database, which contains data on international flights departing from the United States since 1990.
It provides an interactive web interface to explore flight routes, carriers, aircraft types, load factors, and more, leveraging custom SQL queries and data visualizations.
- Python:
>=3.14 - uv: The project uses
uvfor dependency management (seepyproject.tomlanduv.lock).
The project relies on the following key packages:
datasette: The core data exploration tooldatasette-geojson: For rendering map visualizations (e.g., flight routes)datasette-plot: For rendering charts and graphssqlite-utils: For database manipulation
-
Install dependencies: If you haven't already, install the project dependencies using
uv:uv sync
-
Import data: There's outline commands in setup_database.md, but that should be better populated._
-
Run the Datasette server: Start the application by running the following command from the root of the project directory:
datasette --root --host localhost --port 8808 --reload .Note: Using
.as the target directory tells Datasette to load the databases,datasette.yml, andsettings.jsonautomatically. -
Explore the data: Open your browser and navigate to
http://localhost:8808to view the interface. You can authenticate as therootuser using the link in the terminal.
t100.db: The core SQLite database containing the T100 flight data, along with supplementary tables for carriers, aircraft types, and airports.datasette.yml: Contains Datasette configuration, including canned SQL queries (top_us_airports,destinations,route,route-year) which power the main drill-down views and map visualizations.fetch_t100.py: Script for fetching or updating the raw T100 source data.templates/: Custom HTML templates for overriding default Datasette views.
The datasette.yml file defines several powerful canned queries that you can access via the Datasette UI:
destinations&destinations_map: View aggregate statistics (passengers, seats, freight, load factors) for flights originating from a specific airport. Thedestinations_mapquery includes GeoJSON points for plotting lines on a map.route: Detailed breakdown of a specific route (Origin to Destination) by year, carrier, and aircraft type.route_year_: Per month data for airport pairs.