Skip to contents
library(lotterybr)
#> Loading required package: dplyr
#> 
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#> 
#>     filter, lag
#> The following objects are masked from 'package:base':
#> 
#>     intersect, setdiff, setequal, union
#> Loading required package: ggplot2
#> Loading required package: shiny
#> Loading required package: plotly
#> 
#> Attaching package: 'plotly'
#> The following object is masked from 'package:ggplot2':
#> 
#>     last_plot
#> The following object is masked from 'package:stats':
#> 
#>     filter
#> The following object is masked from 'package:graphics':
#> 
#>     layout

This will open the shiny app for better visualisation of the datasets

get_data

The function can be use in the following way

quina_ganhadores = get_data(game ="quina",type = "winners","ptbr")
lotofacil_numbers = get_data(game = "lotofacil",type = "numbers","eng")

Format

Each game has two datasets, numbers and winners, with the following columns:

numbers

date

Date type, the date that the game occurred in.

course

Integer type, which course the game took place

accumulated

Char type, if the game prize is accumulated “yes” or not “no”

numbers

Factor type with 60 levels, the drawn numbers.

winners

date

Date type, the date that the game occurred in.

course

Integer type, which course the game took place .

accumulated

Char type, if the game prize is accumulated “yes” or not “no”

match

Char type, the possible match.

winners

Integer type, the number of winners of each possible match.

prize

Integer type, the prize for each type.

Some games, like “duplasena” or “diadesorte”, may contain additional columns since each game has a different way of drawing numbers. Therefore, a brief explanation of each game is as follows.

maismilionaria

Maismilionaria involves selecting five numbers from one pool and one additional number from another pool, with the potential to win multimillion-dollar jackpots.

megasena

Six numbers are drawn from a pool of 60, with players aiming to match as many as possible for substantial prizes.

lotofacil

Lotofacil involves picking 15 numbers from a pool of 25, with prizes awarded for varying levels of matches.

quina

Players select five numbers from a pool of 80, aiming to match as many as possible for prizes.

lotomania

Lotomania involves selecting 50 numbers from a pool of 100, with prizes awarded for matching a certain number of drawn numbers.

duplasena

Dupla-Sena involves two separate draws, each with six numbers drawn from a pool of 50, offering double the chances to win.

diadesorte

In Dia de Sorte, players choose seven numbers and a month, with prizes awarded for matching numbers and/or the month drawn.

open_app

The function can be use in the following way

#open_app(language = "eng")

it opens the shiny app containing a graph, table and a brief description of the selected game and data type. With the langugage argument, you can select either Portuguese or English. You can view this app by clicking Here