Skip to content

End to end project to collect and analyze data from my board game club.

Notifications You must be signed in to change notification settings

guilhermenoronha/stats_bg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Code style: black

STATS FOR THE CLUBE DO BOARDGAME DA ZOEIRA

This repo is intended to collect and analyze data about the game sessions realized into the Clube do Boardgame da Zoeira. The project has two main data sources: data manually annotated into the Google Sheets with sessions, games played, scores, and so on, and; the board game metadata scrapped from Ludopedia and BoardGameGeek. All the raw data is wrangled to convert the data into a structured one to be queried using SQL. Data is stored in a database using PostgreSQL. Finally, DBT is used to filter, aggregate, join, and test the data to create value to be consumed on Power BI. The following figure shows the architecture of the project.

OBJECTIVES

The main objectives from the data analysis from the sessions is to keep the club more organized. With the data, is possible to create and watch different KPIs to see if the club is healthy. It's possible, for example, to see which games are played most, who host most sessions, which persons attend more of the sessions, and so son. At the moment, the project has the following KPIs:

  • TODO

HOW TO USE IT?

Prerequistes

Basic usage

  • Clone this repo
  • Create a database named stats_bg, and a schema named bronze.
  • Create .env file with the following variables:
    • PG_USER=your_postgres_username
    • PG_PASSWD=your_postgres_password
    • HOST=postgres_host
    • PORT=postgres_port
    • DB=postgres_database
    • SCHEMA=bronze
    • SHEET_ID=your_google_sheet_id
    • ACCESS_KEY=your_ludopedia_acess_token(usuário)
  • Open a terminal a type poetry init to create a virtual env.
  • Yet on terminal, type python main.py (Also you may use the arg --mode with the following options):
    • players: process players table.
    • taxonomy: process themes, categories, domains, and mechanics tables.
    • boardgames: process games and bg_owners table.
    • metadata: process bg_domains, bg_themes, bg_categories, and bg_mechanics tables.
    • matches: process attendances and matches table.
  • Export the following variables to the system to be used by DBT:
    • SET POSTGRES_USER=your_user
    • SET POSTGRES_PASSWD=your_password
  • run cd dbt command
  • run dbt deps to install DBT dependencies.
  • run dbt build command to build all models.
  • Plug the dashboard on power_bi folder in the database and voilà.

About

End to end project to collect and analyze data from my board game club.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published