Coder Social home page Coder Social logo

fitzroy's Introduction

fitzRoy

Lifecycle: stable R-CMD-check Codecov test coverage CRAN status CRAN RStudio mirror downloads CRAN RStudio total downloads

Overview

fitzRoy aims to provide a consistent and reliable API to various data sources of both the Mens and Womens competitions of the AFL. These functions provide easy and tidy access to data such as fixtures, results and statistics from various data sources.

Installation

Install the released version of fitzRoy from CRAN:

install.packages("fitzRoy")

Or install the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("jimmyday12/fitzRoy")

Usage

The primary functions in fitzRoy are the fetch_* functions. These provide access to the most common types of data using a consistent API. View the Quick Start Vignette to quickly get going with data analysis.

The main functions are fetch_fixture, fetch_lineup, fetch_results, fetch_ladder and fetch_player_stats.

fetch_fixture(season = 2020, comp = "AFLM")
fetch_lineup(season = 2021, round_number = 1, comp = "AFLW")
fetch_results(season = 2020, round_number = 1, comp = "AFLW")
fetch_ladder(season = 2020, source = "squiggle")
fetch_player_stats(season = 2020, source = "fryzigg")
fetch_player_details(team = "Hawthorn", current = TRUE, source = "AFL")

See vignette on using the main fetch functions to learn more about how these functions work.

AFL Womens data

From 2019, we are able to provide access to AFL Women’s data. Read the full AFL Womens Vingette for details on how to access it.

fetch_fixture(season = 2020, comp = "AFLW")
fetch_results(season = 2020, comp = "AFLW")
fetch_ladder(season = 2020, comp = "AFLW")
get_aflw_match_data()

Non-AFL data

An experimental feature as of version 1.2.0 is returning non-AFL related data. This only works for the source AFL but there are other comps that are available. These comps do not have as much data as the AFLM and AFLW comps but some functions will work.

fetch_fixture(2022, source = "AFL", comp = "VFL")
fetch_player_stats(2022, round = 1, source = "AFL", comp = "VFLW")
fetch_fixture(2022, source = "AFL", comp = "WAFL")

Available comps include * “VFL” * “VFLW” * “WAFL” * “U18B” * “U18G”


Please note that the ‘fitzRoy’ project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

fitzroy's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fitzroy's Issues

Some player IDs have two versions of names using get_afltables_stats

There are five player IDs that are coming through on get_afltables_stats with two versions of names (e.g. Patrick Ryder/Paddy Ryder):

Brief description of the problem

`n_afltables_data <- get_afltables_stats(start_date = "1897-05-07", end_date = Sys.Date())

n_afltables_data %>%
distinct(ID, First.name, Surname) %>%
group_by(ID) %>%
mutate(count_names = n()) %>%
filter(count_names > 1)`

`# A tibble: 10 x 4

Groups: ID [5]

First.name Surname ID count_names

1 Patrick Ryder 4144 2
2 Matthew de Boer 11746 2
3 Jay Kennedy-Harris 12245 2
4 Darcy MacPherson 12438 2
5 Harrison Himmelberg 12462 2
6 Paddy Ryder 4144 2
7 Jay Kennedy Harris 12245 2
8 Harry Himmelberg 12462 2
9 Matt de Boer 11746 2
10 Darcy Macpherson 12438 2`

Players showing up in incorrect games

Four players are showing up in incorrect games.

Image

library(fitzRoy)

dat <- get_afltables_stats()
#> Returning data from 1897-01-01 to 2018-09-05
#> Downloading data
#> 
#> Finished downloading data. Processing XMLs
#> Warning: Unknown columns: `Substitute`
#> Finished getting afltables data

