1 Introduction

The building sector accounts for 40% of worldwide energy consumption and 30% of anthropogenic greenhouse gas (GHG) emissions [1,2,3]. When assessing the energy cost and GHG impacts of individual buildings throughout their life cycle, these impacts can be categorized into operational and embodied impacts. While advancements in innovation and regulation have successfully mitigated operational impacts, the reduction of embodied impacts is still hindered by the absence of consistent methodologies, data, and regulation [4, 5]. According to research [6], if significant improvements in building efficiency are not implemented, GHG emissions related to the construction and building industry could potentially double within the next 20 years due to the rapid increase in urban sprawl.

The emissions of carbon and energy use in a building occur during various stages of its life cycle, including (i) material extraction, (ii) material processing and component manufacturing, (iii) construction and assembly, (iv) operation and service, and (v) end of life. These stages encompass the assessment of the building's environmental impact from its inception to its disposal [7]. Furthermore, the transition between these phases incurs notable emissions associated with transportation, which is a crucial factor that must be taken into account when estimating carbon emissions. In simple terms, embedded carbon in a building refers to its carbon footprint before completion, including emissions during maintenance, deconstruction, transportation, and waste recycling.

Although the academic literature predominantly emphasizes published case studies, the assessment of embodied carbon life cycle in buildings is increasingly prevalent in industry consultancy as well. However, there is a notable scarcity of published information regarding the specific data employed in the calculations [8,9,10,11,12]. Khan et al. [8] used Building Information Modeling to assess the environmental implications of a three-storey commercial building in Pakistan. The top contributing materials to the overall carbon footprint were steel (33.51%), concrete (19.98%), brick (14.75%), aluminum (12.10%), and paint (3.22%), accounting for a combined contribution of over 80%. Hellmeister [9] used Athena Impact Estimator for Buildings to perform a life cycle assessment and compare the life span emissions of a mass timber building to a conventional steel–concrete building in Boston, Massachusetts. Assuming both buildings had a lifespan of 60 years, the results showed that the mass timber building had 52% less construction material mass and a 53% reduction in embodied carbon over its life cycle compared to the conventional steel–concrete building. Seo et al. [10] used an Input–Output National Database to import the energy use and GHG emissions of construction materials over their lifespan in Japan. The authors used this method to evaluate the environmental implications of a three-storey library building of reinforced-concrete. With a site area of 849 m2 and a gross floor area of 2413 m2, results revealed emissions of 1,367,120 kg CO2e from the construction to the end of life of the library building in Japan. Cihat et al. [11] employed a hybrid life cycle assessment methodology to assess the carbon footprint of residential and commercial buildings in the United States of America, from cradle to grave. The results emphasized the significant role of the use phase in greenhouse gas emissions, accounting for a substantial 91% of the total embodied carbon contribution. On the other hand, Su et al. [12] conducted an overview of the state-of-the-art and summarized the methodologies used from 48 articles. The gathered approaches from embodied carbon life cycle assessment in buildings are Buildings Information Modeling, Athena Impact Estimator for Buildings, Input–Output Database, and Hybrid Input–Output Life Cycle Assessment. Finally, the authors proposed the development of a machine-learning model as a solution to mitigate the missing data associated with current models. They also emphasized the need for standardizing protocols and guidelines for conducting embodied carbon assessments in buildings. By implementing these recommendations, it would be possible to streamline the assessment process and ensure consistency across different projects and organizations in different countries.

