{"id":46988095,"url":"https://github.com/guidok91/aviation-analytics","last_synced_at":"2026-03-11T13:43:10.599Z","repository":{"id":193526716,"uuid":"688876625","full_name":"guidok91/aviation-analytics","owner":"guidok91","description":"Aviation analytics with DuckDB, dbt and dlt using AirLabs data.","archived":false,"fork":false,"pushed_at":"2026-02-27T09:14:20.000Z","size":543,"stargazers_count":7,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-27T14:28:23.089Z","etag":null,"topics":["airlabs","dbt","dlt","duckdb"],"latest_commit_sha":null,"homepage":"","language":"Makefile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/guidok91.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-09-08T09:40:24.000Z","updated_at":"2026-02-27T09:14:23.000Z","dependencies_parsed_at":"2025-12-06T01:08:00.500Z","dependency_job_id":null,"html_url":"https://github.com/guidok91/aviation-analytics","commit_stats":null,"previous_names":["guidok91/duckdb-dbt","guidok91/aviation-analytics"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/guidok91/aviation-analytics","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guidok91%2Faviation-analytics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guidok91%2Faviation-analytics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guidok91%2Faviation-analytics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guidok91%2Faviation-analytics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/guidok91","download_url":"https://codeload.github.com/guidok91/aviation-analytics/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guidok91%2Faviation-analytics/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30382676,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-11T12:49:11.341Z","status":"ssl_error","status_checked_at":"2026-03-11T12:46:41.342Z","response_time":84,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["airlabs","dbt","dlt","duckdb"],"created_at":"2026-03-11T13:43:09.864Z","updated_at":"2026-03-11T13:43:10.594Z","avatar_url":"https://github.com/guidok91.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Aviation analytics with DuckDB, dbt and dlt using AirLabs data\n![workflow](https://github.com/guidok91/duckdb-dbt/actions/workflows/ci-cd.yml/badge.svg)\n\nAviation analytics project with [DuckDB](https://duckdb.org/), [dbt](https://docs.getdbt.com/docs/introduction) and [dlt](https://dlthub.com/) using the data from [AirLabs API](https://airlabs.co).\n\n- [Data Architecture](#data-architecture)\n- [Running instructions](#running-instructions)\n  - [Spin up Docker containers](#spin-up-docker-containers)\n  - [Ingest source data from AirLabs REST API to DuckDB using dlt](#ingest-source-data-from-airlabs-rest-api-to-duckdb-using-dlt)\n  - [Run dbt models to transform and curate the data](#run-dbt-models-to-transform-and-curate-the-data)\n- [Data exploration with the DuckDB UI](#data-exploration-with-the-duckdb-ui)\n  - [Countries with the highest number of airports](#countries-with-the-highest-number-of-airports)\n  - [Current number of flights by status](#current-number-of-flights-by-status)\n- [Explore dbt project docs](#explore-dbt-project-docs)\n- [Dependency management](#dependency-management)\n- [CI/CD](#cicd)\n\n## Data Architecture\n![data architecture](https://github.com/user-attachments/assets/0c834008-3c91-4227-a950-879684dd9010)\n\nDatasets are ingested as snapshots from the source API.  \nWhen loading to the curated tables, they are processed with a `merge` strategy (using a unique key per dataset).  \nThis preserves the latest version of each record to keep it simple on the querying side.\n\n## Running instructions\nRun `make help` to see available commands together with their description.\n\n### Spin up Docker containers\nBuild and spin up Docker containers needed for the app:\n- `make docker-up`\n\n### Ingest source data from AirLabs REST API to DuckDB using dlt\nGet into the dlt container:\n- `make docker-it-dlt`\n\nFor this step we first need to generate an AirLabs API key (see how to on their website), and set the environment variable `AIRLABS_API_KEY`. Then run:\n- `make dlt-ingest-source-data`\n\n### Run dbt models to transform and curate the data\nExit the dlt container and get into the dbt one by running `make docker-it-dbt`. Then:\n- `make dbt-deps`\n- `make dbt-run`\n\n## Data exploration with the DuckDB UI\nOnce the models have been run and the data is ready, you can start exploring the data.\n\nRun `make duckdb-ui` to lauch the DuckDB UI and access it via http://localhost:4213.\n\nExample queries:\n\n### Countries with the highest number of airports\n```sql\nSELECT\n    country_code,\n    COUNT(*)\nFROM\n    curated.airports\nGROUP BY\n    country_code\nORDER BY\n    count(*) DESC\nLIMIT 10;\n```\n\n### Current number of flights by status\n```sql\nSELECT\n    flight_status,\n    COUNT(*)\nFROM\n    curated.flight_positions\nWHERE\n    processed_timestamp = (SELECT MAX(processed_timestamp) FROM curated.flight_positions)\nGROUP BY\n    ALL\nORDER BY\n    COUNT(*) DESC;\n```\n\n![data exploration](https://github.com/user-attachments/assets/a1caa51b-de60-40ed-bdb5-c85857fe299d)\n\n## Explore dbt project docs\ndbt provides auto-generated documentation for the project. Run `make dbt-docs` and access http://localhost:8080.\n\n## Dependency management\nDependabot is configured to periodically upgrade repo dependencies. See [dependabot.yml](.github/dependabot.yml).\n\n## CI/CD\nA Github Actions CI/CD pipeline that runs the models, tests and code linting is defined [here](.github/workflows) and can be seen [here](https://github.com/guidok91/duckdb-dbt/actions).\n\nNote that the `AIRLABS_API_KEY` is provided as a Github repository secret to be used in the CI/CD pipeline.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguidok91%2Faviation-analytics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguidok91%2Faviation-analytics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguidok91%2Faviation-analytics/lists"}