dat[!(dat$ID == 3500 & dat$Playing.for == "Collingwood" &
  dat$Season == 1907 & dat$Round == 5) &
  !(dat$ID == 3500 & dat$Playing.for == "Collingwood" &
    dat$Season == 1907 & dat$Round == 12) &
  !(dat$ID == 4580 & dat$Playing.for == "Fitzroy" &
    dat$Season == 1912 & dat$Round == 5) &
  !(dat$ID == 10665 & dat$Playing.for == "Geelong" &
    dat$Season == 1907 & dat$Round == 1) &
  !(dat$ID == 5685 & dat$Playing.for == "St Kilda" &
    dat$Season == 1907 & dat$Round == 3), ]
#> # A tibble: 619,987 x 59
#> # Groups:   Season, Round, Home.team, Away.team [15,398]
#>    Season Round Date       Local.start.time Venue Attendance Home.team
#>     <dbl> <chr> <date>                <int> <chr>      <int> <chr>    
#>  1   1897 1     1897-05-08             1500 Brun…       3000 Fitzroy  
#>  2   1897 1     1897-05-08             1500 Brun…       3000 Fitzroy  
#>  3   1897 1     1897-05-08             1500 Brun…       3000 Fitzroy  
#>  4   1897 1     1897-05-08             1500 Brun…       3000 Fitzroy  
#>  5   1897 1     1897-05-08             1500 Brun…       3000 Fitzroy  
#>  6   1897 1     1897-05-08             1500 Brun…       3000 Fitzroy  
#>  7   1897 1     1897-05-08             1500 Brun…       3000 Fitzroy  
#>  8   1897 1     1897-05-08             1500 Brun…       3000 Fitzroy  
#>  9   1897 1     1897-05-08             1500 Brun…       3000 Fitzroy  
#> 10   1897 1     1897-05-08             1500 Brun…       3000 Fitzroy  
#> # ... with 619,977 more rows, and 52 more variables: HQ1G <int>,
#> #   HQ1B <int>, HQ2G <int>, HQ2B <int>, HQ3G <int>, HQ3B <int>,
#> #   HQ4G <int>, HQ4B <int>, Home.score <int>, Away.team <chr>, AQ1G <int>,
#> #   AQ1B <int>, AQ2G <int>, AQ2B <int>, AQ3G <int>, AQ3B <int>,
#> #   AQ4G <int>, AQ4B <int>, Away.score <int>, First.name <chr>,
#> #   Surname <chr>, ID <int>, Jumper.No. <dbl>, Playing.for <chr>,
#> #   Kicks <dbl>, Marks <dbl>, Handballs <dbl>, Goals <dbl>, Behinds <dbl>,
#> #   Hit.Outs <dbl>, Tackles <dbl>, Rebounds <dbl>, Inside.50s <dbl>,
#> #   Clearances <dbl>, Clangers <dbl>, Frees.For <dbl>,
#> #   Frees.Against <dbl>, Brownlow.Votes <dbl>,
#> #   Contested.Possessions <dbl>, Uncontested.Possessions <dbl>,
#> #   Contested.Marks <dbl>, Marks.Inside.50 <dbl>, One.Percenters <dbl>,
#> #   Bounces <dbl>, Goal.Assists <dbl>, Time.on.Ground.. <int>,
#> #   Substitute <int>, Umpire.1 <chr>, Umpire.2 <chr>, Umpire.3 <chr>,
#> #   Umpire.4 <chr>, group_id <int>

Created on 2018-09-05 by the reprex
package
(v0.2.0).

Implement function to add weather data

Need to have a function to grab weather data. The current example just pulls from a sample scrape we did for 2017. Ideally we would have something like

get_weather_data(match_id = 1)
get_weather_data(dates = "2018-05-10")

where those parameters could be single values or vectors.

2017 Elimination Final is inccorect for Port Adelaide players

This is parsing incorrectly for the Port players.

Playing.for is showing the score instead of Port Adelaide

ID is 0 for all players

library(fitzRoy)
library(tidyverse)
dat <- get_afltables_stats()

filter(dat, Season == 2017 & Round == "Elimination Final", Home.team == "West Coast" & Playing.for != "West Coast") %>%
  select(Season, Round, Home.team, Away.team, Playing.for, First.name, Surname, ID) 