This research paper presents a pioneering supervised learning model for conducting embodied carbon life cycle assessments in buildings. The primary aim of this study is to establish a dynamic model valable to all countries and standardized protocols and guidelines for this area of research. The outline of the paper is composed of four chapters:

  • Chapter 1–Introduction: The first chapter sets the stage for the paper by providing an overview of the significance of embodied carbon assessment in the context of sustainable building practices. It highlights the need for a machine learning model and standardized protocols and guidelines in this field, laying the foundation for the subsequent chapters.

  • Chapter 2–Learning model and validation: The second chapter presents the two core contributions of the paper. The first-core contribution includes the proposed machine learning model creating a dynamic database for assessing embodied carbon life cycle assessment in buildings. The second-core contribution provides an algorithmic protocol to serve as a practical guideline for future case studies in the field; this section aims to provide researchers or practitioners with a structured approach to follow when designing and executing case studies, ensuring that they are conducted systematically and rigorously. The model is tested and a percent error is computed to testify the validity of the machine learning model.

  • Chapter 3–case study prediction: The case study prediction serves as an illustrative application of the algorithmic protocol depicted in Chapter 2. It also provides an opportunity for the authors to delve into the analysis of embodied carbon in buildings specifically within the context of Morocco. By utilizing this methodology, the authors can gain insights and examine the levels of embodied carbon in buildings throughout the region. This investigation aims to enhance understanding and shed light on the environmental impact of construction practices in Morocco, facilitating informed decision-making for sustainable building design and construction in the future.

  • Chapter 4–conclusion: The final chapter concludes the paper by summarizing the key findings, implications, and contributions of the research. It reflects on the significance of the proposed model and algorithm in advancing the field of embodied carbon assessment in buildings. The chapter also discusses potential avenues for further research, addressing any limitations and providing recommendations for future studies. Overall, this chapter offers a comprehensive conclusion to the paper, emphasizing its importance and potential impact.

2 Learning model and validation

The model learns from authenticated databases of different countries. The used databases provide comprehensive data on the carbon and energy footprints of over 200 materials in the construction field and estimate the environmental impacts associated with different stages of a product's life cycle, from raw material extraction to end-of-life disposal. The life cycle assessment stages of embodied carbon in buildings are displayed in Fig. 1.

Fig. 1
figure 1

Life cycle assessment stages diagram

Moncaster and Symons [13] presented a schematic process, depicted in Fig. 2, to demonstrate the energy usage and assessment of embodied carbon in construction materials. They concluded that the greenhouse gas emissions from buildings are predominantly attributed to the energy consumed during various stages of the life cycle assessment. Additionally, Fig. 2 and previous studies [10,11,12,13,14,15,16] emphasized the significance of national grid electricity and national energy profile pathways as crucial input data for conducting a life cycle assessment on any material or device. Therefore, when developing a supervised learning model, it is essential to prioritize the inclusion of electricity production mix and emission factors as primary inputs. The desired output of this model would be the embodied arbon in construction materials used for buildings.

Fig. 2
figure 2

Total primary energy in the cradle-to-gate of construction materials in buildings [13]

2.1 Training

The proposed model is a supervised learning approach that relies on labeled data, where both the input data and the corresponding correct output are provided. Input data are electricity production mix and emission factor, while the output is correct data of embodied carbon from construction materials. To train the model, different country-specific databases are utilized, including GREET and Athena Impact Estimator for Buildings for USA data [17, 18], Inventory for Carbon & Energy for UK data [19], One Click LCA for Germany and Finland data [20], and eToolLCD for France data [21]. The mentioned databases were extracted to new databases and were manipulated to display embodied carbon from building materials over an equal lifespan of 100 years, assuming linear emissions over the material’s lifespan. The input data are manually entered into the model, while the output data are obtained from noise-free databases that are easily labeled and tracked, facilitating the training process for a straightforward model. Figure 3 illustrates the diagram of the used supervised learning model. The model assumes the following:

  • Embodied carbon includes transportation emissions,

  • National grid electricity is a major player in embodied carbon life cycle assessment in buildings.

Fig. 3
figure 3

Diagram of the supervised learning model

2.2 Validation

The validation phase tests the validity of the outcome model from literature review case studies and results. The results are reincarnated via the generated model, and a percent of error is thus computed, as in Eq. (1), where \({v}_{A}\) is the actual value generated from the model and \({v}_{E}\) is the expected value from literature review case study.

$$\delta =\left|\frac{{v}_{A}-{v}_{E}}{{v}_{E}}\right|\times 100\%$$
(1)

2.2.1 Algorithmic protocol of the model

