|
1 | | -# Visualizing-Sales-Data-with-NumPy-and-Matplotlib |
2 | | -# 📊 Sales Data Analysis with NumPy and Matplotlib |
3 | | - |
4 | | -This project is a beginner-to-intermediate level data analysis of sales data using **pandas**, **NumPy**, and **Matplotlib**. It demonstrates how to read, clean, analyze, and visualize sales information from a CSV file. |
5 | | - |
6 | | ---- |
7 | | - |
8 | | -## 🧠 Objectives |
9 | | - |
10 | | -- Convert raw sales data into useful insights. |
11 | | -- Calculate total revenue per product. |
12 | | -- Use NumPy for array manipulation and slicing. |
13 | | -- Visualize results with a colorful, labeled bar chart. |
14 | | - |
15 | | ---- |
16 | | - |
17 | | -## 🗂️ Dataset Description |
18 | | - |
19 | | -The dataset contains the following columns: |
20 | | - |
21 | | -- **Product**: The name of the product. |
22 | | -- **Quantity**: Units sold. |
23 | | -- **Price**: Unit price in dollars. |
24 | | -- **Date**: Date of sale. |
25 | | - |
26 | | ---- |
27 | | - |
28 | | -## 🧮 Analysis Steps |
29 | | - |
30 | | -1. **Read CSV Data** using `pandas`. |
31 | | -2. **Convert Columns to Numeric** types with error handling. |
32 | | -3. **Calculate Revenue** per row (Price ×ばつ Quantity). |
33 | | -4. **Convert DataFrame to NumPy Array** for slicing and filtering. |
34 | | -5. **Extract Unique Products** and compute: |
35 | | - - Total revenue per product. |
36 | | - - Percentage share of total revenue. |
37 | | -6. **Visualize the Results** using `Matplotlib`: |
38 | | - - Each product is assigned a unique color. |
39 | | - - Products are displayed as numbered bars. |
40 | | - - A dynamic legend explains which number corresponds to which product. |
41 | | - |
42 | | ---- |
43 | | - |
44 | | -## 📈 Output Example |
45 | | - |
46 | | - <!-- You can upload and link your actual chart --> |
47 | | - |
48 | | ---- |
49 | | - |
50 | | -## 🛠️ Technologies Used |
51 | | - |
52 | | -- Python |
53 | | -- pandas |
54 | | -- NumPy |
55 | | -- Matplotlib |
56 | | - |
57 | | ---- |
58 | | - |
59 | | -## 💡 What You Will Learn |
60 | | - |
61 | | -- Data cleaning with `pandas` |
62 | | -- NumPy slicing and boolean masking |
63 | | -- Revenue calculation by category |
64 | | -- Building clear, colorful visualizations |
65 | | -- Working with legends and layout in `Matplotlib` |
66 | | - |
67 | | ---- |
68 | | - |
69 | | -## 🚀 Future Improvements |
70 | | - |
71 | | -- Group data by date and analyze revenue trends over time. |
72 | | -- Add Seaborn or Plotly for interactive visualizations. |
73 | | -- Build a simple dashboard using Streamlit. |
74 | | - |
75 | | ---- |
76 | | - |
77 | | -## 📬 Contact |
78 | | - |
79 | | -If you like this project or have questions, feel free to connect: |
80 | | - |
81 | | -- GitHub: [DataFalcon 🦅] |
82 | | - |
83 | | -- Email: [tammahakki700@gmail.com] |
84 | | - |
85 | | ---- |
86 | | - |
87 | | -## 🔖 License |
88 | | - |
89 | | -This project is open-source and available under the [MIT License](LICENSE). |
90 | | - |
| 1 | +# 📊 Sales Data Analysis with NumPy and Matplotlib |
| 2 | + |
| 3 | +This project is a beginner-to-intermediate level data analysis of sales data using **pandas**, **NumPy**, and **Matplotlib**. It demonstrates how to read, clean, analyze, and visualize sales information from a CSV file. |
| 4 | + |
| 5 | +--- |
| 6 | + |
| 7 | +## 📂 Files |
| 8 | +- `sales2_1.csv`: The dataset. |
| 9 | +- `sales2.py`: Main Python script that processes and visualizes the data. |
| 10 | +- `revenue_profit_chart.png`: Output chart showing revenue per product. |
| 11 | + |
| 12 | +## 🧠 Objectives |
| 13 | + |
| 14 | +- Convert raw sales data into useful insights. |
| 15 | +- Calculate total revenue per product. |
| 16 | +- Use NumPy for array manipulation and slicing. |
| 17 | +- Visualize results with a colorful, labeled bar chart. |
| 18 | + |
| 19 | +--- |
| 20 | + |
| 21 | +## 🗂️ Dataset Description |
| 22 | + |
| 23 | +The dataset contains the following columns: |
| 24 | + |
| 25 | +- **Product**: The name of the product. |
| 26 | +- **Quantity**: Units sold. |
| 27 | +- **Price**: Unit price in dollars. |
| 28 | +- **Date**: Date of sale. |
| 29 | + |
| 30 | +--- |
| 31 | + |
| 32 | +## 🧮 Analysis Steps |
| 33 | + |
| 34 | +1. **Read CSV Data** using `pandas`. |
| 35 | +2. **Convert Columns to Numeric** types with error handling. |
| 36 | +3. **Calculate Revenue** per row (Price ×ばつ Quantity). |
| 37 | +4. **Convert DataFrame to NumPy Array** for slicing and filtering. |
| 38 | +5. **Extract Unique Products** and compute: |
| 39 | + - Total revenue per product. |
| 40 | + - Percentage share of total revenue. |
| 41 | +6. **Visualize the Results** using `Matplotlib`: |
| 42 | + - Each product is assigned a unique color. |
| 43 | + - Products are displayed as numbered bars. |
| 44 | + - A dynamic legend explains which number corresponds to which product. |
| 45 | + |
| 46 | +--- |
| 47 | + |
| 48 | +## 📈 Output Example |
| 49 | + |
| 50 | + <!-- You can upload and link your actual chart --> |
| 51 | + |
| 52 | +--- |
| 53 | + |
| 54 | +## 🛠️ Technologies Used |
| 55 | + |
| 56 | +- Python |
| 57 | +- pandas |
| 58 | +- NumPy |
| 59 | +- Matplotlib |
| 60 | + |
| 61 | +--- |
| 62 | + |
| 63 | +## 💡 What You Will Learn |
| 64 | + |
| 65 | +- Data cleaning with `pandas` |
| 66 | +- NumPy slicing and boolean masking |
| 67 | +- Revenue calculation by category |
| 68 | +- Building clear, colorful visualizations |
| 69 | +- Working with legends and layout in `Matplotlib` |
| 70 | + |
| 71 | +--- |
| 72 | + |
| 73 | +## 🚀 Future Improvements |
| 74 | + |
| 75 | +- Group data by date and analyze revenue trends over time. |
| 76 | +- Add Seaborn or Plotly for interactive visualizations. |
| 77 | +- Build a simple dashboard using Streamlit. |
| 78 | + |
| 79 | +--- |
| 80 | + |
| 81 | +## 📬 Contact |
| 82 | + |
| 83 | +If you like this project or have questions, feel free to connect: |
| 84 | + |
| 85 | +- GitHub: [DataFalcon 🦅] |
| 86 | + |
| 87 | +- Email: [tammahakki700@gmail.com] |
| 88 | + |
| 89 | +--- |
| 90 | + |
| 91 | +## 🔖 License |
| 92 | + |
| 93 | +This project is open-source and available under the [MIT License](LICENSE). |
| 94 | + |
0 commit comments