#> # A tibble: 22 x 8
#>    Season Round   Home.team Away.team Playing.for First.name Surname    ID
#>     <int> <chr>   <chr>     <chr>     <chr>       <chr>      <chr>   <dbl>
#>  1   2017 Elimin… West Coa… Port Ade… 12.6.78     Karl       Amon        0
#>  2   2017 Elimin… West Coa… Port Ade… 12.6.78     Travis     Boak        0
#>  3   2017 Elimin… West Coa… Port Ade… 12.6.78     Riley      Bonner      0
#>  4   2017 Elimin… West Coa… Port Ade… 12.6.78     Darcy      Byrne-…     0
#>  5   2017 Elimin… West Coa… Port Ade… 12.6.78     Tom        Clurey      0
#>  6   2017 Elimin… West Coa… Port Ade… 12.6.78     Charlie    Dixon       0
#>  7   2017 Elimin… West Coa… Port Ade… 12.6.78     Brad       Ebert       0
#>  8   2017 Elimin… West Coa… Port Ade… 12.6.78     Robbie     Gray        0
#>  9   2017 Elimin… West Coa… Port Ade… 12.6.78     Sam        Gray        0
#> 10   2017 Elimin… West Coa… Port Ade… 12.6.78     Hamish     Hartle…     0
#> # ... with 12 more rows

Created on 2018-08-16 by the reprex
package
(v0.2.0).

get_afltables_stats returns full finals names for 2017 and 2018 seasons

afltables_data_new <- get_afltables_stats(start_date = "1897-05-07", end_date = Sys.Date())

afltables_data_new %>%

  • filter(Season == 2016 & Round == "GF")

A tibble: 44 x 59

Groups: Season, Round, Home.team, Away.team [1]

Season Round Date Local.start.time Venue Attendance Home.team HQ1G HQ1B HQ2G HQ2B HQ3G HQ3B HQ4G HQ4B

1 2016 GF 2016-10-01 1430 M.C.G. 99981 Western Bulld~ 2 0 7 1 9 7 13 11
2 2016 GF 2016-10-01 1430 M.C.G. 99981 Western Bulld~ 2 0 7 1 9 7 13 11
3 2016 GF 2016-10-01 1430 M.C.G. 99981 Western Bulld~ 2 0 7 1 9 7 13 11
4 2016 GF 2016-10-01 1430 M.C.G. 99981 Western Bulld~ 2 0 7 1 9 7 13 11
5 2016 GF 2016-10-01 1430 M.C.G. 99981 Western Bulld~ 2 0 7 1 9 7 13 11
6 2016 GF 2016-10-01 1430 M.C.G. 99981 Western Bulld~ 2 0 7 1 9 7 13 11
7 2016 GF 2016-10-01 1430 M.C.G. 99981 Western Bulld~ 2 0 7 1 9 7 13 11
8 2016 GF 2016-10-01 1430 M.C.G. 99981 Western Bulld~ 2 0 7 1 9 7 13 11
9 2016 GF 2016-10-01 1430 M.C.G. 99981 Western Bulld~ 2 0 7 1 9 7 13 11
10 2016 GF 2016-10-01 1430 M.C.G. 99981 Western Bulld~ 2 0 7 1 9 7 13 11

... with 34 more rows, and 44 more variables: Home.score , Away.team , AQ1G , AQ1B , AQ2G ,

AQ2B , AQ3G , AQ3B , AQ4G , AQ4B , Away.score , First.name , Surname , ID ,

Jumper.No. , Playing.for , Kicks , Marks , Handballs , Goals , Behinds ,

Hit.Outs , Tackles , Rebounds , Inside.50s , Clearances , Clangers , Frees.For ,

Frees.Against , Brownlow.Votes , Contested.Possessions , Uncontested.Possessions ,

