Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprenda Visualizing Project Data | Data Visualization for Makers
Python for Creators and Makers

bookVisualizing Project Data

When you work on maker projects, you often collect various types of data—whether it's tracking how much time you spend on different tasks, keeping a record of materials used, or noting how many times you've revised a design. Visualizing this data can help you spot patterns, identify bottlenecks, and make better decisions for your next project. For example, you might notice that a particular phase consistently takes more time than others, or that certain materials run out faster than expected. By turning raw numbers into charts or graphs, you gain a clearer picture of your workflow and can communicate your process more effectively to others.

1234567891011
import matplotlib.pyplot as plt phases = ["Design", "Build", "Test"] hours = [12, 25, 8] plt.bar(phases, hours, color=["#6A5ACD", "#20B2AA", "#FFB347"]) plt.xlabel("Project Phase") plt.ylabel("Hours Spent") plt.title("Time Spent on Each Project Phase") plt.tight_layout() plt.show()
copy

The code above creates a bar chart that shows how many hours you spent on the design, build, and test phases of a project. First, you define two lists: one for the names of the phases and one for the number of hours spent on each. The plt.bar() function draws a bar for each phase, with the height representing the hours. The color argument lets you assign a distinct color to each bar, making it easier to compare at a glance. Labels for the x-axis and y-axis, as well as a title, make the chart easy to read and understand. Finally, plt.tight_layout() ensures everything fits nicely, and plt.show() displays the chart. This approach helps you quickly see where most of your effort goes and can highlight areas where you might want to adjust your workflow.

123456789
import matplotlib.pyplot as plt materials = ["Wood", "Acrylic", "Electronics", "Paint"] quantities = [30, 15, 10, 5] plt.pie(quantities, labels=materials, autopct="%1.1f%%", colors=["#DEB887", "#00CED1", "#FFD700", "#FF6347"]) plt.title("Proportion of Materials Used") plt.tight_layout() plt.show()
copy

1. What type of chart is best for showing proportions of a whole?

2. How can visualizing time spent on tasks help improve a project?

3. Fill in the blank: To create a bar chart in matplotlib, you use the ________ function.

question mark

What type of chart is best for showing proportions of a whole?

Select the correct answer

question mark

How can visualizing time spent on tasks help improve a project?

Select the correct answer

question-icon

Fill in the blank: To create a bar chart in matplotlib, you use the ________ function.

Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 2. Capítulo 2

Pergunte à IA

expand

Pergunte à IA

ChatGPT

Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo

Suggested prompts:

Can you explain how the pie chart code works?

What other types of charts can I use to visualize project data?

How can I customize the appearance of these charts further?

bookVisualizing Project Data

Deslize para mostrar o menu

When you work on maker projects, you often collect various types of data—whether it's tracking how much time you spend on different tasks, keeping a record of materials used, or noting how many times you've revised a design. Visualizing this data can help you spot patterns, identify bottlenecks, and make better decisions for your next project. For example, you might notice that a particular phase consistently takes more time than others, or that certain materials run out faster than expected. By turning raw numbers into charts or graphs, you gain a clearer picture of your workflow and can communicate your process more effectively to others.

1234567891011
import matplotlib.pyplot as plt phases = ["Design", "Build", "Test"] hours = [12, 25, 8] plt.bar(phases, hours, color=["#6A5ACD", "#20B2AA", "#FFB347"]) plt.xlabel("Project Phase") plt.ylabel("Hours Spent") plt.title("Time Spent on Each Project Phase") plt.tight_layout() plt.show()
copy

The code above creates a bar chart that shows how many hours you spent on the design, build, and test phases of a project. First, you define two lists: one for the names of the phases and one for the number of hours spent on each. The plt.bar() function draws a bar for each phase, with the height representing the hours. The color argument lets you assign a distinct color to each bar, making it easier to compare at a glance. Labels for the x-axis and y-axis, as well as a title, make the chart easy to read and understand. Finally, plt.tight_layout() ensures everything fits nicely, and plt.show() displays the chart. This approach helps you quickly see where most of your effort goes and can highlight areas where you might want to adjust your workflow.

123456789
import matplotlib.pyplot as plt materials = ["Wood", "Acrylic", "Electronics", "Paint"] quantities = [30, 15, 10, 5] plt.pie(quantities, labels=materials, autopct="%1.1f%%", colors=["#DEB887", "#00CED1", "#FFD700", "#FF6347"]) plt.title("Proportion of Materials Used") plt.tight_layout() plt.show()
copy

1. What type of chart is best for showing proportions of a whole?

2. How can visualizing time spent on tasks help improve a project?

3. Fill in the blank: To create a bar chart in matplotlib, you use the ________ function.

question mark

What type of chart is best for showing proportions of a whole?

Select the correct answer

question mark

How can visualizing time spent on tasks help improve a project?

Select the correct answer

question-icon

Fill in the blank: To create a bar chart in matplotlib, you use the ________ function.

Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 2. Capítulo 2
some-alt