bit in that
  • Home
  • Fantasy
    • AFL
    • Top Coaches
    • Player Selections
    • AFLW
    • Top Coaches
    • Player Selections
  • Players
    • AFL
    • Draft Prospects
    • AFLW
    • Player Data
    • Draft Prospects

AFLW Draft Prospects

library(reactable)
library(arrow)
library(dplyr)
library(tidyr)
library(purrr)
library(htmltools)

combine_player_details <- read_parquet("https://github.com/bit-in-that/data-automation/raw/main/players/data/processed/combine_player_details.parquet")
Individual Profiles Down

The links to individual player profiles currently do not work due. They will be restored when some technical issues have been resolved.

Data Disclaimer

Note that data for the interstate underage competition (“AFL U18 Championships”) are missing behind and free kick data, as such these items are omitted from the calculation of fantasy points.

phantom_draft_formatter <- function(cell_value, row_index, column_name) {
  if(cell_value == 999L) {
    ""
    } else {
      cell_value
    }
  }
player_data_table <- combine_player_details |> 
  filter(gender == "female") |> 
  mutate(
    player_name = paste(player_first_name, player_surname),
    phantom_draft_afl = coalesce(phantom_draft_afl, 999L),
    phantom_draft_sporting_news = coalesce(phantom_draft_sporting_news, 999L),
    phantom_draft_fox_sports = coalesce(phantom_draft_fox_sports, 999L),
    phantom_draft_abc = coalesce(phantom_draft_abc, 999L),
    player_url = paste0("https://bitinthat.netlify.app/players/aflw/underage_profiles/", playerId, ".html")
    ) |> 
  relocate(player_name, .before = "state")

player_data_table |> 
  select(-gender, -national_combine, -player_first_name, -player_surname, -playerIds, 
         -player_urls, -player_images, -player_height_range, -player_weight_range, 
         -player_height_min, -player_weight_min, -playerId) |>
  reactable(
    columns = list(
      player_name = colDef(
        name = "Player",
        sticky = "left",
        cell = function(cell_value, row_index, column_name) {
          player_url <- player_data_table[["player_url"]][[row_index]]
          player_image <- player_data_table[["player_image"]][[row_index]]
          tags$a(
            tags$img(src = player_image, style = "height: 30px;"
                     ),
            " ",
            cell_value,
            href = player_url,
            target = "_blank"
          )
        },
        width = 200
      ),
      state = colDef(name = "State"),
      state_league_club = colDef(name = "State League Club", width = 150),
      community_club = colDef(name = "Community Club", width = 150),
      date_of_birth = colDef(name = "Date of Birth"),
      player_height_max = colDef(name = "Player Height", cell = function(cell_value, row_index, column_name) {
        height <- player_data_table[["player_height_range"]][[row_index]]
        if(is.na(height)) {
          if(is.na(cell_value)) {
            ""
          } else {
            paste(cell_value, "cm")
          }
        } else {
          paste(height, "cm")
        }
        }),
      player_weight_max = colDef(show = FALSE),
      player_image = colDef(show = FALSE),
      player_url = colDef(show = FALSE),
      games_played_state_underage = colDef(name = "Games"),
      fantasy_points_state_underage = colDef(name = "Fantasy Points", format = colFormat(digits = 1)),
      games_played_interstate_underage = colDef(name = "Games"),
      fantasy_points_interstate_underage = colDef(name = "Fantasy Points", format = colFormat(digits = 1)),
      games_played_state_reserves = colDef(name = "Games"),
      fantasy_points_state_reserves = colDef(name = "Fantasy Points", format = colFormat(digits = 1)),
      games_played_state_league = colDef(name = "Games"),
      fantasy_points_state_league = colDef(name = "Fantasy Points", format = colFormat(digits = 1)),
      phantom_draft_afl = colDef(show = FALSE),
      phantom_draft_sporting_news = colDef(show = FALSE),
      phantom_draft_fox_sports = colDef(show = FALSE),
      phantom_draft_abc = colDef(show = FALSE)
    ),
    columnGroups = list(
      colGroup(name = "Player Details", columns = c("state", "state_league_club", "community_club", "date_of_birth", "player_height_max", "player_weight_max")),
      # colGroup(name = "Phantom Draft Ranking", columns = c("phantom_draft_afl", "phantom_draft_sporting_news", "phantom_draft_fox_sports", "phantom_draft_abc")),
      colGroup(name = "State Underage", columns = c("games_played_state_underage", "fantasy_points_state_underage")),
      colGroup(name = "Interstate Underage", columns = c("games_played_interstate_underage", "fantasy_points_interstate_underage")),
      colGroup(name = "State Reserves", columns = c("games_played_state_reserves", "fantasy_points_state_reserves")),
      colGroup(name = "State League", columns = c("games_played_state_league", "fantasy_points_state_league"))
    ),
    filterable = TRUE
  )
​
Player Details
State Underage
Interstate Underage
State Reserves
State League
Player
State
State League Club
Community Club
Date of Birth
Player Height
Games
Fantasy Points
Games
Fantasy Points
Games
Fantasy Points
Games
Fantasy Points
Alissa Brook
SA
South Adelaide
Victor Harbor
​
​
​
​
3
30.3
​
​
4
28.8
Alyssia Pisano
VIC
Eastern Ranges
Rowville Knights
2005-07-01
160-162 cm
29
60.4
3
35.7
​
​
2
35.5
Amber Schutte
VIC
Gippsland Power
Traralgon
2005-12-13
169 cm
18
54.4
3
47.0
​
​
​
​
Amber Swan
QLD
Brisbane Lions Academy
Maroochydore
2005-03-17
164 cm
3
45.7
3
26.3
​
​
​
​
Amy Gaylor
VIC
Calder Cannons
Strathmore
2005-08-23
170-171 cm
16
79.6
1
47.0
​
​
​
​
Anjelique Raison
WA
East Fremantle
Willeton
​
​
​
​
6
45.7
​
​
22
52.3
Annabel Kievit
NT
Northern Territory Academy
Waratah
2005-09-22
173 cm
1
39.0
​
​
​
​
​
​
Annabelle Embelton
VIC
Sandringham Dragons
East Malvern
2005-12-06
175 cm
16
58.4
​
​
​
​
​
​
Asha Turner-Funk
NSW-ACT
Sydney Swans Academy
Manly Warringah Wolves
2004-04-29
176 cm
3
63.0
3
73.7
​
​
​
​
Ava Campbell
VIC
Eastern Ranges
Vermont
2005-07-29
173-174 cm
30
44.1
4
41.5
​
​
2
26.5
1–10 of 81 rows
...
Back to top

2023 bit in that Source Code

 

Designed with using and Quarto