The Production Data Analyzer is a web application designed to analyze production data from PDF reports. It extracts key metrics, visualizes data using interactive charts, and allows users to download charts and tables as images. The application is built using Flask for the backend and HTML/CSS/JavaScript for the frontend, with Plotly for data visualization and html2canvas for capturing tables as images.
- File Upload: Upload a PDF file containing production data.
- Data Extraction: Extract production totals and breakdowns for Lantabur and Taqwa industries.
- Interactive Charts: Visualize production data using pie charts.
- Data Tables: Display production breakdowns in a tabular format.
- Copy to Clipboard: Copy production data in a formatted text format.
- Download Charts and Tables: Download pie charts and tables as PNG images.
- Responsive Design: Works seamlessly on both desktop and mobile devices.
- HTML, CSS, JavaScript
- Tailwind CSS for styling
- Plotly for interactive charts
- html2canvas for capturing tables as images
- FontAwesome for icons
- Flask for handling file uploads and data processing
- pdfplumber for extracting data from PDFs
- Python 3.x
- Flask
- pdfplumber
-
Clone the repository:
git clone https://github.com/Solved-Overnight/production-flask.git cd production-flask -
Set up a virtual environment (optional but recommended):
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Run the Flask application:
python app.py
-
Access the application: Open your browser and navigate to http://127.0.0.1:5000.
- Click the "Browse files" button or drag and drop a PDF file into the upload area.
- The application will automatically analyze the file and display the results.
- The application displays production totals for Lantabur and Taqwa industries.
- Use the tabs to switch between Lantabur and Taqwa data.
- Hover over the pie charts to view detailed information.
- Click the "Download Chart" button to save the chart as a PNG image.
- The production breakdown is displayed in a table format.
- Click the "Toggle Table" button to show/hide the table.
- Click the "Download Table" button to save the table as a PNG image.
- Click the "Copy to Clipboard" button to copy the production data in a formatted text format.
The application expects the PDF file to have the following structure:
Lantabur Prod. <total>: Total production for Lantabur.
Taqwa Prod. <total>: Total production for Taqwa.
Tables: Tables containing production breakdowns by color, quantity, and percentage.
Lantabur Production: 18,353 kg
Taqwa Production: 22,040 kg
Color: Average, Double Part - Black, White, Black, Double Part
Quantity: 6,904 kg, 1,442.8 kg, 1,971 kg, 6,082 kg, 1,953.4 kg
Percentage: 37.62%, 7.86%, 10.74%, 33.14%, 10.64%
Color: Average, White, Double Part, Royal
Quantity: 12,044.2 kg, 5,968 kg, 4,023 kg, 5 kg
Percentage: 54.65%, 27.08%, 18.25%, 0.02%
This project is licensed under the MIT License. See the LICENSE file for details.
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch:
git checkout -b feature/YourFeature
- Commit your changes:
git commit -m 'Add some feature' - Push to the branch:
git push origin feature/YourFeature
- Plotly for interactive charting.
- html2canvas for capturing tables as images.
- Tailwind CSS for utility-first CSS styling.
For questions or feedback, please contact:
- Moniruzzaman Rishad
- Email: mzrishad.info@gmail.com
- GitHub: Solved-Overnight