Contested.Marks , Marks.Inside.50 , One.Percenters , Bounces , Goal.Assists ,

Time.on.Ground.. , Substitute , Umpire.1 , Umpire.2 , Umpire.3 , Umpire.4 , group_id

afltables_data_new %>%

  • filter(Season == 2017 & Round == "Grand Final")

A tibble: 44 x 59

Groups: Season, Round, Home.team, Away.team [1]

Season Round Date Local.start.time Venue Attendance Home.team HQ1G HQ1B HQ2G HQ2B HQ3G HQ3B HQ4G HQ4B

1 2017 Grand Fi~ 2017-09-30 1430 "M.C.G~ 100021 Richmond 2 3 6 4 11 8 16 12
2 2017 Grand Fi~ 2017-09-30 1430 "M.C.G~ 100021 Richmond 2 3 6 4 11 8 16 12
3 2017 Grand Fi~ 2017-09-30 1430 "M.C.G~ 100021 Richmond 2 3 6 4 11 8 16 12
4 2017 Grand Fi~ 2017-09-30 1430 "M.C.G~ 100021 Richmond 2 3 6 4 11 8 16 12
5 2017 Grand Fi~ 2017-09-30 1430 "M.C.G~ 100021 Richmond 2 3 6 4 11 8 16 12
6 2017 Grand Fi~ 2017-09-30 1430 "M.C.G~ 100021 Richmond 2 3 6 4 11 8 16 12
7 2017 Grand Fi~ 2017-09-30 1430 "M.C.G~ 100021 Richmond 2 3 6 4 11 8 16 12
8 2017 Grand Fi~ 2017-09-30 1430 "M.C.G~ 100021 Richmond 2 3 6 4 11 8 16 12
9 2017 Grand Fi~ 2017-09-30 1430 "M.C.G~ 100021 Richmond 2 3 6 4 11 8 16 12
10 2017 Grand Fi~ 2017-09-30 1430 "M.C.G~ 100021 Richmond 2 3 6 4 11 8 16 12

... with 34 more rows, and 44 more variables: Home.score , Away.team , AQ1G , AQ1B , AQ2G ,

AQ2B , AQ3G , AQ3B , AQ4G , AQ4B , Away.score , First.name , Surname , ID ,

Jumper.No. , Playing.for , Kicks , Marks , Handballs , Goals , Behinds ,

Hit.Outs , Tackles , Rebounds , Inside.50s , Clearances , Clangers , Frees.For ,

Frees.Against , Brownlow.Votes , Contested.Possessions , Uncontested.Possessions ,

Contested.Marks , Marks.Inside.50 , One.Percenters , Bounces , Goal.Assists ,

Time.on.Ground.. , Substitute , Umpire.1 , Umpire.2 , Umpire.3 , Umpire.4 , group_id

Docker Support

Hi,

Great package! Just wondering if you would be interested in PR for Docker support to help on boarding of new users.

Details over at my branch.

Initially setup with RStudio

docker build -t fitzroy/rstudio -f docker/rstudio/Dockerfile .
....
docker run -d -p 8787:8787 fitzroy/rstudio
....
open localhost:8787 

image

If you are keen I would also suggest

  • TravisCI for builds (R & Docker) to keep the images up to date
  • Pushing images to DockerHub

Cheers!

Default start_date misses Round 1, 1897

Using the default start date misses the first round.

