How donatopy/vietnam-cinema works
Main Components
• Frontend Layer: The Streamlit application (app.py) acts as the presentation layer. This is what the user interacts with in the browser.
• Insight/Analytics Modules: Numerous Python scripts (insight1.py through insight7.py) likely serve as modules for processing data and generating individual insights.
• Data Storage/Source Files: Various Excel files (e.g., insight1.xlsx, insight7.xlsx, key_dates.xlsx, revenue_by_time.xlsx, normalized_theatres_combined_revenue_with_city.xlsx) and a CSV (release_dates.csv) serve as the raw data sources. These files are read and used by the insight modules.
• Static Visualization Assets: The city_revenue_map.html file appears to be a static or pre-generated HTML component, potentially used for displaying geographical data.
• Dependencies & Environment: The requirements.txt file defines the technical stack (Python libraries and frameworks, including Streamlit) necessary to run the application.
Relationships and Data Flow
• The user launches the application (using Streamlit) via app.py.
• The Streamlit frontend (app.py) directly calls or integrates the individual insight scripts to process and present analytical data.
• Each insight script may read from one or more associated data files (Excel or CSV files) and then produce visualizations or numerical summaries.
• The pre-generated HTML (city_revenue_map.html) is used as an embedded component or output of one of the insights, possibly rendered inside the Streamlit interface.
• Data flows from the raw files into the insight modules, then gets presented on the Streamlit interface.
Architectural Patterns or Design Principles
• Modular Design: Separation of concerns between the presentation layer (app.py) and the various insight modules.
• Data-Driven Analysis: The project operates by reading from external data sources and transforming them via dedicated Python scripts.
• Integration of Static and Dynamic Content: Use of both dynamic (Streamlit-driven) and static (HTML map) components.
Technologies and Frameworks
• Python and Streamlit for the frontend and overall application control.
• Data processing libraries that might be specified in requirements.txt (e.g., pandas, matplotlib, etc.) – though specifics are not detailed, they are implied.
• Excel and CSV file handling, likely using libraries like pandas or openpyxl.
• HTML visualization integrated with the Streamlit app.