During the validation and prediction phases, the algorithm depicted in Fig. 4 is executed by the model. First, the user is prompted to choose between crade-to-gate assessment or cradle-to-grave assessment. Eventually, the model begins by collecting input data from the user and proceeds to calculate the embodied carbon associated with various aspects of the building, including structure, envelope, openings, and floors. For each building element, the ELCA Function (shown in Fig. 5) is invoked. This function retrieves the embodied carbon per unit mass of the material from the generated database model and incorporates the user-provided volume of the materials used. Using Eq. (2), the model then computes the embodied carbon of the specified volume of each material, where \({\rho }_{k}\) is the material density, \({V}_{k}\) is the volume used, and \({ecm}_{k}\) is the embodied carbon per mass. There might be multiple materials used under one element, therefore, the embodied carbon of the element is the sum of the composing materials, as in Eq. (3).

Fig. 4
figure 4

Algorithm for embodied carbon assessment in buildings

Fig. 5
figure 5

ELCA function from main algorithm

$${ec}_{k}={\rho }_{k}\times {V}_{k}\times {ecm}_{k}$$
(2)
$${ec}_{i}={\sum }_{k}{ec}_{k}$$
(3)

For every aspect of the building, the sum of embodied carbon over 100 years is depicted in Eq. (4), but for building floors, the sum includes embodied carbon assessment for every floor as in Eq. (5). Ultimately, the total embodied carbon from a building is the total embodied carbon in every building aspect times the building life span \(n\) with respect to the materials lifecycle span, which is 100 years, as in Eq. (6).

$${X}_{n}={\sum }_{i}{ec}_{i}$$
(4)
$${X}_{4}={\sum }_{i}{\sum }_{j}{ec}_{ij}$$
(5)
$${X}_{T}=\frac{n\times ({X}_{1}+{X}_{2}+{X}_{3}+{X}_{4})}{100}$$
(6)

2.2.2 Validation test

The model and learning model is tested from literature review case studies [8, 10, 22]; the case studies include five different countries, Pakistan [8], Japan [10], Thailand [22], Iraq [23], and the United Kingdom [24]. The inputs, outcome, and percent error are gathered in Table 1. Electricity production mix data and emission factors were generated from the International Energy Agency [25] and other reports [26,27,28] for the corresponding year of study. Results reveal a percent error of 16.14% for Thailand, 20.07% for Japan, 19.04% for Pakistan, 15.82% for Iraq, and 7.46% for the United Kingdom. The resulting percent errors are due to the standardization of lifecycle assessment stages over all countries, the tight learning data, the negligence of other embodied carbon factors as inputs, and the assumption of linear embodied carbon over the lifespan. During the validation stage, the model demonstrated an average percentage error of approximately 15.71%, which is considered acceptable given the aforementioned limitations and assumptions.

Table 1 Validation test—inputs and outcome

During the validation phase, the United Kingdom stands out with a notably low error percentage in contrast to other countries. This achievement can be attributed to the incorporation of data from United Kingdom databases in the model's training process. The inclusion of this region-specific data has enabled the model to better grasp the intricacies of the United Kingdom's patterns and nuances, resulting in enhanced accuracy for this particular region. This success underscores the significance of tailoring training data to specific contexts, ultimately leading to more precise outcomes.

3 Case study prediction

3.1 Background and specifications

The case study prediction serves as an illustrative application of the algorithmic protocol depicted in Figs. 4 and 5. It also provides an opportunity for the authors to delve into the analysis of embodied carbon in buildings specifically within the context of Morocco. By utilizing this methodology, the authors can gain insights and examine the levels of embodied carbon in buildings throughout the region. This investigation aims to enhance understanding and shed light on the environmental impact of construction practices in Morocco, facilitating informed decision-making for sustainable building design and construction in the future. Morocco has implemented a comprehensive low-carbon strategy in the building sector to reduce greenhouse gas emissions and promote sustainable development. The country's approach includes various initiatives and measures together with incitement against conventional building materials for construction and insulation. Therefore, this section aims to predict the cradle-to-gate embodied carbon of a conventional 2-Storey residential building in Morocco over a 50-year lifespan; this latter has been concisely chosen based on national statistics [29,30,31] of average residential buildings lifespan in Morocco. The building’s general data and technical specifications were gathered in Table 2.

