Skip to contents

This function downloads the Brazilian lottery game data from Caixa Federal up to the date declared

Usage

get_data(
  game = c("maismilionaria", "megasena", "lotofacil", "quina", "lotomania", "duplasena",
    "diadesorte"),
  type = c("numbers", "winners"),
  language = "eng"
)

Arguments

game

select which Brazilian lottery game

type

select if you want the winners database or the numbers result

language

select desired language

Value

tibble/data.frame containing the downloaded data

Examples

# \donttest{
library(lotterybr)
megasena_ganhadores <- get_data(game= "megasena",type = "winners",language = "eng")
megasena_ganhadores
#> # A tibble: 8,700 × 6
#>    date       course accumulated match winners    prize
#>    <date>      <int> <chr>       <chr>   <int>    <dbl>
#>  1 1996-03-11      1 yes         6           0       0 
#>  2 1996-03-11      1 yes         5          17   39159.
#>  3 1996-03-11      1 yes         4        2016     330.
#>  4 1996-03-18      2 no          6           1 2307162.
#>  5 1996-03-18      2 no          5          65   14424.
#>  6 1996-03-18      2 no          4        4488     209.
#>  7 1996-03-25      3 no          6           2  391193.
#>  8 1996-03-25      3 no          5          62   10516.
#>  9 1996-03-25      3 no          4        4261     153.
#> 10 1996-04-01      4 yes         6           0       0 
#> # ℹ 8,690 more rows

lotofacil_dezenas <- get_data(game= "lotofacil",type = "numbers", language = "ptbr")
lotofacil_dezenas
#> # A tibble: 46,695 × 4
#>    data       concurso acumula dezenas
#>    <date>        <int> <chr>   <chr>  
#>  1 2003-09-29        1 nao     02     
#>  2 2003-09-29        1 nao     03     
#>  3 2003-09-29        1 nao     05     
#>  4 2003-09-29        1 nao     06     
#>  5 2003-09-29        1 nao     09     
#>  6 2003-09-29        1 nao     10     
#>  7 2003-09-29        1 nao     11     
#>  8 2003-09-29        1 nao     13     
#>  9 2003-09-29        1 nao     14     
#> 10 2003-09-29        1 nao     16     
#> # ℹ 46,685 more rows
# }