Featuring every NBA team and player, The NBA — in Notion showcases the power of Notion databases. It’s an understandable, practical example of relations and views. Visitors can explore team rosters and filter players by college, country and other interesting criteria.
To duplicate the project within your own workspace, get the template.
Here’s what you’ll discover:
- It’s just two databases.
- The two databases are connected via Relation properties.
- From URLs to images in a few clicks.
- Each team’s logo is its icon.
- The team lists are Linked Databases.
- Players display in preconfigured Galleries.
- Those Galleries display properties formatted by formulas.
- The player’s headshot is the Card Preview.
- Each team contains a Linked Database.
It’s just two databases.
The project comprises two databases — teams and players.
Database #1: Teams
The first database, NBA Teams, contains the league’s 30 teams. Each team has four properties:
- Team → The required
Titleproperty, which we populated with the team name.
- Conference → A
Selectproperty with two options: Western Conference and Eastern Conference (colored consistently with their respective brands).
- Logo → A
Files & Mediaproperty containing the logo from each team’s ESPN.com profile.
- Players → A
Relationproperty connecting each team to its players.
Populated in under 10 minutes.
To populate the NBA Teams database in little time, we took the below steps. (Stumped by one? Tweet us us for a deeper dive or demo.)
- We started with a blank Google Sheet.
- To that sheet, we copied and pasted the tables from the Eastern Conference and Western Conference Wikipedia pages — one below the other.
- We then eliminated the heading rows and unneeded columns, replacing them with a new heading row with Team, Conference and Logo.
- Within the Conference column, we entered each conference name for its topmost team, then filled the rest.
- The logos are sourced from ESPN.com, where the image URLs follow a consistent syntax:
https://a.espncdn.com/i/teamlogos/nba/500/[city-abbreviation].pngTherefore, we created a temporary column, City Abbr., and manually entered the abbreviation for each team’s city.
- That allowed us to create a formula in the Logo column that references City Abbr. to generate the unique image URL for each team.
- With the data in place, we downloaded the Google Sheet as a CSV and imported it into Notion.
Database #2: Players
The second database, 2020 NBA Players, holds every NBA player of the 2019–20 season. The players have considerably more properties than the teams, but many of those properties are
Formula properties that combine and reformat other properties to be displayed in
In the only tech-heavy step of this project, we wrote a function in Google Apps Script to parse the NBA Player List from NBA.com, then populate a Google Sheet with each player’s name, team, number, position, school, nationality, height, birthday, age and headshot URL.
With the data in place, we downloaded the Sheet as a CSV file and imported it into Notion.
The two databases are connected via Relation properties.
Of course, each NBA player is on an NBA team, and each team contains players. That’s a prime use case for relational databases. By connecting players with teams via reciprocal
Relation properties, we ensure clean, consistent data. It also allows us to use
Rollup properties for interesting summaries, such as the total number of players on each team, or each roster’s oldest and youngest players.
From URLs to images in a few clicks.
We initially populated the images with their source URLs — logos from ESPN.com, headshots from NBA.com. When we converted that
URL property to a
Files & Media property, the images imported automatically.
Each team’s logo is its icon.
In Notion, each item in a database is a page, and Notion pages have icons. For the NBA Teams database, we made each team’s logo its icon. This displays the logo next to the team name when it appears in databases (including
Relation properties, as we see in our player galleries), when linked within pages, and in the sidebar.
To make each team’s logo its icon, we copied the value within the Logo property. This copied the URL of the image, which we could then paste into
Link when selecting the page icon.
The team lists are Linked Databases.
The list of teams for each conference is an instance of the NBA Teams database — a
Linked Database. They are formatted as
Sorted by Team (name) and
Filtered for the respective conference. Only the Team property is displayed (with the icon); the others are hidden.
The conference headings are images, borrowed from each conference’s Wikipedia page.
Players display in preconfigured Galleries.
To explore player profiles, we preconfigured a variety of
Views in the
Gallery format. Each is
Sorted by the Last Name property and
Filtered by Team or School. After creating one, we could simply duplicate it, rename it, and change the
Those Galleries display properties formatted by formulas.
To display each player’s information aesthetically, we created a handful of
Formula properties that combine and reformat the imported information.
For example, one property joins the player’s number, position and height — separated by vertical bars. Others add helpful context, such as the words “school,” “born,” “age,” and “draft.”
The player’s headshot is the Card Preview.
With each headshot URL converted to an image, we were able to choose that
Files & Media property as the
Card Preview. In doing so, we toggled
Fit Image and opted for small card sizes.
Each team contains a Linked Database.
Opening a team page below a conference displays its roster. That roster is a
Linked Database connected to the 2020 NBA Players database. It’s formatted as a
Sorted by the Last Name property and
Filtered for the respective team.
After creating one, we could simply copy, paste and alter the