Table 2 Building specifications

The inputs of the model require the latest data on electricity production mix and emission factor. The Kingdom of Morocco generates 49 TWh of electricity annually, with 56% derived from coal, 12% from natural gas, 10% from oil, and 22% from renewable energies [32]. Consequently, the emission factor is 0.571 kg of CO2e/kWh [33, 34].

3.2 Results and analysis

In a similar vein to the validation phase, the embodied carbon emissions associated with the respective residential building are presented in Table 3. Moroccan architectural landscapes are distinguished by their distinctive construction elements. Steel bars and concrete are extensively employed in the formation of building structures, ensuring durability and stability. Concrete blocks, in conjunction with cement mortar, constitute the primary components of walls, providing a robust foundation. However, the choice of single glazing for windows inadvertently results in subpar insulation, potentially affecting energy efficiency. The utilization of standard wood for frames and interior doors imparts a traditional aesthetic to the interiors, while the preference for steel in exterior doors serves dual purposes, combining security and functionality. It is worth noting that despite its prevalence, conventional insulation materials are employed to regulate indoor temperature and comfort levels. In summary, Moroccan architectural practices reveal a balance between functional necessities and traditional influences.

Table 3 Embodied carbon assessment of a conventional residential building in Morocco

The findings presented in Table 3 offer a comprehensive perspective on the emissions associated with conventional 2-storey residential structures spanning an area of 120 m2. The data shows a considerable embodied carbon output, totaling 34.7 tons-CO2e over 50 years lifespan, accompanied by an associated error margin of 15.71%. These results shed a stark light on the noteworthy environmental repercussions that accompany conventional building designs. Of particular significance is the substantial carbon footprint associated with these buildings. This emphasizes the critical importance of transitioning towards sustainable construction practices that can mitigate the ecological toll imposed by conventional approaches.

Figure 6 visually illustrates the distribution of embodied carbon within the building, shedding light on its environmental footprint. Notably, the floors dominate this carbon allocation, contributing a substantial 38.7 tons-CO2e and representing 55% of the building’s total embodied carbon. The structural elements closely follow, contributing 9.3 tons-CO2e, equivalent to 27%. Additionally, the envelope and openings play pivotal roles, contributing 14% and 4% respectively, with carbon emissions of 4,7 tons-CO2e and 1.3 tons-CO2e over 50 years lifespan. This detailed breakdown provides valuable insights into the specific building components that wield the most significant influence over its overall embodied carbon.

Fig. 6
figure 6

Share of building aspects in the embodied carbon results

The analysis presented in Fig. 7 provides a comprehensive insight into the significant determinants of embodied carbon emissions within the examined building. Specifically, the study highlights that insulation, walls, and finishes emerge as the primary drivers, collectively accounting for 72.7% of the total embodied carbon emissions, equivalent to 25.2 tons-CO2e. Notably, insulation stands out as the most influential factor, contributing a substantial 37.0%, followed by walls at 22.1%, and finishes at 13.6%. These findings underscore the pivotal role of these components in shaping the overall environmental impact of the building’s construction and call for targeted strategies to optimize their carbon performance.

Fig. 7
figure 7

Embodided carbon of elements in a conventional residential building in Morocco

Conversely, the analysis demonstrates that glazing and frames play a relatively minor role in the overall embodied carbon emissions of the building. Revisiting the data presented in Table 3, it becomes evident that conventional construction practices in Morocco employ single glazing and standard wood frames. While these choices align favorably with the criteria of embodied carbon assessment due to their environmental friendliness, they do not align as well with energy efficiency considerations. This is particularly significant given that the Thermal Construction Regulation in Morocco mandates the adoption of double glazing and frames constructed from materials like aluminum and steel [2]. This juxtaposition underscores the complex interplay between various sustainability metrics within the construction industry. While certain choices may yield lower embodied carbon emissions, they might not align with broader energy efficiency goals set by regulatory frameworks. As the building sector seeks harmonious advancements in both environmental impact reduction and energy performance, a nuanced approach that balances these factors becomes imperative for constructing ecologically responsible and energy-efficient buildings in Morocco and beyond.

