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.
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​
- The code for this example is available on Github
- Kaggle Dataset https://www.kaggle.com/datasets/nathanlauga/nba-games
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 | Â size | properties |
---|---|---|
players | ~7230 | PLAYER_NAME,TEAM_ID, teamCity, teamNickname, teamName, PLAYER_ID,SEASONÂ |
teams | 30 | LEAGUE_ID,TEAM_ID,MIN_YEAR,MAX_YEAR,ABBREVIATION,NICKNAME,YEARFOUNDED,CITY,ARENA,ARENACAPACITY,OWNER,GENERALMANAGER,HEADCOACH,DLEAGUEAFFILIATION |
ranking | ~200K | TEAM_ID,LEAGUE_ID,SEASON_ID,STANDINGSDATE,CONFERENCE,TEAM,G,W,L,W_PCT,HOME_RECORD,ROAD_RECORD,RETURNTOPLAY |
games | ~26K | GAME_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 | ~650K | GAME_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.