How lunahernandez/chesstournamentanalysis works
Main Components
a. Data Source & Ingestion:
• Data Folder: Holds the raw chess games in PGN format (e.g., data/games.pgn).
• Python Scripts: Under the “python” directory, these scripts (such as pgn_to_csv.py, pgn_to_mongo.py, and create_collections.py) are responsible for:
• Converting PGN files to CSV formats.
• Importing data into databases (likely MongoDB, given the “pgn_to_mongo.py” script).
b. Dashboard Application:
• Dashboard-tips: Contains a web application (app.py) along with its Dockerfile, static assets (styles.css), and a dedicated README. This component likely serves a user interface for delivering insights or “tips” based on analysis.
c. Interactive Analysis:
• Notebooks: Jupyter Notebooks (Analysis.ipynb, Analysis_Jorge.ipynb) indicate an environment for exploratory data analysis.
d. Containerization & Orchestration:
• Docker Files: There are Dockerfiles inside both “dashboard-tips” and “python”, suggesting containerized services.
• docker-compose.yml: At the project root, it is likely used to run these containers together, ensuring they communicate as needed.
e. Static Resources & Documentation:
• Images (likely for visual assets) and the global README.md that describes the key CSV files (moves.csv, details.csv, players.csv, openings.csv) which form the basis of the analysis.
Relationships and Interactions
• Data Flow:
• Raw PGN data from the “data” directory is the raw source.
• The “python” container takes this data and performs ETL processes:
• Converting secure formats (PGN to CSV).
• Importing into MongoDB (if applicable) or preparing collections.
• The processed data (CSV files, database collections, etc.) then feeds the Dashboard application.
• Service Interactions:
• The “dashboard-tips” container likely queries the processed and/or stored data to provide real-time or on-demand insights.
• Notebooks might use the processed outputs (CSV or direct database connections) for deeper interactive analysis.
• Docker Compose Orchestration:
• Use docker-compose.yml as the central orchestration tool to connect the containers (Python ETL processes, dashboard application, and possibly a database service).
Architectural Patterns to Highlight
• Microservices/Containerized Architecture:
• Each major responsibility (data processing, dashboard serving) is encapsulated within its own container.
• ETL Pipeline:
• The scripts in the “python” folder form an ETL pipeline shifting data from raw PGN files to processed CSV/database collections.
• Separation of Concerns:
• The project neatly separates data processing from data presentation and interactive analysis.