EX | Exercises |
✨ Simple Visualization Practice Tasks
These tasks are designed to help you practice simple data visualization in Python using Matplotlib. You will use a CSV file as a data source, load it into a DataFrame, and create different plots. The total estimated time for all tasks is about 20 minutes.
🔥 Task 1: Plot a single product line
- Download the provided CSV file (
data.csv
) or load it directly read_csv(url) from the URL: https://geomoer.github.io/moer-base-python/assets/tests/unit08/data.csv usingpandas
. - Create a line plot that shows the revenue of Product A over the years(X-Axis).
- Add a descriptive title to your plot (e.g., “Revenue of Product A over Time”).
- Label the x-axis as “Year” and the y-axis as “Revenue in USD”.
- Use a solid line style (e.g., linestyle=’-‘) so that the line appears as “—-“.
- Add different markers to your line using marker(see the table on https://geomoer.github.io/moer-base-python/unit08/unit08-04_creating.html.