Class: NBA::LeagueDashPlayerShotLocationStat

Inherits:
Shale::Mapper
  • Object
show all
Defined in:
lib/nba/league_dash_player_shot_location_stat.rb

Overview

Represents league-wide player shot location statistics

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#above_the_break_3_fg_pctFloat?

Returns above the break 3 field goal percentage

Examples:

stat.above_the_break_3_fg_pct #=> 0.389

Returns:

  • (Float, nil)

    above the break 3 field goal percentage



195
# File 'lib/nba/league_dash_player_shot_location_stat.rb', line 195

attribute :above_the_break_3_fg_pct, Shale::Type::Float

#above_the_break_3_fgaFloat?

Returns above the break 3 field goals attempted

Examples:

stat.above_the_break_3_fga #=> 7.2

Returns:

  • (Float, nil)

    above the break 3 field goals attempted



187
# File 'lib/nba/league_dash_player_shot_location_stat.rb', line 187

attribute :above_the_break_3_fga, Shale::Type::Float

#above_the_break_3_fgmFloat?

Returns above the break 3 field goals made

Examples:

stat.above_the_break_3_fgm #=> 2.8

Returns:

  • (Float, nil)

    above the break 3 field goals made



179
# File 'lib/nba/league_dash_player_shot_location_stat.rb', line 179

attribute :above_the_break_3_fgm, Shale::Type::Float

#ageFloat?

Returns the player’s age

Examples:

stat.age #=> 36.0

Returns:

  • (Float, nil)

    the player’s age



51
# File 'lib/nba/league_dash_player_shot_location_stat.rb', line 51

attribute :age, Shale::Type::Float

#backcourt_fg_pctFloat?

Returns backcourt field goal percentage

Examples:

stat.backcourt_fg_pct #=> 0.0

Returns:

  • (Float, nil)

    backcourt field goal percentage



219
# File 'lib/nba/league_dash_player_shot_location_stat.rb', line 219

attribute :backcourt_fg_pct, Shale::Type::Float

#backcourt_fgaFloat?

Returns backcourt field goals attempted

Examples:

stat.backcourt_fga #=> 0.1

Returns:

  • (Float, nil)

    backcourt field goals attempted



211
# File 'lib/nba/league_dash_player_shot_location_stat.rb', line 211

attribute :backcourt_fga, Shale::Type::Float

#backcourt_fgmFloat?

Returns backcourt field goals made

Examples:

stat.backcourt_fgm #=> 0.0

Returns:

  • (Float, nil)

    backcourt field goals made



203
# File 'lib/nba/league_dash_player_shot_location_stat.rb', line 203

attribute :backcourt_fgm, Shale::Type::Float

#corner_3_fg_pctFloat?

Returns corner 3 field goal percentage (combined left and right)

Examples:

stat.corner_3_fg_pct #=> 0.438

Returns:

  • (Float, nil)

    corner 3 field goal percentage



243
# File 'lib/nba/league_dash_player_shot_location_stat.rb', line 243

attribute :corner_3_fg_pct, Shale::Type::Float

#corner_3_fgaFloat?

Returns corner 3 field goals attempted (combined left and right)

Examples:

stat.corner_3_fga #=> 1.6

Returns:

  • (Float, nil)

    corner 3 field goals attempted



235
# File 'lib/nba/league_dash_player_shot_location_stat.rb', line 235

attribute :corner_3_fga, Shale::Type::Float

#corner_3_fgmFloat?

Returns corner 3 field goals made (combined left and right)

Examples:

stat.corner_3_fgm #=> 0.7

Returns:

  • (Float, nil)

    corner 3 field goals made



227
# File 'lib/nba/league_dash_player_shot_location_stat.rb', line 227

attribute :corner_3_fgm, Shale::Type::Float

#in_the_paint_non_ra_fg_pctFloat?

Returns in the paint (non-RA) field goal percentage

Examples:

stat.in_the_paint_non_ra_fg_pct #=> 0.428

Returns:

  • (Float, nil)

    in the paint field goal percentage



99
# File 'lib/nba/league_dash_player_shot_location_stat.rb', line 99

attribute :in_the_paint_non_ra_fg_pct, Shale::Type::Float

#in_the_paint_non_ra_fgaFloat?

Returns in the paint (non-RA) field goals attempted

Examples:

stat.in_the_paint_non_ra_fga #=> 2.8

Returns:

  • (Float, nil)

    in the paint field goals attempted



91
# File 'lib/nba/league_dash_player_shot_location_stat.rb', line 91

attribute :in_the_paint_non_ra_fga, Shale::Type::Float

#in_the_paint_non_ra_fgmFloat?

Returns in the paint (non-RA) field goals made

Examples:

stat.in_the_paint_non_ra_fgm #=> 1.2

Returns:

  • (Float, nil)

    in the paint field goals made



83
# File 'lib/nba/league_dash_player_shot_location_stat.rb', line 83

attribute :in_the_paint_non_ra_fgm, Shale::Type::Float

#left_corner_3_fg_pctFloat?

Returns left corner 3 field goal percentage

Examples:

stat.left_corner_3_fg_pct #=> 0.444

Returns:

  • (Float, nil)

    left corner 3 field goal percentage



147
# File 'lib/nba/league_dash_player_shot_location_stat.rb', line 147

attribute :left_corner_3_fg_pct, Shale::Type::Float

#left_corner_3_fgaFloat?

Returns left corner 3 field goals attempted

Examples:

stat.left_corner_3_fga #=> 0.9

