How hv-0519/cricket_data works
Project type and purpose
• This is primarily a data-driven analytics/ETL project focused on cricket statistics. It ingests raw CSV data (matches.csv, deliveries.csv), loads it into a relational database via SQL scripts (matches_inserts.sql, deliveries_inserts.sql), and then performs analysis and visualization with Python scripts (chart1.py, chart2.py). Auxiliary test scripts (test.py, test2.py) validate data integrity or chart outputs.
File structure
• Top level:
• README.md – high-level description
• CSV files – raw data sources
• SQL files – insertion routines for your database
• Python scripts –
– chart1.py, chart2.py: analysis & visualization
– test.py, test2.py: validation/QA
• No separate “src” or “lib” directories; everything lives at the root.
• No build or deployment config—scripts are run directly.
README for additional insights
• Confirms goal: store, manage, analyze cricket data with SQL as backbone and Python for insights.
a. Main components:
1) Data Sources: matches.csv, deliveries.csv
2) ETL Layer: SQL insertion scripts + any wrapper Python (if applicable)
3) Database: relational DB (PostgreSQL/MySQL/SQLite)
4) Analysis & Visualization: chart1.py, chart2.py
5) Test/QA: test.py, test2.py
b. Relationships & interactions:
– Test scripts pull from both raw CSVs and the Database to validate data and output
c. Architectural patterns/principles:
– ETL pipeline: Extract (CSV) → Transform & Load (SQL scripts) → Consume (Python)
– Separation of concerns: ingestion layer, persistence layer, presentation layer
– Simple procedural scripts—no microservices or heavy frameworks
d. Key technologies/frameworks:
– Python (pandas, matplotlib/seaborn?)
– SQL database engine (PostgreSQL/MySQL/SQLite)
– CSV as interchange format
Detailed capture of architectural elements
• Testing feedback loop: test.py/test2.py can pull from CSV or DB to ensure correctness.
• If planning expansion (e.g., web dashboard), show where an API or frontend could slot in between DB and analysis layer.
Putting it all together: