AECData Python Library Step 3— Visualizations & Statistical Analysis
Done with data retrieval, on with the stats!
Welcome to the third tutorial on using the open-source AECdata library provided by 2050 Materials.
In this tutorial, we’ll learn how to plot visualizations and derive statistics from your data. This guide will cover grouping data by category and location, removing outliers, and calculating median values and quartiles. Plus, we’ll show how to create a distribution plot.
Setting Up Your Environment
Before diving into the statistics and plots, ensure you’ve imported the necessary classes from the aecdata
library:
Initializing the ProductStatistics Class
Start by creating an instance of the ProductStatistics
class. This class extends the functionalities of the ProductData
class, allowing for advanced data analysis.
Grouping and Filtering Data
One of the powerful features of the ProductStatistics class is its ability to group and filter data efficiently. Here’s how you can do it:
This code groups the data by country and material type, which is particularly useful for regional analysis and comparisons between different materials.
Plotting Data Distributions
Visualizations can help understand the distribution of data. Let’s plot a histogram and a boxplot:
These plots will provide visual insights into the distribution and variance of the impact factors across different material types.
Done, for now!
You’re now set up with aecdata
and have used theProductStatistics
class, to perform detailed statistical analysis and visualizations.
This tutorial covered grouping data, removing outliers, and visualizing distributions, which are crucial for making informed decisions based on your data.
Stay tuned for our next tutorial, where we’ll go over how to implement aecdata
within a data-science environment!
Stay tuned, and happy coding!
This library is provided by 2050 Materials, a company dedicated to unlocking the value of data in the construction industry to enable the climate transition.
If you are interested in embedding this data within your workflows, or have a specific problem, reach out to us at api@2050-materials.com
Related articles
9 Progressive Hemp-Based Products for Construction and Insulation
This article examines 9 groundbreaking hemp-based products, detailing their sustainability credentials, unique advantages, and specific applications in construction.
Read moreThe Most Innovative Products for External Walls & Facades in 2024
These products are designed to reduce carbon emissions, improve energy performance, and minimize the depletion of natural resources, all while maintaining high standards of durability and design.
Read moreTracking Embodied Carbon Regulations in Construction (Updated Oct 2024)
This tracker is designed to map current embodied carbon regulations across various regions and countries, providing you with an overview of key facts and relevant supporting articles.
Read more