3.3 Assessment and comparison of results

For a comprehensive cross-country comparison of embodied carbon assessments, particularly concerning conventional buildings in Morocco and those in other countries, it is imperative to adopt a standardized metric for the same LCA framework. This entails using the cradle-to-gate case studies only and presenting the results in terms of kg-CO2e per square meter per year, while duly factoring in the total floor area. This approach ensures equitable evaluations across different building sizes and configurations, enhancing both the interpretability and comparability of findings within the literature review. Utilizing the established standardized metric, it is determined that conventional constructions in Morocco exhibit an embodied carbon intensity of 2.89 kg-CO2e per square meter per year. Upon comparing this metric to case studies cited in the literature review, except for Iraq due to insufficient specifications [23], noteworthy observations emerge. Specifically, conventional structures in Thailand, Japan, Pakistan, and the United Kingdom register embodied carbon intensities of 1.87, 9.45, 3.57, and 6.58 kg-CO2e per square meter per year, respectively, as displayed in Table 4. Notably, in the cases of Thailand and Pakistan, the buildings under consideration lack insulation. Consequently, it is anticipated that the inclusion of insulation would lead to a considerable increase in the embodied carbon emissions of these structures.

Table 4 Comparison of embodied carbon life cycle assessment of buildings in different countries

The findings presented in Table 4 unveil a striking contrast in the annual embodied carbon emissions per square meter among various countries. Notably, this variance cannot be attributed to differences in building categories; instead, it can be traced back to the specific construction materials accessible and utilized within each country, along with the corresponding volumes employed. This underscores the pivotal role played by regional construction practices and material availability in shaping the distinct levels of embodied carbon emissions observed across nations. Such insights highlight the complex interplay between local resource availability, construction methodologies, and resulting environmental implications, thereby emphasizing the need for nuanced, context-specific strategies to address embodied carbon in the built environment.

4 Conclusion

The significance of embodied carbon in buildings cannot be overstated when it comes to evaluating their environmental impact. It encompasses the emissions generated during the production and utilization of construction materials throughout the entire lifecycle of a building. The literature review conducted in this study shed light on the limited availability of data in existing case studies and unveiled the intricate nature of methodologies employed for assessing embodied carbon in buildings. These findings underscored the pressing need for a machine learning model, as well as standardized protocols and guidelines within this domain, which served as the fundamental basis for the subsequent chapters of this research.

The first core contribution presents a dynamic machine learning model, utilizing authentic cross-country databases and supervised learning techniques. Validation exhibited an average error of approximately 15.71%, revealing potential for improvement. The second core contribution of this paper introduces a standardized algorithmic protocol and guidelines for assessing embodied carbon in buildings. This protocol provides a systematic approach to quantifying and evaluating the environmental impact of embodied carbon throughout the life cycle of buildings. To demonstrate the application of the algorithm, a case study was conducted within the specific context of Morocco. The study utilized the developed model to predict the embodied carbon of typical conventional residential buildings in Morocco. The results revealed that a two-story residential building with a size of 120 m2 had an overall carbon equivalent emission of 34.7 tons. Among the building components, floors were found to be the major contributors, accounting for 55% of the embodied carbon, followed by the structure (27%), envelope (14%), and openings (4%). Notably, the study highlighted the significant contribution of insulation, which accounted for 36.3% of the total embodied carbon. These findings emphasize the importance of considering insulation materials and strategies for reducing embodied carbon in buildings, particularly in the context of Morocco.

To bolster the model's accuracy, additional data sources and inputs beyond electricity mix and emission factors are recommended. Incorporating transportation emissions and material production variations could enhance precision. Future research refining the model by encompassing these factors promises more dependable predictions of embodied carbon in buildings.