Returns:

  • (Float, nil)

    left corner 3 field goals attempted



139
# File 'lib/nba/league_dash_player_shot_location_stat.rb', line 139

attribute :left_corner_3_fga, Shale::Type::Float

#left_corner_3_fgmFloat?

Returns left corner 3 field goals made

Examples:

stat.left_corner_3_fgm #=> 0.4

Returns:

  • (Float, nil)

    left corner 3 field goals made



131
# File 'lib/nba/league_dash_player_shot_location_stat.rb', line 131

attribute :left_corner_3_fgm, Shale::Type::Float

#mid_range_fg_pctFloat?

Returns mid-range field goal percentage

Examples:

stat.mid_range_fg_pct #=> 0.381

Returns:

  • (Float, nil)

    mid-range field goal percentage



123
# File 'lib/nba/league_dash_player_shot_location_stat.rb', line 123

attribute :mid_range_fg_pct, Shale::Type::Float

#mid_range_fgaFloat?

Returns mid-range field goals attempted

Examples:

stat.mid_range_fga #=> 2.1

Returns:

  • (Float, nil)

    mid-range field goals attempted



115
# File 'lib/nba/league_dash_player_shot_location_stat.rb', line 115

attribute :mid_range_fga, Shale::Type::Float

#mid_range_fgmFloat?

Returns mid-range field goals made

Examples:

stat.mid_range_fgm #=> 0.8

Returns:

  • (Float, nil)

    mid-range field goals made



107
# File 'lib/nba/league_dash_player_shot_location_stat.rb', line 107

attribute :mid_range_fgm, Shale::Type::Float

#player_idInteger?

Returns the player ID

Examples:

stat.player_id #=> 201939

Returns:

  • (Integer, nil)

    the player’s ID



19
# File 'lib/nba/league_dash_player_shot_location_stat.rb', line 19

attribute :player_id, Shale::Type::Integer

#player_nameString?

Returns the player name

Examples:

stat.player_name #=> "Stephen Curry"

Returns:

  • (String, nil)

    the player’s name



27
# File 'lib/nba/league_dash_player_shot_location_stat.rb', line 27

attribute :player_name, Shale::Type::String

#restricted_area_fg_pctFloat?

Returns restricted area field goal percentage

Examples:

stat.restricted_area_fg_pct #=> 0.595

Returns:

  • (Float, nil)

    restricted area field goal percentage



75
# File 'lib/nba/league_dash_player_shot_location_stat.rb', line 75

attribute :restricted_area_fg_pct, Shale::Type::Float

#restricted_area_fgaFloat?

Returns restricted area field goals attempted

Examples:

stat.restricted_area_fga #=> 4.2

Returns:

  • (Float, nil)

    restricted area field goals attempted



67
# File 'lib/nba/league_dash_player_shot_location_stat.rb', line 67

attribute :restricted_area_fga, Shale::Type::Float

#restricted_area_fgmFloat?

Returns restricted area field goals made

Examples:

stat.restricted_area_fgm #=> 2.5

Returns:

  • (Float, nil)

    restricted area field goals made



59
# File 'lib/nba/league_dash_player_shot_location_stat.rb', line 59

attribute :restricted_area_fgm, Shale::Type::Float

#right_corner_3_fg_pctFloat?

Returns right corner 3 field goal percentage

Examples:

stat.right_corner_3_fg_pct #=> 0.429

Returns:

  • (Float, nil)

    right corner 3 field goal percentage



171
# File 'lib/nba/league_dash_player_shot_location_stat.rb', line 171

attribute :right_corner_3_fg_pct, Shale::Type::Float

#right_corner_3_fgaFloat?

Returns right corner 3 field goals attempted

Examples:

stat.right_corner_3_fga #=> 0.7

Returns:

  • (Float, nil)

    right corner 3 field goals attempted



163
# File 'lib/nba/league_dash_player_shot_location_stat.rb', line 163

attribute :right_corner_3_fga, Shale::Type::Float

#right_corner_3_fgmFloat?

Returns right corner 3 field goals made

Examples:

stat.right_corner_3_fgm #=> 0.3

Returns:

  • (Float, nil)

    right corner 3 field goals made



155
# File 'lib/nba/league_dash_player_shot_location_stat.rb', line 155

attribute :right_corner_3_fgm, Shale::Type::Float

#team_abbreviationString?

Returns the team abbreviation

Examples:

stat.team_abbreviation #=> "GSW"

Returns:

  • (String, nil)

    the team’s abbreviation



43
# File 'lib/nba/league_dash_player_shot_location_stat.rb', line 43

attribute :team_abbreviation, Shale::Type::String

#team_idInteger?

Returns the team ID

Examples:

stat.team_id #=> 1610612744

Returns:

  • (Integer, nil)

    the team’s ID



35
# File 'lib/nba/league_dash_player_shot_location_stat.rb', line 35

attribute :team_id, Shale::Type::Integer

Instance Method Details

#playerPlayer?

Returns the player

Examples:

stat.player #=> #<NBA::Player id=201939 ...>

Returns:

  • (Player, nil)

    the player object



251
252
253
# File 'lib/nba/league_dash_player_shot_location_stat.rb', line 251

def player
  Players.find(player_id)
end

#teamTeam?

Returns the player’s team

Examples:

stat.team #=> #<NBA::Team id=1610612744 ...>

Returns:

  • (Team, nil)

    the team object



261
262
263
# File 'lib/nba/league_dash_player_shot_location_stat.rb', line 261

def team
  Teams.find(team_id)
end