Skip to main content

NBA

The NBA dcupl demo project includes data of teams and their rankings, players, games and game details from 2004 to 2020. The data is provided on kaggle, please find the link below. If you register an user for the dcupl Console, you can join this demo and try out the different views based on the dcupl Draft Version.

The dataset is quite big. "games_details" includes about 650.000 lines.

dcupl Console NBA demo application data explorer

The goal of this project is to demonstrate how to use the dcupl SDK and modelling language and the dcupl Console to build fast and reliable applications in no time.

dcupl Section, Derives & Expressions​

The players model derives some attributes and concatenates them using expressions (city + nickname => team's full name). In addition a section was defined for the players in order to group them by teams.

DEV​

Sources​

Run it on your local machine​

# 1) clone the project
git clone git@github.com:dcupl-demos/nba.git

# 2) install and serve the dcupl dev server on localhost:8083
cd nba
npm i
dcupl serve

Data setup​

model sizeproperties
players~7230PLAYER_NAME,TEAM_ID, teamCity, teamNickname, teamName, PLAYER_ID,SEASON 
teams30LEAGUE_ID,TEAM_ID,MIN_YEAR,MAX_YEAR,ABBREVIATION,NICKNAME,YEARFOUNDED,CITY,ARENA,ARENACAPACITY,OWNER,GENERALMANAGER,HEADCOACH,DLEAGUEAFFILIATION
ranking~200KTEAM_ID,LEAGUE_ID,SEASON_ID,STANDINGSDATE,CONFERENCE,TEAM,G,W,L,W_PCT,HOME_RECORD,ROAD_RECORD,RETURNTOPLAY
games~26KGAME_DATE_EST,GAME_ID,GAME_STATUS_TEXT,HOME_TEAM_ID,VISITOR_TEAM_ID,SEASON,TEAM_ID_home,PTS_home,FG_PCT_home,FT_PCT_home,FG3_PCT_home,AST_home,REB_home,TEAM_ID_away,PTS_away,FG_PCT_away,FT_PCT_away,FG3_PCT_away,AST_away,REB_away,HOME_TEAM_WINS
games_details~650KGAME_ID,TEAM_ID,TEAM_ABBREVIATION,TEAM_CITY,PLAYER_ID,PLAYER_NAME,NICKNAME,START_POSITION,COMMENT,MIN,FGM,FGA,FG_PCT,FG3M,FG3A,FG3_PCT,FTM,FTA,FT_PCT,OREB,DREB,REB,AST,STL,BLK,TO,PF,PTS,PLUS_MINUS

Initial data structure​

Our main model of interest is the Players and the Games model. The players data includes the reference TEAM_ID - the Team the player is playing for. The Games and GameDetails data references certain teams and players.

classDiagram direction LR class Player { PLAYER_ID : string TEAM_ID : Team } class Team{ TEAM_ID : string ... } class Ranking{ key : string TEAM_ID : Team } class Game { GAME_ID : string HOME_TEAM_ID : Team VISITOR_TEAM_ID : Team ... } class GameDetail { key : string GAME_ID : Game TEAM_ID : Team PLAYER_ID : Player } Player --> Team : a player references a team Ranking --> Team : a ranking references a team Game --> Team : a game references teams GameDetail --> Game : game details reference games GameDetail --> Team : game details reference teams GameDetail --> Player : game details reference players

dcupl Model Graph​

dcupl Model Graph