library(fitzRoy)
library(tidyverse)
get_afltables_stats(end_date = "1897-05-30")
#> Returning data from 1897-05-08 to 1897-05-30
#> Finished getting afltables data
#> # A tibble: 480 x 58
#>    Season Round Date       Local.start.time Venue Attendance Home.team
#>     <int> <chr> <date>                <int> <chr>      <int> <chr>    
#>  1   1897 2     1897-05-15             1500 Lake…          0 Sydney   
#>  2   1897 2     1897-05-15             1500 Lake…          0 Sydney   
#>  3   1897 2     1897-05-15             1500 Lake…          0 Sydney   
#>  4   1897 2     1897-05-15             1500 Lake…          0 Sydney   
#>  5   1897 2     1897-05-15             1500 Lake…          0 Sydney   
#>  6   1897 2     1897-05-15             1500 Lake…          0 Sydney   
#>  7   1897 2     1897-05-15             1500 Lake…          0 Sydney   
#>  8   1897 2     1897-05-15             1500 Lake…          0 Sydney   
#>  9   1897 2     1897-05-15             1500 Lake…          0 Sydney   
#> 10   1897 2     1897-05-15             1500 Lake…          0 Sydney   
#> # ... with 470 more rows, and 51 more variables: HQ1G <int>, HQ1B <int>,
#> #   HQ2G <int>, HQ2B <int>, HQ3G <int>, HQ3B <int>, HQ4G <int>,
#> #   HQ4B <int>, Home.score <int>, Away.team <chr>, AQ1G <int>, AQ1B <int>,
#> #   AQ2G <int>, AQ2B <int>, AQ3G <int>, AQ3B <int>, AQ4G <int>,
#> #   AQ4B <int>, Away.score <int>, First.name <chr>, Surname <chr>,
#> #   ID <dbl>, Jumper.No. <int>, Playing.for <chr>, Kicks <dbl>,
#> #   Marks <dbl>, Handballs <dbl>, Goals <dbl>, Behinds <dbl>,
#> #   Hit.Outs <dbl>, Tackles <dbl>, Rebounds <dbl>, Inside.50s <dbl>,
#> #   Clearances <dbl>, Clangers <dbl>, Frees.For <dbl>,
#> #   Frees.Against <dbl>, Brownlow.Votes <dbl>,
#> #   Contested.Possessions <dbl>, Uncontested.Possessions <dbl>,
#> #   Contested.Marks <dbl>, Marks.Inside.50 <dbl>, One.Percenters <dbl>,
#> #   Bounces <dbl>, Goal.Assists <dbl>, Time.on.Ground.. <int>,
#> #   Substitute <int>, Umpire.1 <chr>, Umpire.2 <chr>, Umpire.3 <chr>,
#> #   Umpire.4 <chr>

Created on 2018-08-16 by the reprex
package
(v0.2.0).

Fixture and Results return different date formats

get_match_results returns data in date format while get_fixture returns data in datetime format

results <- fitzRoy::get_match_results()
fixture <- fitzRoy::get_fixture(2019)

