Relational data from the open source Star Wars API, provided as R tables or a complete DuckDB database for learning and teaching.
The starwarsdb package (version 0.1.3) provides data about the Star Wars movie franchise in a set of relational tables or as a complete DuckDB database. All data was collected from the open source Star Wars API (SWAPI).
The package includes tables for films, people, planets, species, vehicles and pilots, plus a schema table describing the SWAPI endpoints. It also provides functions to connect to the DuckDB database (starwars_connect, starwars_disconnect, starwars_db) and to create a dm data model object (starwars_dm).
| Package version | 0.1.3 |
|---|---|
| Publication date | 2025-08-23 |
| Films table | 6 rows and 6 variables |
| People table | 82 rows and 10 variables |
| Planets table | 33 rows and 2 variables |
| Species table | 37 rows and 10 variables |
| Vehicles table | 75 rows and 14 variables |
| Schema table | 59 rows and 9 variables |
| License | MIT |
It provides data about the Star Wars movie franchise in a set of relational tables or as a complete DuckDB database, all collected from the open source Star Wars API.
All data was collected from the open source Star Wars API (SWAPI), and each table lists SWAPI as its reference.
Use starwars_db() to get the path to the database and DBI::dbConnect() with duckdb::duckdb(), or use starwars_connect() to connect without worrying about connection details.
It creates a dm object with the starwarsdb tables, and by default configures it with all primary and foreign keys.