May 06

AECData Python Library Step 3— Visualizations & Statistical Analysis

We go step by step and explain how to start with the filtering and retrieval of data on aecdata (see code below).

Visualizing Data - Plotting Graphs and Deriving Statistics

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:

from aecdata import ProductData, ProductStatistics import pandas as pd

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:

Data Table - Analyzing and Organizing Data

This code groups the data by country and material type, which is particularly useful for regional analysis and comparisons between different materials.

Outliers can skew the results of your data analysis. The ProductStatistics class includes methods to remove these effectively. Notice above in the get_statistics() function the parameter remove_outliers=True

Plotting Data Distributions

Visualizations can help understand the distribution of data. Let’s plot a histogram and a boxplot:

Distribution of Material Facts in Manufacturing

Distribution of Material Facts Manufacturing by Product Type

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

Previous AECData Python Library Step 2— Get filters and retrieve product data
Next LCA tools in the built environment — VERT WLC Tool, powered by 2050 Materials

Related articles

Curated collection of bricks with Environmental Product Declarations on the 2050 Materials platform
Data & Research Apr 29

The Most Interesting Brick Products with EPDs on the 2050 Materials Platform

This collection brings together a range of bricks with EPDs listed on the 2050 Materials Platform. They include earth-based bricks, handcrafted bricks, clay bricks, reclaimed bricks, reused clinker bricks, and other specialty brick products.

Read more
Climate tech map for construction products showing low-carbon materials and emerging technologies across categories
Data & Research Apr 27

A Climate Tech Map for Construction Products

118 technologies · 16 categories · One verified database. Where the innovation is, who is delivering it, and how close it is to your next specification.

Read more
Digital Product Passport (DPP) infographic showing how building material passports become standardized, traceable, and data-driven across the lifecycle
Data & Research Apr 06

How the Digital Product Passports Bring (Building) Material Passports Into Reality

The EU's Digital Product Passport regulation provides all three simultaneously. A legal mandate across 27 member states. Standardised, machine-readable data requirements defined in law. And a market consequence with real teeth: no compliant passport, no EU market access. The tool hasn't changed. The conditions around it have.

Read more