head(results)
head(fixture)```

Update get_match_results to include quarter scores

Take data from afldata.rda and then scrape the season page.

Ensure there is a parameter called 'type' that defaults to 'basic'. This will give the basic stats as the current function does. New functionality to get 'advanced' that provides qtr by qtr scores

Suggestion: ungroup the result from get_afltables_stats()

get_afltables_stats() returns a tibble grouped by Season, Round, Home.team, Away.team.

I would suggest that the function should include ungroup() as the last step before returning results. It isn't clear to the end user that the output is grouped unless they inspect the tibble, and grouping may have unintended consequences in any code that the user writes which uses the tibble.

I have the footywire abbreviation descriptions

Hi,

I was getting the footywire abbreviation descriptions for my own references. I have pasted them here if you want to add them to the reference section.

AF AFL Fantasy Points
B Behinds
BO Bounces
CCL Centre Clearances
CG Clangers
CL Clearances
CM Contested Marks
CP Contested Possessions
D Disposals
DE Disposal Efficiency %
ED Effective Disposals
FA Frees Against
FF Frees For
G Goals
GA Goal Assists
GA1 Goal Assists on Advance Page
HB Handballs
HO Hit Outs
I50 Inside 50
ITC Intercepts
K Kicks
M Marks
MG Metres Gained
MI5 Marks Inside 50
Match_id Match ID
One.Percenters One Percenters
Opposition Opposition Team
Player Player
R50 Rebound 50s
SC Super Coach Points
SCL Stoppage Clearances
SI Score Involvements
Status todo
T Tackles
T5 Tackles Inside 50
TO Turnovers
TOG Time On Ground
Team Team
UP Uncontested Possessions
Venue Venue

AF

AFL Fantasy Points

B

Behinds

BO

Bounces

CCL

Centre Clearances

CG

Clangers

CL

Clearances

CM

Contested Marks

CP

Contested Possessions

D

Disposals

DE

Disposal Efficiency %

ED

Effective Disposals

FA

Frees Against

FF

Frees For

G

Goals

GA

Goal Assists

GA1

Goal Assists on Advanced Page

HB

Handballs

HO

Hit Outs

I50

Inside 50

ITC

Intercepts

K

Kicks

M

Marks

MG

Metres Gained

MI5

Marks Inside 50

Match_id

Match ID

One.Percenters

One Percenters

Opposition

Opposition Team

Player

Player

R50

Rebound 50s

SC

Super Coach Points

SCL

Stoppage Clearances

SI

Score Involvements

Status

todo

T

Tackles

T5

Tackles Inside 50

TO

Turnovers

TOG

Time On Ground

Team

Team

UP

Uncontested Possessions

Venue

Venue

Unfiltered cancelled matches result in NA match dates

The 2015 fixture has a match in round 14 that was cancelled, resulting in two rows without dates. Given that these are labelled 'MATCH CANCELLED' in the same place where teams' bye rounds are labelled 'BYE', I think it makes sense to add that as a condition to the bye match filter in get_fixture to avoid invalid match rows.

If the proposed fix sounds good, I'm happy to open a PR to make the change.

Error using get_afltables_stats for dates after 29/7/2018

Hi, I'm not having any issues with dates up to and including "2018-07-29" but get an error for any dates after that?

Appreciate your help!

Thanks,
Cam

===========================================================

statsadd <- get_afltables_stats(start_date = "2018-05-01", end_date = "2018-07-29")
Returning data from 2018-05-01 to 2018-07-29
Finished getting afltables data
statsadd <- get_afltables_stats(start_date = "2018-08-01", end_date = "2018-08-18")
Returning data from 2018-08-01 to 2018-08-18
Downloading data

|==========================================================================================================================================|100% ~0 s remaining

Finished downloading data. Processing XMLs

Error: 'str_squish' is not an exported object from 'namespace:stringr'

Womens vignette failing travis build

The travis check is failing R CMD CHECK for the womens vignette. The following error message is received

Quitting from lines 35-36 (womens-stats.Rmd) 
Error: processing vignette 'womens-stats.Rmd' failed with diagnostics:
Evaluation error: is.character(x) is not TRUE.

The build passes all checks for me locally and I can knit the vignette fine locally so I'm unsure what is going on. For now, I've prevented the vignette from executing code to see if that helps.

Installation Error

After running devtools::install_github("jimmyday12/fitzRoy")
the file downloads but when installing an error occurs:
Installation failed: command failed (1)
there is a reference to "C:/PROGRA1/R/R-341.2/bin/i386/Rterm.exe" not found

Data Cuts Out At Round 3, 2017

Hey, was pulling some data using Fitzroy and couldn't get it to report anything past round 3, 2017 at all on Rstudio, could be a bug or could be my own incompetence, not sure!

Adelaide team data missing for Round 1-3, 2017

There is data missing for Adelaide for rounds 1-3, 2017. Suspect this is related to the initial data dump from afltables.

It doesn't output any data for Adelaide even though it does for the team Adelaide played against.

reprex below

library(fitzRoy)
library(tidyverse)

dat <- get_afltables_stats("2017-01-01", "2017-12-01")

dat %>%
  filter(Round %in% c("1", "2", "3")) %>%
  filter(Playing.for=="Adelaide")
#> # A tibble: 0 x 58
#> # ... with 58 variables: Season <int>, Round <chr>, Date <date>,
#> #   Local.start.time <int>, Venue <chr>, Attendance <int>,
#> #   Home.team <chr>, HQ1G <int>, HQ1B <int>, HQ2G <int>, HQ2B <int>,
#> #   HQ3G <int>, HQ3B <int>, HQ4G <int>, HQ4B <int>, Home.score <int>,
#> #   Away.team <chr>, AQ1G <int>, AQ1B <int>, AQ2G <int>, AQ2B <int>,
#> #   AQ3G <int>, AQ3B <int>, AQ4G <int>, AQ4B <int>, Away.score <int>,
#> #   First.name <chr>, Surname <chr>, ID <dbl>, Jumper.No. <int>,
#> #   Playing.for <chr>, Kicks <dbl>, Marks <dbl>, Handballs <dbl>,
#> #   Goals <dbl>, Behinds <dbl>, Hit.Outs <dbl>, Tackles <dbl>,
#> #   Rebounds <dbl>, Inside.50s <dbl>, Clearances <dbl>, Clangers <dbl>,
#> #   Frees.For <dbl>, Frees.Against <dbl>, Brownlow.Votes <dbl>,
#> #   Contested.Possessions <dbl>, Uncontested.Possessions <dbl>,
#> #   Contested.Marks <dbl>, Marks.Inside.50 <dbl>, One.Percenters <dbl>,
#> #   Bounces <dbl>, Goal.Assists <dbl>, Time.on.Ground.. <int>,
#> #   Substitute <int>, Umpire.1 <chr>, Umpire.2 <chr>, Umpire.3 <chr>,
#> #   Umpire.4 <chr>

Created on 2018-08-16 by the reprex
package
(v0.2.0).

Womens testthat tests failing in travis CI

Likely related to #52 - the womens tests are failing. Again - can't replicate locally, only fails on Travis.

  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 66 SKIPPED: 0 FAILED: 2
  1. Error: get_aflw_round_data returns data frame with correct variables (@test-womens_stats.R#18) 
  2. Error: get_aflw_match_data returns dataframe with correct variables (@test-womens_stats.R#38) 
  
  Error: testthat unit tests failed

Goal Assists Stat

Hi Gents,

It appears that the 'goal assists' stat is missing from fitzroy. Appears between Hit outs and inside 50s on the footywire website. But does not get dragged through in fitzroy.

Warnings returned when using get_afltable_stats

When using get_afltable_stats, the following warnings are returned:

get_afltables_stats(start_date = "1897-05-07", end_date = Sys.Date())
Returning data from 1897-05-07 to 2018-10-02
Downloading data

|===================================================================================================|100% ~0 s remaining
Finished downloading data. Processing XMLs

Warning: 396 parsing failures.
row # A tibble: 5 x 5 col row col expected actual file expected actual 1 8713 Round an integer QF 'https://afltables.com/afl/stats/2018_stats.txt' file 2 8714 Round an integer QF 'https://afltables.com/afl/stats/2018_stats.txt' row 3 8715 Round an integer QF 'https://afltables.com/afl/stats/2018_stats.txt' col 4 8716 Round an integer QF 'https://afltables.com/afl/stats/2018_stats.txt' expected 5 8717 Round an integer QF 'https://afltables.com/afl/stats/2018_stats.txt'
... ................................. ... ....................................... [... truncated]
Finished getting afltables data
Warning messages:
1: In rbind(names(probs), probs_f) :
number of columns of result is not a multiple of vector length (arg 1)
2: Unknown columns: Substitute

Home and Away Status for Finals

Lads,

Just checking if there is an easy way to correct the home and away status of a team in finals. For example in the 2017 EF WCE vs Port. The game was played at Adelaide Oval but comes through as a WCE home game (when should be Port).

I think this is just a feature of scraping game results from AFL Tables who have the same issue. Thoughts on how to correct without manually doing?

Player ID error

The get_playerstats_id function is not working. Returns 0 for all players

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.