Environmentally data-driven smart sustainable cities: applied innovative solutions for energy efficiency, pollution reduction, and urban metabolism

The IoT and big data technologies have become essential to the functioning of both smart cities and sustainable cities, and thus, urban operational functioning and planning are becoming highly responsive to a form of data-driven urbanism. This offers the prospect of building models of smart sustainable cities functioning in real time from routinely sensed data. This in turn allows to monitor, understand, analyze, and plan such cities to improve their energy efficiency and environmental health in real time thanks to new urban intelligence functions as an advanced form of decision support. However, prior studies tend to deal largely with data-driven technologies and solutions in the realm of smart cities, mostly in relation to economic and social aspects, leaving important questions involving the underlying substantive and synergistic effects on environmental sustainability barely explored to date. These issues also apply to sustainable cities, especially eco-cities. Therefore, this paper investigates the potential and role of data-driven smart solutions in improving and advancing environmental sustainability in the context of smart cities as well as sustainable cities, under what can be labeled “environmentally data-driven smart sustainable cities.” To illuminate this emerging urban phenomenon, a descriptive/illustrative case study is adopted as a qualitative research methodology§ to examine and compare Stockholm and Barcelona as the ecologically and technologically leading cities in Europe respectively. The results show that smart grids, smart meters, smart buildings, smart environmental monitoring, and smart urban metabolism are the main data-driven smart solutions applied for improving and advancing environmental sustainability in both eco-cities and smart cities. There is a clear synergy between such solutions in terms of their interaction or cooperation to produce combined effects greater than the sum of their separate effects—with respect to the environment. This involves energy efficiency improvement, environmental pollution reduction, renewable energy adoption, and real-time feedback on energy flows, with high temporal and spatial resolutions. Stockholm takes the lead over Barcelona as regards the best practices for environmental sustainability given its long history of environmental work, strong environmental policy, progressive environmental performance, high environmental standards, and ambitious goals. It also has, like Barcelona, a high level of the implementation of applied data-driven technology solutions in the areas of energy and environment. However, the two cities differ in the nature of such implementation. We conclude that city governments do not have a unified agenda as a form of strategic planning, and data-driven decisions are unique to each city, so are environmental challenges. Big data are the answer, but each city sets its own questions based on what characterize it in terms of visions, policies, strategies, pathways, and priorities.


Introduction
The concentration of economic activities, the high-intensity use of resources, and the massive deployment of non-renewable energy in cities demonstrate that they have major negative impacts on the environment. In other words, the significance of the environment in cities is justified by the fact that they consume about70% of global energy supply, generate about 75% of greenhouse gases (GHG) emissions, and have currently more than 50% of the world population (Bibri and Krogstie 2020a). This is expected to, according the United Nations, reach 70% by 2050 (UN 2015a). In the current climate of the unprecedented urbanization and increased uncertainty of the world, it is becoming increasingly more challenging for cities to configure themselves more sustainably from an environmental perspective. This in turn implies that the city governments in both the technologically and ecologically advanced nations will face significant challenges due to the issues engendered by urban growth, including increased energy consumption, environmental degradation, environmental pollution, inefficient management of infrastructures, ineffective planning strategies, inadequate decision-making systems, as well as socio-economic disparities and social inequalities (Bibri 2019a;Bibri and Krogstie 2017a). In particular, urban growth raises a variety of problems that jeopardize the environmental sustainability of cities as it puts an enormous strain on urban systems and thus great demand on energy resources and services. Energy as a key urban domain produces the largest share of the world's emissions of GHG. This makes it the dominant contributor to climate change, and increasing GHG emissions continue to drive climate change. With rising GHG emissions, climate change is occurring at rates much faster than anticipated and its effects are clearly felt worldwide (UN 2019a). The Sustainable Development Goal (SDG) 13 aims to take urgent actions to combat climate change and its impacts (UN 2019b). Nonetheless, modern cities play a leading role in strategic sustainable development and have a central position in developing and applying new technologies to support the transition towards sustainability in the face of urbanization.
For cities to disentangle the kind of wicked problems, intractable issues, and complex challenges related to climate change, they need to develop and apply more innovative solutions and sophisticated approaches enabled by cutting-edge technologies and underpinned by groundbreaking scientific knowledge. This is necessary to monitor, understand, analyze, and plan cities in ways that enhance, optimize, and maintain their performance with respect to environmental sustainability. In this respect, the United Nation's 2030 Agenda regards advanced Information and Communication Technology (ICT) as a means to protect the environment, increase resource efficiency, achieve human progress and knowledge, and upgrade legacy infrastructure (UN 2015a). Therefore, the multifaceted potential of the smart city approach has been under investigation by the UN (2015b) through their study on "Big Data and the 2030 Agenda for Sustainable Development." This is of high importance and relevance to the SGD 7 of the UN's 2030 Agenda (UN 2015b): "ensure access to affordable, reliable, sustainable, and modern energy for all" (UN 2019a, b). Energy is at the core of sustainable development goals, and thus the modernization of energy systems is more needed than ever.
Currently, greater importance is given to economic development and social development at the cost of environmental integration and protection. In recent years, major topics discussed in this area have included the depletion of non-renewable resources, the harvesting of renewable resources, the destruction of ecosystems, and the generation of pollution. Therefore, advanced computational data analytics approaches are required to observe and discover hidden patterns of energy production and consumption in order to devise more effective solutions that could avert the multidimensional effects of devouring energy. There is a general consensus that innovative data-driven technology solutions hold great potential to improve energy efficiency and mitigate climate change. Indeed, advanced ICT is seen as a critical enabler for advancing environmental sustainability given its unique ability to make energy consumption and GHG emissions visible through its processes, products, and services. This is at the core of the vision of smart energy. This aims to achieve energy systems that are highly energy-efficient, increasingly powered by renewable and local energy sources enabled by new technologies, and less dependent on fossil fuels (Walnum et al. 2019). The vision has spurred the development of new approaches to future sustainable energy systems, such as smart grids, smart meters, green buildings, and solar photovoltaic panels (Lund et al. 2017;Koutitas 2018). The smart city discourse emphasizes the role and potential of advanced ICT as a distributed infrastructure of smart meters, computing resources, and interfaces together forming a sort of digital nervous system for the city in facilitating the management of urban infrastructures, systems, and services (Batty et al. 2012;Bibri 2019aBibri , 2020aKitchin 2014;Townsend 2013).
It is clear that we can have a positive impact on the environment by making cities more sustainable in terms of their energy systems by means of modern technologies. In particular, recent advances in the IoT and big data analytics along with higher-level computational infrastructures have presented many new opportunities to develop applied solutions in the form of intelligence functions for energy efficiency and pollution reduction, notably within the framework of smart sustainable cities. This emerging global paradigm of urbanism is indeed seen today as the most important arena for sustainability transitions in an increasingly urbanized world. It holds great potential to instigate major societal transformation by linking together the agendas of sustainable development and technological innovation. Of particular relevance to this study, numerous alternative approaches based on the IoT and big data technologies have materialized in recent years, providing the raw material for both smart cities and sustainable cities to improve their environmental performance in the face of the escalating urbanisation trend.
Already, the number of objects connected to the Internet has, according to Cisco, exceeded the number of human beings in the world. And the increasing number of the networked devices deployed across urban environments has resulted in the exponential growth in the amount of data generated by sensors, thereby the relevance of big data analytics techniques for handling the storage, management, processing, and analysis of this magnitude of data. On the whole, the IoT and big data technologies are seen as the backbone for building smart sustainable cities of the future.
Big data technologies have become essential to the functioning of smart cities (e.g., Batty 2013; Khan et al. 2015;Kitchin 2014Kitchin , 2015Kitchin , 2016Kitchin et al. 2015;Rathore et al. 2016Rathore et al. , 2018Townsend 2013), particularly in the endeavor to improve their performance with respect to environmental sustainability (e.g., Al Nuaimi et al. 2015;Angelidou et al. 2017;Batty et al. 2012;Bibri 2019cBibri , 2020aBibri and Krogstie 2020b;Hashem et al. 2016;Kumar and Prakash 2016;Nikitin et al. 2016;Perera et al. 2017). The same applies to sustainable cities (e.g., Bibri 2018aBibri , b, 2019aBibri , b, 2020aBibri and Krogstie 2017b, 2019a, 2019b, 2020aKramers et al. 2014;Pasichnyi et al. 2019;Shahrokni et al. 2014bShahrokni et al. , 2015aSun and Du 2017). Consequently, urban processes and practices are becoming highly responsive to a form of data-driven urbanism that is increasingly becoming the key mode of operation and organization for smart sustainable cities. To put it differently, we are moving into an era where instrumentation, datafication, and computation are routinely pervading the very fabric of both smart cities and sustainable cities, coupled with the integration and coordination of their systems and domains. As a result, vast troves of data are being generated, analyzed, harnessed, and exploited to control, manage, and regulate various domains of city life. With these developments, smart sustainable cities are being increasingly designed in ways that allow to monitor, understand, analyze, and plan their systems and infrastructures in real time. This is changing the way cities can be planned across multiple time scales, raising the prospect that cities can be made smarter and more sustainable in the long term by continuous reflection in the short term.
In light of the above, advanced ICT, especially the IoT and big data technologies, constitutes a promising response to the challenges of environmental sustainability due to its tremendous, yet untapped, potential for tackling many problems associated with energy consumption and air and noise pollution. However, prior studies tend to deal largely with the IoT and big data technologies in the realm of smart cities (e.g., Ahmed et al. 2017;Berkel et al. 2018;Ji et al. 2014a, b;Kumar and Prakash 2016;Perera et al. 2014;Rathore et al. 2016Rathore et al. , 2018Wan et al. 2016;Zanella et al. 2014), mostly in relation to economic and social aspects (Ahvenniemi et al. 2017), leaving important questions involving the underlying substantive and synergistic effects on environmental sustainability barely explored to date. These issues also apply to sustainable cities, especially eco-cities (e.g., Bibri 2018bBibri , 2019bBibri , 2020aHöjer and Wangel 2015;Kramers et al. 2014). In a nutshell, the integration of the IoT and big data technologies is an unexplored research area as regards the new opportunities it offers in terms of responding to the challenges of environmental sustainability.
With the above in regard, this paper investigates the potential and role of data-driven smart solutions in improving and advancing environmental sustainability in the context of smart cities as well as sustainable cities under what can be labeled "environmentally data-driven smart sustainable cities." Prior to this, it provides an overview of the state-of-the-art enabling technologies of the IoT and big data computing and the associated city infrastructures, frameworks, operating systems, and operations centers. The main motivation for this study is to invigorate the application demand for the solutions that the IoT and big data technologies can offer for environmental sustainability.
This paper unfolds as follows: Research methodology section details and justifies the research methodology adopted in this study. The key components of the IoT section provides an overview of the technical literature on the IoT and big data technologies in the context of smart cities and smart sustainable cities. Results section presents the results, which are, in Discussion section, discussed and interpreted in perspective of previous studies. Finally, this paper concludes, in Conclusion section, by drawing the main findings, providing some reflections, and suggesting some avenues for future research.

Case study research
Case study research has long had a prominent position in many disciplines and professional fields, established as a credible, valid design that facilitates the investigation and understanding of complex phenomena in their real-world settings. It has benefited from the prior development of the theoretical propositions contributed by a number of researchers with different backgrounds to this design. Similarly, the methodological development of case study research has emanated from the influence of the different researchers' perspectives and interpretations of this design. This has resulted in a pragmatic flexible research approach, capable of providing an up-close, in-depth, and detailed examination of a wide range of specific cases and a comprehensive understanding of a large number and variety of issues. Therefore, case study research has grown in reputation as an effective research methodology. As a result, it has undergone substantial improvement through the application of a diversity of approaches. Central to this is the underpinning ontological and epistemological orientations of the numerous researchers involved in the evolution of case study research as coming from various disciplines. While over time the contributions of those researchers have helped to develop and strengthen case study research, the variety of disciplinary backgrounds has also added complexity, particularly around how such research is defined, described, and applied in practice. The nature of this complexity is explored in more detail by Farquhar (2012).

Case study research: definition and context
There is a variety of definitions and descriptions of case study research presented across the literature, which has resulted from researchers with different philosophical perspectives. The proliferation of definitions can create confusion when attempting to understand case study research. The most common definitions come from the work of Yin (2014Yin ( , 2017, Stake (1995), Merriam (2009), Thomas (2011), Simons (2009), and Creswell et al. (2007). As a working definition for this paper, Creswell et al. (2007) describe case study as a type of design in qualitative research, an object of study, and a product of the inquiry. The authors conclude with a definition that collates the hallmarks of the key approaches to case study and represents the core features of a case study: "a qualitative approach in which the investigator explores a bounded system (a case) … over time through detailed, in-depth data collection involving multiple sources of information … and reports a case description and case-based themes" (Creswell et al. 2007, p. 245). In particular, the case study approach entails the use of multiple sources of evidence. The use of multiple methods to collect and analyze data are found to be mutually informative in the case study research where together they provide a more synergistic and comprehensive view of the problem under study (Flyvbjerg 2011;Merriam 2009;Stake 2006;Stewart 2014).
Against the backdrop of this paper, this case study analyzes a range of different elements within the boundaries of two cities. It examines a contemporary real-world phenomenon and seeks to inform the theory and practice of data-driven smart sustainable urbanism by illustrating what has worked well, what has been achieved, what is the current situation, what needs to be improved in the future, and how this can be done. It serves as a way to illustrate theories and the effects of their application in regard to urban living. It is additionally regarded useful for understanding how different elements fit together and (co-)produce the observed impacts in a particular context based on a given set of intertwined factors.
Case study design, purpose, and process Various designs have been proposed for preparing, planning, and conducting case study research. The philosophical underpinnings of the researchers that have contributed to the development of case study research have created a variety and diversity of approaches. Under the more generalized category of case study, there exist several categories, each of which is custom selected for use depending on the objectives of the researcher, including: Illustrative case studies-these are primarily descriptive studies. Exploratory case studies-these are condensed case studies performed before implementing a large scale investigation. Cumulative case studies-these serve to aggregate information from several sites collected at different times. Critical instance case studies-these examine one or more sites either for the purpose of calling into question a highly generalized or universal assertion.
According to this classification, this case study is illustrative in design. Illustrative case studies, which are primarily descriptive in nature, typically utilize one or two instances of an event to show the existing situation. They serve primarily to make the unfamiliar familiar and to give readers a common language about the topic in question.
The methodological discourse stresses a number of themes on the direction and organization of case studies-their design. Thomas (2011) summarizes some of the better-known analyses in Table 1.
For an explication of the general themes raised in Table 3, the interested reader can be directed to the analysis from George and Bennett (2005). Furthermore, while case study research has evolved to be a pragmatic, flexible research approach, the variation in application, purposefulness, and validity can create a confusing platform for its use (Anthony and Jack 2009). Nevertheless, the versatility of case study research to accommodate the researcher's position presents a unique platform for a range of studies that can generate greater insights into different areas of inquiry. With the capacity to tailor approaches, case study designs can address a wide range of questions that ask why, what, and how of an issue and assist researchers to explore, explain, describe, evaluate, and theorize about complex issues in context. This pertains to the decisions that need to be made about the purpose, approach, and process in the case study. Thomas (2011) proposes a typology for the case study wherein purposes are first identified (evaluative, exploratory, or descriptive), then approaches are delineated (theorytesting, theory-building, or illustrative), then processes are decided upon, with a principal choice being between whether the study is to be single or multiple, among other things.
Following this typology, the purpose in this case study is descriptive, the approach is illustrative, and the process is multiple. The purpose is about the reason of doing this study. The approach is about the broad object of this study. The process is bout the operational processes of this study, which entails returning to the two subjects (as distinct from the object) in question and to the boundary decisions made at the outset. There has to be an examination of the nature of the decisions that are made at that time about the parameters that delimit the subject of the study (Thomas 2011). In this context, these parameters fall around the locus of defining the two cases by more of a range of boundary considerations: a range of different elements that were studied in their complexity. This determines the process of the case study, and this is about the presence of the comparative element to this study as consisting of two instances (Stake 2005). As stated by Thomas (2011, p. 517): "the case study, while it is of the singular, may contain more than one element in its subject and if this is so-that is, if there are two or several cases-each individual case is less important in itself than the comparison that each offers with the others." The key focus in this case study is not on the nature and shape of relationships per se in one city but rather on, to some extent, the nature of the difference between the one and the other and what this informs us about the dynamics that are significant in this difference. This comparative element is why Schwandt (2001) calls this kind of case study cross-case analysis.  Thomas (2011) To elaborate further on the purpose, descriptive case study accentuates the flexibility of case study research as a distinct form of inquiry that enables detailed and in-depth insights into a diverse range of issues across a number of disciplines. There is a consensus that the focus of a case study is the detailed inquiry of a unit of analysis as a bounded system (the case), over time, within its context. In descriptive case study research, questions and propositions about the phenomenon under study are carefully scrutinized and articulated at the outset. The articulation of what is known about this phenomena is referred to as a descriptive theory. Therefore, the primary purpose of this case study is to describe the selected cases in detail and in depth based on that articulation, and in their real-world settings. It is worth pointing out that internal validity in research design is not relevant as in most descriptive studies. Internal validity denotes the approximate truth about inferences regarding cause-effect, or the extent to which a study establishes a trustworthy cause-and-effect relationship between a treatment and an outcome. Accordingly, it is relevant in studies that attempt to establish a causal relationship, such as explanatory and hypothesis-generating (or heuristic) case studies, whereas descriptive research is used to describe some characteristics of certain phenomena, and does not address questions about why and when these characteristics occurred-no causal relationship (Bibri 2020a).

Descriptive case study steps
Descriptive case study research, as defined by (Yin 1984(Yin , 2009, has been identified as the most suitable methodology for this study. This methodology has been chosen considering the nature of the problem being investigated, the research aim, and the present state of knowledge with respect to the topic on focus. It involves the description, analysis, and interpretation of the present nature, composition, and processes of the two cities selected, where the focus is on the prevailing conditions. That is, how these cities behave in terms of what has been realized and the ongoing implementation of plans based on the corresponding practices and strategies related to environmental sustainability. To obtain a broad and detailed form of knowledge in this regard, we adopted a process that consists of the following steps: Using a narrative framework that focuses on data-driven smart solutions and their role and potential in improving and advancing environmental sustainability in the framework of the smart sustainable city as a real-world problem, and provides essential facts about it, including relevant background information. Introducing the reader to key concepts, core enabling technologies, infrastructures, landscapes, frameworks, as well as operating systems and urban operations centers, all with relevance to the problem under study. Identifying the commonalities and differences between the two cities with respect to the emerging n technologies Explaining the actual solutions in terms of plans and visions, the processes of implementing them, and the realized and expected outcomes Offering an analysis and evaluation of the relevant solutions and related issues, including strengths, weaknesses, and lessons learned.

Selection criteria
According to Seawright and Gerring (2020), there are different strategics for selecting the cases to be investigated, namely typical cases, diverse cases, extreme cases, deviant cases, influential cases, cost similar cases, and most different cases. The strategy adopted in this study is influential cases-which are central to a model or theory. The subjects have come into focus because of the inherent interest of the two cases-they are key cases of the phenomenon of environmentally data-driven smart sustainable cities. However, the subjects identified are in no sense a sample, representative of a wider population. Rather, they are selected because they are interesting examples through which the lineaments of the object can be refracted. Their scope is not restricted (e.g., Thomas 2011;White 1992).
The cases of Stockholm and Barcelona were selected using a theoretical sampling approach (Yin 1984(Yin , 2009). The Cities of Stockholm and Barcelona fall within the category of large cities in Europe. The area of Stockholm has an approximate size of 188 km and a population of 1,632,798 million habitants, and the area of Barcelona has an approximate size of 101.9 km 2 and a population of 5.586 million habitants. Additionally, the success of the two cities in the field of sustainable urbanism and smart urbanism, respectively, makes their strategies and solutions an ideal sample to analyze. This assertion can be easily demonstrated considering the multiple awards the two cities have received during recent years and their international positioning. The latter pertains to Stockholm as both a sustainable city and a smart sustainable city (e.g., Akande et al. 2018;Bibri 2020a, b;Bibri and Krogstie 2020a;Holmstedt et al. 2017;Kramers et al. 2016, Stockholm City 2009. And it relates to Barcelona as a smart city (e.g., Achaerandio et al. 2011;Ajuntament de Barcelona 2014a;Cohen 2012aCohen , b, 2014European Commission 2014;Eden Strategy Institute 2018;Manville et al. 2014;Nikitin et al. 2016) and a sustainable smart city (e.g., Bibri and Krogstie 2020b;Noori et al. 2020). Indeed, Barcelona is taking concrete actions for implementing the applied data-driven technology solutions developed for urban operational functioning and planning as part of the city management to improve and advance sustainabilitythereby evolving into what has been termed as a data-driven sustainable smart city (Bibri 2020a). Barcelona is strongly committed to becoming a smart city and a show-case for the rest of the world in sustainable urban development (Mora and Bolici 2016). This is clearly figured in the public statements proposed by different local government representatives (see, e.g., Ajuntament de Barcelona 2011Barcelona , 2012cBarcelona , 2013Barcelona , 2014b.
In view of the above, the two cities demonstrate exemplary practical initiatives as regards the integration of data-driven solutions and sustainable development strategies. As such, they may be seen as successful examples of the environmentally data-driven smart sustainable city, as well as critical cases in environmental sustainability. This is further due to the national focus on environmental sustainability in Stockholm and the national focus on ICT in Barcelona, with visible shared goals and visions in regard to these foci. All in all, the selection secured cases where advances in the IoT and big data technologies and their novel applications for environmental sustainability, coupled with future visions and goals, are present.

Subject, object, unit of analysis, and data collection
Whatever the frame of reference for the choice of the subject of the case study, there is a distinction to be made between the subject and the object of the case study. The subject is the "practical, historical unity" through which the theoretical focus of the study is being viewed (Wieviorka 1992), and the object is the analytical frame within which the study is conducted and which the case illuminates (Thomas 2011). Environmentally data-driven smart sustainable urbanism was identified as the universe-that is, the class of events-of which a group of two cases in this study represent instances. The subjects of this case study, which are the two cases themselves, are thus the instances of this urban phenomena, and the latter-the phenomena-comprise the analytical frame.
For a "case" to exist, we must be able to identify a characteristic unit … This unit must be observed, but it has no meaning in itself. It is significant only if an observer … can refer it to an analytical category or theory. It does not suffice to observe a social phenomenon, historical event, or set of behaviors in order to declare them to be "cases." If you want to talk about a "case," you also need the means of interpreting it or placing it in a context (Wieviorka, 1992, p. 160). The unit of analysis is the data-driven solutions applied in the sustainable city and the smart city for environmental sustainability.
The unit of analysis is essential to focalizing, framing, and managing the data collection and analysis. The qualitative data were extracted from multiple sources of evidence identified with a series of searches performed in various online databases. The relevant archive records and documents produced by public and private organizations were considered as primary sources (i.e., master plans, comprehensive plans, visions, strategies, agendas, project descriptions, presentations, interviews, etc.). In addition, a wealth of information was acquired from other documents produced by organizations or researchers not directly involved in the initiatives of the city cases. These sources were considered as secondary (i.e., reports, newspaper articles, journal and online articles, conference proceedings, research project deliverables, etc.).

Data analysis approach
To identify, analyze, interpret, and report the case-based themes, a thematic analysis approach was designed and employed. This qualitative analytical approach was deemed suitable given the form of knowledge and insights that we sought to gain from the qualitative data gathered in connection with the case study. Generally, it is up to the researcher to decide if this analytical approach is suitable for their research design, and whether it can be adapted for their own uses or purposes. However, thematic analysis is particularly, albeit not exclusively, associated with the analysis of textual material. Also, it is more appropriate when dealing with a large body of qualitative data. It emphasizes identifying, analyzing, interpreting, and reporting themes, i.e., important patterns of meaning within the qualitative data that can be used to address the research problem. Braun and Clarke (2006) suggest that thematic analysis is flexible in terms of research design given that it is not dependent on any particular theory: multiple theories can be applied to this process across a variety of epistemologies. Furthermore, thematic analysis is an umbrella term for a variety of different approaches, which are divergent in regard to procedures. In this study, we adopted an inductive approach to thematic analysis, which allows the data to determine the set of themes that are to be identified. That is to say, we developed our own framework based on what we found as themes (inductive) by discovering patterns, themes, and concepts in the collected data. For a detailed discussion of thematic analysis as a qualitative method, the interested reader can be directed to (Bibri 2020a).
The main steps of the analytical approach are as follows: 1. Reviewing the multiple sources of the data related to the selected cases. The outcomes of this process are numerous themes that are associated with the model of urbanism in question. This step provides the foundation for the subsequent analysis. 2. Pattern recognition (searching for themes) entails the ability to see patterns in seemingly random information. The aim is to note major patterns within the result of the first step. The second step looks for similarities within the sample and codes the results by concepts. In this step, the preliminary codes identified are the features of data that appear meaningful and interesting, and the relevant data extracts are sorted according to the overarching themes. 3. Revising themes is about combining, separating, refining, or discarding initial themes. This relates mainly to the inductive approach to thematic analysis. Data within the themes should cohere together meaningfully and be clear and identifiable as regards the distinction between these themes. A thematic 'map' is generated from this step. 4. Producing the report involves transforming the analysis into an interpretable piece of writing by using vivid and compelling data extracts that relate to the overarching themes, research questions, and literature. This is a fundamental step for supporting future comparative research and cross-case analysis (Yin 1984;Patton 2012). The report must portray an analysis supported with the empirical evidence that addresses the research problem.
This analytical strategy has allowed us to analyze the selected cases considering the different perspectives of multiple observers. Moreover, the final description of the process has gained greater strength thanks to the triangulation made possible by the use of multiple sources of evidence (George and Bennett 2005;Yin 1984;Voss et al. 2002).

The key components of the IoT
The IoT and big data technologies and their relationship In recent years, the IoT and big data analytics has become the predominant paradigm of urban computing. Using today's large-scale computing infrastructure and data gathered from sensing technologies via mainly wireless networks, this paradigm integrates computer science, data science, complexity science, urban science, data-intensive science, urban planning, urban sustainability, environmental science, sociology, and so forth, tackling a plethora of specific problems with concrete (scientific and computational) methodologies and simulation and modelling approaches in a data-centric computing framework.
The IoT has become a key component of the ICT infrastructure of smart sustainable cities. According to Giusto et al. (2010), the IoT is a "communication paradigm which visualizes a near future, in which physical objects are equipped with micro-controllers, transceivers for digital communication and fitting protocol stacks that will make these objects able to communicate with each other and with the users." Bibri (2020a) defines the IoT as the interconnection of uniquely identifiable embedded devices and smart objects connected to humans, embedded in their environments, and spread along the trajectories they follow using the Internet Protocol version 6 (IPv6), embedded systems, intelligent entities, and communication and sensing-actuation capabilities. The connectivity achieved by the IoT encompasses people, machines, tools, and places located anywhere. From a functional perspective, the IoT is defined as the IoT "allows people and things to be connected Anytime, Anyplace, with Anything and Anyone, ideally using Any path/network and Any service" (European Commission 2008, cited in Perera et al. 2017). The IoT is evolving into even more sophisticated network of sensors and physical objects, spanning all kinds of everyday objects. Looking to the future, a new forecast from International Data Corporation (IDC) estimates that there will be 41.6 billion connected IoT devices, or "things," generating 79.4 zettabytes (ZB) of data in 2025. Cisco IBSG predicts there will be 50 billion by 2020. As the number of connected IoT devices grows, the amount of data generated by these devices will also grow. It is important to note that these estimates do not take into account rapid advances in Internet or device technology; the numbers presented are based on extrapolation in terms of assuming that the existing trend will continue, or on what is known to be true today.
The IoT is viewed as part of the Internet of the future, which is expected to be dramatically different from what has hitherto been experienced in terms of the use of the Internet as we know today. The use of the IoT is intended "to achieve different intelligent functions from information exchange and communication, including learning about things, identifying things, tracking and tracing things, connecting with things, searching for things, monitoring things, controlling things, evaluating things, managing things, operating things, repairing things, and planning things" (Bibri 2018b, p. 8). In short, the objective of the IoT is to enable communications with and among smart objects as well as with people and their environment, without any human intervention. Zanella et al. (2014) state that the intention of the IoT is to make the Internet even more engaging and omnipresent by allowing easy entrance and communication with a large variety of devices so that it can support the development of a number of applications which make use of the possibly gigantic bulk and diversity of data produced by objects to present new services to citizens, companies and public administrations. This involves the value that is to be extracted from large masses of urban data for enhanced decision making and deep insights pertaining to a wide variety of practical uses and applications in relation to environmental sustainability. This is associated with smart cities (e.g., Al Nuaimi et al. 2015;Angelidou et al. 2017;Batty et al. 2012;Hashem et al. 2016), data-driven smart cities (e.g., Bibri and Krogstie 2020b;Nikitin et al. 2016), and smart sustainable cities (Bibri 2018b(Bibri , 2019b(Bibri , 2020a. The IoT-based infrastructure will allow different classes of cities to devise solutions for solving many environmental problems in a more efficient, effective, and responsible way. The upcoming data avalanche is the primary fuel of this new age where powerful computational processes use this fuel to create more sustainable, efficient, and resilient cities (Bibri 2019d).
There is no agreed academic or industry definition of big data. Therefore, many definitions have been suggested and are available in the literature, with each tending to offer a particular or different view of the concept based on the context of use. Many surveys of the emerging literature denote a number of key characteristic features of big data and tend to converge on three main attributes: the huge volume of data, the wide variety of data types, and the velocity at which the data can be collected and processed, more specifically: Volume: This relates to the size of the data such as terabytes, petabytes, zettabytes, and so on. Variety: Different sources can produce data such as sensors, devices, websites, LIDAR (Light Detection and Ranging), and smartphones, resulting in such types of data as RFID and GPS sensor readings, web logs, 3-D representations, and streamed video and audio. Velocity: This means how frequently the data is generated in terms of time scale.
Moreover, some data need to be processed in real-time and other data may only be processed when needed. Typically, three main categories can be identified, namely real-time, frequent, and occasional.
Generally, the term "big data" is essentially used to mean collections of datasets whose attributes make it extremely difficult to manage, process, and analyze using the traditional database systems and software techniques. In the context of smart sustainable cities, the concept of big data can be used to describe a colossal amount of urban data, typically to the extent that their manipulation, analysis, management, and communication present significant computational, analytical, logistical, integrative, and coordinative challenges. Kitchin (2014, p. 3) describes big data as: huge in volume, consisting of terabytes or petabytes of data; high in velocity, being created and used in or near real-time; diverse in variety, being a mix of structured and unstructured data, and often being temporally and spatially referenced; exhaustive in scope, striving to capture entire populations or systems (n = all), or at least much larger sample sizes than would be employed in traditional, small data studies; fine-grained in resolution, aiming to be as detailed as possible, and uniquely indexical in identification; relational in nature, containing common fields that enable the conjoining of different data sets; flexible, holding the traits of extensionality (can add new fields easily) and scaleability (can expand in size rapidly).
The term "big data analytics" refers to a type of quantitative research that examines large amounts of data to uncover hidden patterns, unknown correlations and other useful information. In more detail, this term denotes any vast amount of data that has the potential to be collected, stored, retrieved, integrated, selected, preprocessed, transformed, analyzed, and interpreted for discovering new or extracting useful knowledge. The obtained results can be evaluated and visualized in an understandable format before their deployment for decision-making purposes (e.g., improving, adjusting, or changing an operation, function, service, strategy, or policy). In the framework of smart sustainable cities, big data analytics refers to a collection of sophisticated and dedicated software applications and database management systems run by machines with very high processing power, which can turn a large amount of urban data into useful knowledge for enhanced decision-making in relation to various urban systems and domains, such as energy, environment, and transport.
A great deal of the unfolding big data deluge is due to the IoT as a form of ubiquitous computing. The IoT and big data are massive, complex ideas. While interrelated, they are also recognizably different in nature. The IoT consists of millions of networked devices that collect, transfer, and communicate information, but big data encompasses a much wider landscape. The enormous collection of connected sensors, devices, and other "things" that represent the IoT is making a significant contribution to the volume and variety of the data being generated. The IoT and big data remain distinct but complementary. While both the IoT and big data denote collecting large sets of data, only the IoT seeks to run analytics simultaneously to support real-time decisions (e.g., in city operations centers). While the focus of IoT is more on the immediate analysis and use of incoming data, big data tools can still aid some functions. Types of data sources are another major distinction between the two. Big data analytics typically looks at human choices in an effort to predict behavior and uncover patterns or shifts. On the other hand, the IoT is centered on machine-generated data, and its primary goals are machine-oriented-optimal system performance (e.g., smart grids, smart appliances, street lighting, etc.), predictive maintenance, and so on. The IoT and big data emphasize the need for converting data into tangible insights that can be acted upon. They have an important relationship that will continue to develop in parallel with new advances in technology. Cities wishing to harness the power of data should carefully consider the devices they choose to deploy and the types of information they collect. Making an effort at the front end to gather only useful, actionable data-and designing internal systems to process these in domain-specific ways-will make the process of analytics that much easier. To gain further insights into the relationship between the IoT and big data analytics, the interested reader can be directed to Bibri (2018b).

Sensors and things
The IoT involves a myriad of sensors and deals with numerous physical and virtual objects due to the scale of its ubiquity and the huge range of the applications it offers. As a form of countless wirelessly interconnected sensing and computing devices, the IoT is increasingly pervading urban environments and making everyday objects smart by enabling them to communicate with each other, interact with people and their objects, and explore their surroundings. Hence, it entails a complex sensor infrastructure and processing platform, and thus requires innovative tools, processes, methods, and techniques to handle the volume, variety, and velocity of the colossal amount of data generated on a daily basis to enable new applications and services. Despite the difficulty in overcoming the hurdles to the wide adoption of the IoT within smart sustainable cities, the IoT has demonstrated distinguished potential to add a whole new dimension to environmental sustainability by enabling communication between and information exchange among the physical and virtual objects deployed across urban environments in connection with energy systems and services.
Sensor technology is the key enabling technology of the IoT. The sensors serve as main sources for big data analytics as a computational process. In this respect, the automated approach to data generation is the most common and prominent in the context of the IoT. There are a number of tools associated mainly with sensors that can be employed in the automated approach to generating urban data (Batty et al. 2012;Bibri 2018bBibri , 2020aDodge and Kitchin 2007;Kitchin 2014;Kitchin and Dodge 2011), including: GPS in vehicles and on people Smart tickets that are used to trace passenger travel RFID tags attached to objects and people Sensed data generated by a variety of sensors and actuators embedded into the objects or environments that regularly communicate their measurements Capture systems in which the means of performing tasks captures data about those tasks Digital devices that record and communicate the history of their own use Digital traces left through purchase of goods and related demand supply situations Transactions and interactions across digital networks that not only transfer information, but also generate data about the transactions and interactions themselves Clickstream data that record how people navigate through websites or apps Automatic meter reading (AMR) that communicates utility usage on a continuous basis Automated monitoring of public services provision The scanning of machine-readable objects such as travel passes, passports, or barcodes on parcels that register payment and movement through a system Machine to machine interactions across the IoT Uniquely indexical objects and machines that conduct automatic work as part of the IoT, communicating about their use and traceability if they are mobile (automatic doors, lighting and heating systems, washing machines, security alarms, wifi router boxes, etc.) Transponders that monitor throughput at toll-booths, measuring vehicle flow along a road or the number of empty spaces in a car park, and track the progress of buses and trains along a route.
In the domain of urbanism, these categories of digital instrumentation provide abundant, systematic, dynamic, varied, well-defined, resolute, relatively cheap data about urban processes and activities, allowing for real-time analytics and adaptive forms of planning and management (Bibri 2020a). They can continually send data to an array of control and management systems that can process and respond in real time to the data flow.
However, the various sensor recording parameters, their length as to the collected data, where they are located, what kinds of sensors are embedded in which environments, their settings and calibration, their integration and fusion, and their exhaustiveness as technical configurations and deployments all determine the nature of the data to be generated and the way they are stored, managed, processed, analyzed, and disciplined. Regardless, the trend of embedding more and more of the IoT sensors into smart sustainable cities will undoubtedly continue and even escalate for the purpose of providing the most suitable tools for measuring urban parameters and new techniques and platforms for data processing and analytics. Especially, this form of ICT of pervasive computing has an instrumental and shaping role in not only monitoring, understanding, and analyzing smart sustainable cities, but also in improving sustainability, efficiency, resilience, and the quality of life of their citizens.
The automated approach is associated with various automatic functions of the devices and systems that are widely deployed across urban environments. Therefore, it has recently captured the imagination of those concerned with understanding, operating, managing, and planning urban systems, in particular in relation to environmental sustainability, especially within the framework of the IoT. Purposely sensed data reflect the power of ubiquitous sensors that can be deployed ad hoc in public and private spaces to better understand some aspects of urbanity and urban dynamics. Indeed, there has been increased interest in the IoT and especially its sensor network with respect to monitoring the operation and condition of urban and public infrastructure, such as energy systems, power grid systems, and environmental and green conditions. By its nature, the IoT involves different types of things (Bibri 2020a): Tagging things, i.e., radio frequency identification (RFID) and near field communication (NFC) tags are attached to everyday objects and people Sensing things, i.e., sensors act as devices to collect the data from the physical world and transmit them to the virtual world Thinking things, i.e., smart things process information, make independent decisions, self-configure, self-regulate, and self-repair Miniaturized things, i.e., sensing and computing devices based on micro-electromechanical systems (MMES) or nano-electro-mechanical systems (NMES). These are so small to be virtually invisible, embedded in everyday objects to enable them to interact and connect within the smart things thanks to micro-engineering and nanotechnology.
The IoT involves all kinds of objects, including individuals, road traffic, parking, public transit, street lighting, buildings, water systems, energy systems, distribution networks, vehicles, appliances, and air. These objects entail devices with intelligence, communication, sensory, and actuation capabilities related to such applications as machine-to-machine, vehicle-to-vehicle, and people-to-things applications. In short, the IoT encompasses sensor and actuator technologies, wireless technologies, and smart things.

Big data analytics as a holistic system
The pursuit of mastering the complexity of the data mining (also referred to as knowledge discovery) process for smart sustainable cities on the basis of the IoT requires building an entirely new holistic system for big data analytics based on linking the built environment (including, forms, energy system, water system, waste system, etc.) and the infrastructure passing into and out of urban areas (i.e. transportation systems, communication systems, and distribution networks) to its operational functioning, management, and planning. This is necessary for facilitating the implementation of urban intelligence and planning functions directed towards advancing and maintaining the contribution of smart sustainable cities to environmental sustainability through continuously optimizing and enhancing the operations, functions, services, designs, strategies, and policies associated with energy as an urban system and domain.
The entire analytical process able to create the needed knowledge services for enhanced decision-making and deep insights should be expressible within systems which support the following (Bibri 2020a; Bibri and Krogstie 2020c): The acquisition of data from multiple distributed sources, mainly automatically and routinely sensed data The management of data streams The integration of heterogeneous data into a coherent database The transformation and preparation of data The distribution of data mining and network analytics The organization of the extracted models and patterns The formation of patterns and models The evaluation of the quality of the extracted models and patterns The visualization and exploration of the behavioral patterns and models The building of simulation and prediction methods on top of the mined patterns and models The deployment of the obtained results for intelligent decision supports Accordingly, the urban data are processed using various analytic tools (see, e.g., Bibri and Krogstie 2017c; Yaqoob et al. 2016). Figure 1 illustrates the process of data collection, monitoring, and analytics in the IoT within smart cities.
The core enabling technologies of ubiquitous computing and the big data ecosystem Big data trends are associated with the IoT as a form of ubiquitous computing, which involves myriads of networked sensors that pervade urban environments on a massive scale. Accordingly, the nature of data generated is very complex and intricate, so is the big data ecosystem, a collection of infrastructure and tools, specialized analytics techniques, and applications used to capture, process, analyze, and visualize data. The soaring amount of urban data is due to a number of the core enabling technologies of ICT of ubiquitous computing (e.g., the IoT). These are being fast embedded into the very fabric of those cities that are badging or regenerating themselves as smart sustainable, whether smart cities or sustainable cities, to pave the way for adopting the upcoming innovative solutions to overcome the challenges of sustainability in the years ahead (Bibri 2019c). Furthermore, as with many domains to which big data analytics can be applied, smart sustainable cities require the big data ecosystem to be put in place as part of their ICT architecture in terms of the underlying core enabling technologies prior to adopting the kind of data-driven decisions and applications that support the goals of sustainable development, e.g., SDG 7. As a scientific and technological area, the core enabling technologies underlying the functioning of big data ecosystem associated with the IoT are under vigorous investigation in both academic circles and the ICT industry towards the development of digitally instrumented and computationally augmented urban environments that constitute the informational landscape of the emerging data-driven smart sustainable city (Bibri 2020a).
Generally, the big data ecosystem involves multivarious technologies in terms of quality and form, which allow to draw meaningful insights out of the large masses of available urban data. In the sphere of smart sustainable cities, the big data landscape is daunting, and there obviously is no one big data ecosystem or single go-to solution. There are a number of permutations of the core enabling technologies of ICT of pervasive computing (Bibri 2015a, b), which tend to be, in the context of big data analytics, shaped by the scale and complexity of the applied solutions developed and implemented in city domains. Bibri and Krogstie (2017c) provide a comprehensive state-ofthe-art review of the core enabling technologies of big data analytics in relation to smart sustainable cities, including a synthesis of the key computational and analytical techniques, processes, and models associated with the functioning of the big data ecosystem. The components addressed by the authors in rather more detail include, but are not limited to: Pervasive sensing in terms of collecting and measuring urban data Data processing platforms Advanced techniques and algorithms Cloud and fog/edge computing models Smart network infrastructure Wireless communication networks While there are some permutations that may apply to most city systems, there are some technical aspects and details that remain specific to smart sustainable cities. Regardless, it is necessary to take into account flexible design, quick deployment, extensible implementation, comprehensive interconnections, and advanced intelligence. Moreover, most of the permutations involve sensing technologies, data processing platforms, computing infrastructures, and wireless communication and networking technologies. These are intended to provide a full analytic system of big data analytics and its functional applications based on advanced decision support systems-e.g. urban intelligence functions and the associated simulations models and optimization and prediction methods. On this note, Batty et al. (2012) state that much of the focus on smart cities of the future, "will be in evolving new models of the city in its various domains that pertain to new kinds of data and movements and actions that are largely operated over digital networks … Very clear conceptions of how these models might be used to inform planning at different scales and very different time periods are critical to this focus … Quite new forms of integrated and coordinated decision support systems will be forthcoming from research on smart cities of the future."

Big data analytics solutions
There are different taxonomies of big data analytics in terms of the underlying components for the IoT. Ahmed et al. (2017) provide a thematic taxonomy of big data analytics solutions designed for the IoT systems (see Fig. 2). These solutions are categorized based on five attributes, namely big data sources, system components, big data enabling technologies, functional elements, and analytics types.
The common types of big data analytics (in addition to diagnostic) associated with the domain of smart sustainable urbanism are applied to generate a number of new urban intelligence functions, which are intended to be woven into the Fig. 2 A taxonomy of big data analytics solutions for the IoT systems. Source: Ahmed et al. (2017) fabric of existing civic institutions whose mandate is advancing sustainability, optimizing efficiency, strengthening resilience, and enhancing the quality of life for citizenry (Bibri 2020a).

Cloud computing for the IoT and big data analytics
The fundamental objective of the IoT is to obtain and analyze data from physical assets or things that were previously disconnected from most data processing platforms. The IoT is about connecting the unconnected devices and things and sending the collected data from these connected objects to the cloud. In the IoT cloud architecture, all these data are transferred to the cloud for storage and computation. Thus, the IoT can be seen as a vast network of Cloud connected devices generating colossal amounts of data to be stored, processed, and analyzed. Big data are usually discussed with respect to cloud computing due to the fact that the latter theoretically provides infinite amounts of storage and computational resources. It is said that the Cloud has been one of the biggest disruptions of big data by separating storage and computation, by making it easy to scale and tune servers, and by bringing huge cost savings in processing data engineering pipelines at scale. Cloud computing denotes a computing model in which standardized, scalable, and flexible ICT-enabled capabilities are delivered in real-time over the cloud to external users via the Internet in the form of three types of services: (1) Software-as-a-Service (SaaS), (2) Platform-as-a-Service (PaaS), and (3) Infrastructure-as-a-Service (IaaS). SaaS denotes the provider's software applications, PaaS entails the provider's software development platforms, and IaaS means virtual servers, storage facilities, processors, and networks as resources. Therefore, cloud computing consists of several components, which can be rapidly provisioned with minimal management effort. Having attracted attention and gained popularity worldwide, cloud computing is becoming increasingly a key component of the ICT infrastructure of both smart cities and sustainable cities as an extension of distributed and grid computing due to the prevalence of sensor technologies, data processing platforms, pervasive computing infrastructures, and wireless communication networks. Especially, these core enabling technologies of ubiquitous computing have become technically mature and financially affordable by cloud providers. By commoditizing services, coupled with low cost open source software and geographic distribution, cloud computing is becoming increasingly an attractive option in the realm of smart cities and sustainable cities.
Cloud computing is increasingly seen as the most suitable solution for highly resource intensive and collaborative applications as an on-demand network access to a shared pool of computing resources (memory capacity, energy, computational power, network bandwidth, interactivity, etc.). This implies that computer-processing resources, which reside in the cloud, are virtualized and dynamic, and that only display devices for information and services need to be physically present with respect to various urban domains where many diverse actors from the different city departments can make use of software applications and services for the purpose of optimizing and enhancing urban operations, functions, designs, and strategies in line with the fundamental goals of sustainable development. Moreover, cloud computing performs service-oriented computing. As such, it can rapidly process large and complex data produced from urban activities and simultaneously serve citizens, e.g., utilities, providing a kind of an integrated and specialized center for information services to the general public. With reference to smart sustainable cities, cloud computing has the ability to run smart applications on many connected computers and smartphones at the same time in connection with sustainability, efficiency, and the quality of life (Bibri 2020a).
Overall, the key advantages provided by cloud computing include cost reduction, location and device independence, virtualization, scalability, performance, reliability, maintenance, as well as multi-tenancy (sharing of costs across a large pool of cloud provider's clients). Therefore, opting for cloud computing to perform big data analytics in the realm of smart sustainable cities (see Bibri 2018a, b for illustrative examples of the application of cloud computing in this regard) remains thus far the most suitable option for the operation of infrastructures, applications, and services whose functioning is dependent upon to what extent urban systems are integrated, urban domains are coordinated, urban networks are coupled, and whether they are scalable as to maximizing the benefits of sustainability.
Big data analytics can be performed in the Cloud. This involves both big data Platform as a Service (PaaS) and Infrastructure as a Service (IaaS). In line with the definition of cloud computing, there are three main elements of big data cloud (see Fig. 3). Konugurthi et al. (2016) describe these three components in more detail. A summary of this description is presented below: 1. Big Data Infrastructure Services (BDIS): This layer offers core services, such as compute, storage, and data services for big data computing, namely basic storage Fig. 3 Big data cloud components. Konugurthi et al. (2016) service, data organization and access service, and processing service. The elements of BDIS are: computing clouds, storage clouds, and data clouds. 2. Big Data Platform Services (BDPS): This layer offers schedulers, query mechanisms for data retrieval, and data-intensive programming models to address several big data analytic problems. 3. Big Data Analytics Services (BDAS): This layer offers big data analytics as a set of services over big data-cloud infrastructure.
Using a thematic analysis, Bibri (2020a) offers an integrated framework for datadriven smart sustainable cities (see Fig. 4), which is intended to illustrate how the informational landscape of smart cities as based on the IoT and big data technologies could augment the physical landscape of sustainable cities in ways that can enhance their performance on the basis of data-driven smart applications. This framework encompasses the key urban systems and domains that are shaped and influenced by the design principles and strategies of compact cities and eco-cities as the most prevalent models of sustainable cities. The data flow from these systems and domains as a result of the digital instrumentation enabled by the IoT in terms of the networked sensor devices that are embedded and deployed across urban environments. The IoT-sensor network is in turn connected with cloud-computing infrastructure. Therefore, the data flows are to be stored, managed, processed, and analyzed based on cloud computing solutions. The analytical outcome resulting from these computational processes targets optimization and intelligent decision support pertaining to operations, functions, services, strategies, and policies in relevance to sustainability. One of the essential strands of this framework is the use of the IoT and big data technologies and their novel applications to solve the problems and challenges of environmental sustainability.

Fog computing
Due to the recent advances and cost reduction in sensing technology, sensing is projected to be ubiquitous and thus its capabilities to be integrated into everyday objects around us. Evolving into more sophisticated network of sensors and physical objects spanning nearly all aspects of life, the IoT connects billions of devices and smart things to the Internet. These objects are expected to produce enormous amounts of data and transfer them to the cloud for further processing and analysis, particularly in relation to knowledge discovery, for decision making purposes. However, heavily depending on cloud computing is associated with downsides, notably inefficient computation and communication. Therefore, the fog computing model has been proposed to address the weaknesses inherited by the cloud computing model and to maximize its benefits in regard to managing and manipulating data. More and more industrial IoT platform developers, such as Cisco, IBM, and Microsoft, are moving toward utilizing fog gateway devices to perform edge analytics.
Fog computing (Bonomi et al. 2012) or fog networking (also known as fogging) is a new network architecture that uses edge devices to locally carry out the operations of storage, computation, communication, and networking. Specifically, it is "an architecture that uses one or a collaborative multitude of end-user clients or near-user edge devices to carry out a substantial amount of storage (rather than stored primarily in cloud Fig. 4 A framework for data-driven smart sustainable cities Source: Adapted from Bibri (2020a) data centers); communication (rather than routed over the internet backbone); and control, configuration, measurement and management (rather than controlled primarily by network gateways …" (Chiang 2015, cited in Perera et al. 2017 3) It facilitates the operations of these services between end devices and cloud computing data centers, and distributes the related resources on or close to the devices in the control of endusers (Zhang 2016;Ostberg et al. 2017), thereby ensuring minimal latency for timesensitive operations. End devices provide the channel over which the network messages travel. They originate the data that flows through the network. Network switches, routers, and other equipment work in between to enable messages to travel from one end device to the other. These intermediary devices usually direct data over alternate paths in the event of link failures and filter the flow of data to enhance security. However, the fog computing model has been developed due to several reasons, including: To respond to the sheer, monumental increase of data bandwidth required by the end devices underpining the IoT. The high costs and resource wastage associated with the transfer of all the data captured all the time to the cloud in terms of not only bandwidth, but also storage, latency, network, energy consumption for communication, and so on. The constant stream of the data generated has to be validated, processed, and analyzed in real time. Data validation needs to take place closer to the requester. Fog computing can crunch through data at a faster pace or more efficiently compared to cloud computing. It allows disconnected validation of data, a feature which lowers bandwidth costs as it helps reduce the total amount of end to end bandwidth needed. The IoT requires processing the generated data much closer to the source in real time to minimize network latency as well as to increase service quality. Fog computing handles everything at leaf nodes or at the edges of a network, i.e., edge analytics performed locally. With ubiquitous sensing, certain types of data raise security issues in cloud computing as they are sensitive and risky and may be subject to malicious attacks. This poses serious concerns and may trigger cascading effects in database systems.
One of the recent studies on fog computing conducted by Qasem et al. (2020) proposes a smart city based on the concept of fog computing with flexible hierarchy, a design which is intended to overcome the limitations of previous approaches, notably cloud computing, autonomic network architecture, and ubiquitous network architecture. According to the authors, the proposed approach achieves a reduction of the latency of data processing and transmission with enabled real-time applications, allows collaborative data exchange among smart city applications, and distributes the processing tasks over edge devices in order to reduce the cost of data processing. However, while fog computing model has emerged to overcome the shortcomings associated with cloud computing model by pushing data processing and analysis to the edges of a network, both models need to be used when developing the IoT infrastructure for smart sustainable cities (Bibri 2018b) due to their strengths and weaknesses. Perera et al. (2017) provide a comprehensive review of the existing approaches proposed to tackle the challenges of fog computing. Based on this review, the authors identify several major functionalities that should be supported by an ideal fog computing platform, as well as a number of open challenges toward implementing it. They also shed light on future research directions with respect to realizing fog computing for building smart sustainable cities on top of the IoT infrastructure. In relevance to this paper, the authors present an example of future smart power grid (Fig. 5), where fog/cloud computing can play a significant role.

The IoT infrastructure
The ever-increasing big data deluge and the advancement of the IoT have played an important role in the development of smart cities and sustainable cities. This advanced technology is seen as the backbone for building smart sustainable cities of the future. The IoT infrastructure is indispensable to implement data-driven solutions within smart cities and sustainable cities so that they can advance their contribution to the goals of sustainability. An IoT-based infrastructure is necessary to fulfill the needs and visions of smart cities (e.g., Ahmed et al. 2017;Bibri 2018aBibri , 2020aHashem et al. 2016;Rathore et al. 2016) and to respond to the goals of sustainable cities (Bibri 2020a;Krogstie 2017b, 2020a). Research views the IoT as key to enabling the smart city infrastructure (e.g., Jin et al. 2014) and the sustainable city infrastructure (e.g., Bibri 2018b, 2019b). According to Sicari et al. (2015), the IoT provides a flexible infrastructure within smart cities, which is necessary due to the large number of interconnected devices. Especially, in reference to smart cities of the future, a variety of scanning technologies that range from the region to the individual citizen and to very fine scale tagging associated with the IoT are becoming significant. Furthermore, it is important for smart cities and sustainable cities to have an IoT infrastructure where end device connectivity is monitored and communication reliability is assured (Corici et al. 2016;Bibri 2018b) while ensuring that the city sub-systems are intelligent enough to communicate and work in interconnection with each other (Joseph et al. 2017). Also forming a large-scale IoT system with widely deployed devices is key to enabling the IoT services (Cheng et al. 2018) and applications (Bibri 2018b).
For a successful implementation of the IoT in both smart cities and sustainable cities, it is required to have a specific IoT infrastructure in place (Hernández-Muñoz et al. 2011;Bibri 2018b), supporting the complexity of different sensors and their networks set up in urban environments as well as simplifying the composition of interoperable services and applications. Sensor-enabled smart objects are regarded as the essential feature of the interconnected infrastructures of the future.
Several scholars are developing a smart city or sustainable city infrastructure in layers that start with data generation (e.g., Anthopoulos and Fitsilis 2010;Bibri 2018bBibri , 2019aJalali et al. 2015;Jin et al. 2014;Khan et al. 2015;Rong et al. 2014). Sensors and devices collecting data and using a dispersed network for transmission is another key part of the IoT infrastructure (e.g., Filipponi et al. 2010;Jin et al. 2014;Jalali et al. 2015;Rong et al. 2014). For example, within the framework of the development of the city Wi-Fi in Barcelona, 590 spots among them 220 in parks had been installed only until 2016, and the number is planned to increase to 1520 new spots in order to extend the Wi-Fi network to cover all buses and underground (Nikitin et al. 2016). A city Wi-Fi can have a significant impact on the communication capabilities of the sensor infrastructure and the data transfer system. However, data flows allow the formation of a layered and generic IoT infrastructure for smart cities and sustainable cities. According to Berkel et al. (2018), the baseline IoT infrastructure for smart cities consists of four layers, namely: 1. Physical layer (sensors) 2. Technology layer (data and application hosting) 3. Application layer (data processing, analysis, and interpretation) 4. Domain layer (smart service delivered after processes)

ICT architecture layers: horizontal Information systems and operations centers
Smart sustainable cities are depicted as constellations of instruments across many scales that are connected through multiple networks characterized by high penetration and speed, which provide and coordinate continuous data regarding the different aspects of urbanity in terms of the flow of decisions about the physical, spatial, environmental, economic, and social forms of the city. This digital instrumentation involves the infrastructure and devices that produce urban big data using the collective tools, processes. methods, techniques, and technologies that also transform the city into a data-driven enterprise (datafication). The generated data in turn enable real-time analysis of city life (computation), as well as provides the raw material for envisioning and enacting more sustainable, efficient, resilient, equitable, and livable cities. As such, it opens up dramatically different forms of urban management. Its essence revolves around the need to coordinate and integrate technologies that have clear synergies in their operation and need to be coupled so that many new opportunities can be realized. The digital instrumentation of the city is the domain of both small and large ICT companies that are providing the detailed hardware and software for what is called the operating system for the smart sustainable city. Examples of urban operating systems include: Cisco CityOS, Microsoft's CityNext, Urbiotica's City Operating System, IBM's Smarter City, and PlanIT's Urban Operating System.
The operating system is a key component of the ICT architecture of the smart sustainable city. In this context, both the data infrastructure and the operating system constitute what is called the horizontal information system for the city, which is a key component for performing the main functions of big data analytics. Functionally compatible horizontal information systems allow the creation of a united ecosystem for the smart sustainable city. They serve to link together diverse smart technologies and solutions to coordinate the city systems by performing the following functions (Bibri 2020a): -Providing open platforms connecting all the sensors installed in the city and the data obtained from them -Aggregating and standardizing the flows of functional and territorial data from municipal sources, systems of state control (mobility, energy, noise level, pollution level, etc.), business environment, and other state agencies (hospitals, cultural institutions, universities, etc.), as well as from various detectors and cameras for their subsequent integrated analysis and visualization in 3D format -Solving the problems of data disconnection in the city through the open operating system integrating and processing the information generated by the city -Reworking and repackaging the collected data for daily consumption by different stakeholders -Allowing the city authorities and third party users to gain access to the received data in a more structured and convenient manner for software development -Enabling comprehensive solutions to complex urban problems by integrating the self-contained and unconnected technological solutions and information systems used in different city functional departments -Improving the efficiency and performance of implemented applied technological solutions -Allowing the city authorities and other users to take decisions on the optimization of the city activities in the long and short-term.
There is a range of the ICT architectures that essentially aim to provide the appropriate infrastructure for the functioning of the loT and big data ecosystem in relation to large-scale solutions. These architectures tend to follow similar patterns in terms of their layers. According to Bibri (2020a), the design of the ICT architecture of the smart sustainable city can be based on three main layers, namely information layer, middleware layer, and application layer: 1. The information layer is based on the whole complex of data sources, data routinely generated about the city and its citizens by a range of public and private organizations. This layer collects raw data from different sources within the framework of the smart sustainable city. These sources include sensors, cameras, transponders, meters, actuators, GPS, and transduction loops monitoring various phenomena, as well as a multitude of smartphone apps and sharing economy platforms generating a range of real-time location, movement and activity data. This layer also includes technologies and solutions allowing the transfer of the collected data for their further processing and analysis. The sensor platform of this layer isolates the applications that are to be developed to exploit the information generated by the smart sustainable city. It also provides openness and interoperability. The data infrastructure standardization and data integration in a unified system significantly simplify the further usage of data. 2. The middleware layer collects raw data from the information layer and standardizes them for further processing and analysis. It provides tools for the storage, processing, and analysis of the collected data, which allow interpreting data, making forecasts on their basis, and identifying interconnection between different data ranges. This set of data analytics techniques enables to obtain the meaningful information from the resulting vast troves of real-time, fine-grained, contextual, and actionable data for numerous applications. It represents the operation system for the city, a platform that offers a comprehensive and transversal connectivity to serve citizens and other stakeholders. It is an open-code IoT platform that is accessible and open for use by third parties: to download, develop, and/or modify. 3. The application layer is the set of applications that use the meaningful information made available from the lower layers, and provides services for the smart sustainable city. It serves for the exchange of data among all the interested parties and the adoption of solutions based on the obtained data. It is based on the idea of using data to predict situations in order to make better decisions and reactions. This layer includes platforms with open data and tools of data visualization (e.g., dashboards and smart board) applied by the city administration for control over the city management system, automated systems of response to city-wide events (e.g., situation centers and control rooms), as well as a plethora of applications developed by city governments, state agencies, and other external developers.
In relation to the IoT component of the ICT infrastructure, the networked sensing devices provide abundant, systematic, dynamic, varied, resolute, relatively cheap data about the city operating and organizing processes, allowing for real-time analysis and adaptive forms of urban management. They are able to continually send information to the management systems in the city that can respond in real time to data flows and adopt solutions. This is associated with what is called urban operations centers and urban dashboards (see the Application layer). These are intended to draw together and interlink urban big data to provide an integrated view and synoptic intelligence of the city. (e..g., Bibri 2019b, 2020a; Bibri and Krogstie 2020b; Kitchin 2014Kitchin , 2015Kitchin et al. 2015;Nikitin et al. 2016). Urban operations centers are typically created to monitor the city as a whole; draws together real-time data streams from many different city agencies and departments into a single data analytical center; and then visualize and monitor the vast troves of live service data for real-time decision-making and problem solving. According to Bibri and Krogstie (2020b), the key functions of the analytical center include: -Using visualization sites to help both expert and no-expert users interpret and analyze information, and to allow citizens to monitor the city for themselves and for their own ends -Employing integrated, real-time data to track the performance of the city and to communicate the live feeds of real-time information to citizens with respect to a number of areas -Enabling automated systems to respond to citywide events by making immediate decisions pertaining to various urban areas -Overcoming urban challenges, keeping citizens up-to-date, and developing applications based on the standardized and published open data -Creating innovative platforms, promoting big data use and application, introducing data-driven technologies, and providing expert assistance

Stockholm and Barcelona: differences and commonalities
The City Stockholm has a long history of environmental work and was the first city to be granted the European Union's Green Capital award by the European Commission in 2010 due to its high environmental standards and ambitious goals for further environmental improvement (European Green Capital 2009). This includes climate change, air quality, green energy, waste and water management, wastewater treatment, sustainable land use, environmental management, and sustainable transport. The city has a longterm commitment to sustainable development and the environment. Stockholm and SRS received an award for best sustainable urban development project in the category Sustainable Communities, which was presented at the UN Climate Change Conference in Paris 2015 by the C40 Cities Climate Leadership Group, a network connecting more than 80 of the world's megacities (Stockholm City 2020). The award is proof that Stockholm is an international leader in sustainable urban development.
According to several rankings, Sweden is one of the leading countries that have the highest level of sustainable development practices (Dryzek 2005). Another recent ranking has been reported based on 2018 Environment Performance Index (EPI) data: Sweden is one of the world's leading countries in sustainability and has an overall score of 80.51 in terms of environmental friendliness (Buder 2019). Sweden and the rest of the Nordic countries have a comparatively low impact in terms of CO2 emissions (Norden 2008). In fact, several empirical studies identify from the mid-1980s onward an increasing ecological disruption in most of the ecologically advanced nations, such as Sweden, Denmark, Germany, and the Netherlands (Mol 2000).
Stockholm is at the forefront of ecological/environmental thinking. It has very strong environmental policies and is focused on improving the quality of life of its citizens (Lindström and Eriksson 1993;Stockholm City 2018) with support of advanced technologies (Bibri 2020a;Evertzen et al. 2018). According to the City of Stockholm, an IoT-based infrastructure is highly important for, and the backbone for building, smart sustainable cities nowadays (Bibri and Krogstie 2020a). As stated by Johansson (2018), a project leader, "the reason we are establishing this is because we have a lot of challenges. We know that using the smart technologies can help us to be a better city, for the people that live there, work there and even the people that are visiting us." He also stated that the environmental department in the city is active with smart technologies. During the period 2015-2016, an ICT network was established in the City of Stockholm to find a more comprehensive way of using ICT, and the digital development department of the city was established with a much broader take on ICT (Kramers et al. 2016). The city has recently taken concrete actions for using data-driven technologies to reach its environmental targets by 2040, in particular in relation to the initiatives of its sustainable urban districts (Bibri and Krogstie 2020a).
In recent years, much of the environmental work within Stockholm has focused on developing new sustainable urban districts. One recent initiative is the Stockholm Royal Seaport (SRS) district, whose vision is to become a "world class environmental city district" (Stockholm City 2010). SRS is designated as an environmental profile area with the mandate to become a model of sustainable urban development (Stockholm City 2020). The vision of SRS relates to the overall goal established by the City of Stockholm to be fossil fuel-free by 2050 (Stockholm City 2009. In this respect, SRS environmental profile should consolidate Stockholm's position as a leading capital in climate work and contribute to the development of new technologies (Bibri 2020a, b). The smart eco-city district of SRS starts with a common vision in smart planning on the basis of the IoT technology (The Nordics 2017).
The City of Barcelona started to develop its smart city scenario during the period 2007-2012, leveraging its telecommunications network. In 2011, it became one of the first European cities to implement data-driven smart technologies to improve its services. It invested heavily in its ICT infrastructure, including an extensive IoT sensor network collecting data on many urban systems and domains. It has brought the IoT to life (Adler 2018). Confidence in advanced ICT as a tool for supporting urban development was extremely widespread within the Municipality of Barcelona before 2011. Implemented in Barcelona is a broad range of applied technological solutions based on the analysis of the data generated by a variety of sources, with the aim to improve the quality of life of citizens. Barcelona created a new model for the management of services, relationships, and interactions with citizens based on e-government and developed different pilot projects by both the private municipal company 22@ Barcelona and the Municipal Institute of Information Technology (Mora and Bolici 2016;Noori et al. 2020). In addition, the Barcelona City Council and Municipal Institute of Informatics jointly cooperated in 2012 to set the basics of an architecture defining the strategies and policies allowing Barcelona to become a Smart City. According to Sinaeepourfard et al. (2016), the Barcelona Smart City ICT architecture has been designed with three main layers, namely the Information Sources layer, the Middleware layer, and the Smart City Applications layer (see Fig. 6).
The Information Sources (IS) layer aims to collect raw data from the Smart City's different sources. The Middleware layer collects raw data from the IS layer, and provides some processing and analysis procedures to obtain the meaningful information as feeds for abundant applications. The Smart City Application layer is the set of applications that use the required meaningful information from low level layers and provides services in connection with the city management.
In 2015, Barcelona took the initiative of the smart city in a new direction by setting the goal of democratizing its ICT infrastructure, with a vision of developing it by and for the people (Bibri 2020a). The aim of the city is to exploit digitization and achieve a city that is more open, fair, circular and democratic by putting technology at the service of people.
Moreover, the City of Barcelona is mostly reputed for using data-driven technological solutions in urban operational functioning and management, and what this entails in terms of competences, infrastructure, and data sources (e.g., Bibri 2020a; Nikitin et al. 2016;Sinaeepourfard et al. 2016). The smart city strategy has been properly included in the strategic framework of the City of Barcelona in line with the objectives, priorities, and directives that characterize it (Mora and Bolici 2016). The attempt to transform the city into a smart city has been translated into a series of endeavors and initiatives managed by various executive units of the city administration. This has been supported by establishing a number of projects, constructing the public Wi-Fi network, and implementing several planning measures to modernize the city's ICT infrastructure and to strengthen its readiness to apply data-driven smart solutions for supporting sustainable development and the environment (Bibri and Krogstie 2020b). Barcelona is building one operating system that would run the entire city on a single interface, and aims, in pursuing such technology-driven upgrades, to serve as a model for other cities in technology-led urban transformation and management (Eden Strategy Institute 2018). According to Cisco's estimates, Barcelona's current smart city investments should return a cumulative economic benefits of USD 970 million by 2026 (Bibri 2020a). In addition, the city has a strong commitment to becoming a show-case for the rest of the world in sustainable urban development (Mora and Bolici 2016). One of the strategies of the Municipal Action Program is called "urban renewal" and is associated with a precise strategic commitment to transform "Barcelona into a sustainable, smart urban model at the service of its residents" (Mora and Bolici 2016, p. 3).

Data-driven solutions for energy efficiency and pollution reduction
Both smart cities and sustainable cities (notably eco-cities) are increasingly embracing data-driven technologies and their novel applications in the area of energy and environment. This is due to the high potential opportunities being offered by the IoT and big data analytics for advancing environmental sustainability. There is a huge range of the IoT-enabled data-driven applications that are compatible with the goals of environmental sustainability in the context of smart sustainable cities, spanning diverse urban systems and domains.

Smart grids and smart meters
Both smart cities and sustainable cities are increasingly investing in and implementing smart meters, sensor networks, automated control systems, and cyber-physical systems in the area of smart energy within the framework of the IoT. The main players in this area are smart power grid and advanced metering infrastructure (AMI), Smart power grid denotes a set of software, hardware, and network tools that enable generators to route power more efficiently to consumers, reducing the need for excess capacity and allowing two-way, real-time information exchange with users and consumers for realtime demand side management. It integrates and coordinates renewable energy production and consumption and power facilities through enabling technologies, energy services, and active users. AMI is a composite technology which consists of solid-state meters capable of remotely providing electricity use detail to utility companies, a twoway communication channel, and a meter data repository and management.
Stockholm Stockholm argues that climate-adapted solutions will minimize energy use (Stockholm City 2009). In this respect, the city aims to use digitalization and new technologies to make it easier for residents and businesses to reduce energy consumption and carbon footprint and thus become environmentally friendly (Stockholm City 2017). As stated in the Master Plan for Stockholm, Stockholm's eco-development SRS is currently trialling smart electricity grids (and integration of district heating with lowenergy housing) (Stockholm City 2018). The Smart Eco-city District of SRS has implemented a large-scale smart grid system, which comprises the following 7 components (Bibri 2020a, b): 1. Smart homes/buildings and demand response 2. Distributed energy systems 3. Integration and use of electric vehicles 4. Energy storage for customers and the grid 5. Smart electrified harbor 6. Smart primary substations 7. Smart grid lab (part of an innovation center) (2011)  SRS aims to take the lead in realizing the latest innovations within smart and green technologies. In particular, it affords great opportunities for climate-adapted and future-oriented development, from pioneering energy-efficient technical solutions in building and infrastructure to the development of smart electricity networks that enable local production and distribution of electricity (Stockholm City 2009). As to the local production, the municipality set these energy requirements on urban developers: 55 kWh per m2 x year and 30% locally produced electricity by renewables (see Fig. 7). Both requirements are associated with the energy goals set by SRS (Stockholm City 2009, most of which are relevant to this study as presented in Table 2. Opportunities for the local energy production should be promoted in urban development, and for maintenance reasons, passive solutions should be given priority over more technology-heavy alternatives (Stockholm City 2018).

Brandt and Nordström
The IoT allows for observing energy consumption and monitoring GHG emissions in real-time across several spatial and temporal scales so to curb energy usage and reduce  • Locally produced solar energy-electricity by renewables.
• Smart grids for electricity (and heat).
• Energy quality hierarchy (using high energy quality only when needed).
• Low level of energy use concerning products and systems.
• Low level of energy use concerning systems • Measuring energy usage in all households/buildings Source: Adapted from Bibri and Krogstie (2020a) GHG emissions. This entails that the smart grid system collects the data from diverse power sources and then process and analyze them in real-time for decision-making by transmitting relevant information for process control to improve the performance of the power grid. This involves using AMI, which includes sensors placed on consumers access points and on production, transmission, and distribution systems, as well as remote controls and communication technologies within electricity networks (Fig. 8). In other words, the operation of the smart grid system involves ICT system integration, data, and back office, which allow the integration of front-end engineering, middleware, and computing systems, as well as data collection and decision analytics.
Number 1 in Fig. 8 represents the customer application support in terms of in-home display with real-time usage and pricing statistics, usage aware appliances, and home automation. These pertain to the data-driven smart applications associated with demand side management, which allow: Users to manage their usage based on what they actually need and afford by having access to live energy prices and adjusting their usage accordingly; Self-optimizing and -controlling energy consumption through integrating sensing and actuation systems in different kinds of appliances and devices for balancing power generation and usage; Users to remotely control their home appliances and devices based on the IoT by means of such advanced functions as scheduling, programming, and adapting to different contextual situations; and Providing insights into how the energy flows can be influenced by the user behavior thanks to the in-house sensors that can provide data on energy-using appliances.
At the technical level, as illustrated in Fig. 8 under number 2, the smart meters record information on the consumption of electric energy, electric current, voltage levels, and power factor in near real-time. And they communicate this information to the consumer for the greater clarity of the consumption behavior, as well as to the energy supplier for system monitoring and customer billing. AMI enables a two-way digital communication between the meter and the central system supported by computer processing technologies, has the ability to report usages by time and outages in real-time, reduce load, disconnect-reconnect remotely, interface to water meters, and improve operation for distribution companies. In relation to the first bullet point stated above, for example, utilities have the ability to collect a significant amount of "siloes" data as part Fig. 8 Data-driven smart energy solutions in SRS. Source: Bibri (2020b) of their activities through the implementation of AMI technologies. These can provide instantaneous individual and aggregated information on energy flows for households, and be used to impose caps on consumption and also enact various revenue models at the request of the consumer to control costs. This involves the use of pricing plans in accordance with energy demand and supply models. Smart metering is also key to avoiding the expensive and carbon-intensive peaks in power grid, using new ways of coordination as to the overall ensemble of consumers; it provide new means for aggregating real-time data on energy consumption and defining dynamic prices schemes (Bibri 2020b).
In addition, number 3 in Fig. 8 is associated with the grid applications drive: automation of the grid, reduction in losses, remote monitoring, and more accurate balancing. These pertain to the data-driven smart applications concerned with power supply management handled by the smart grid system, which include: Optimizing power distributed networks associated with energy demand/supply Monitoring and analyzing energy consumption and GHG emissions levels in real time across several spatial scales and over different temporal scales Enhancing the performance of the central power system Managing distribution automation devices to improve the reliability, stability, and resilience of power production and distribution Enabling energy systems to gather and act on (near) real-time data on power consumption, generation, and inefficiency from end-user connections (information about producers and consumers' behavior) Avoiding potential power outages resulting from high demand on energy using dynamic pricing models for power usage by increasing charges during peak times to smooth out peaks and applying lower charges during normal times. Avoiding the expensive and carbon-intensive peaks in the power grid using new ways of coordination with regard to the overall ensemble of users and consumers Supporting decision-making pertaining to the generation and supply of power in line with the actual demand of citizens and other consumers to optimize energy efficiency and thus achieve energy savings.
As illustrated in Fig. 8, the communication from the meter to the network operator is wireless. Wireless communication options are in fact of common use in this regard, and include, but are not limited to:

Wi-Fi (readily available) Wireless ad hoc networks over Wi-Fi Wi-SUN (Smart Utility Networks) Wireless mesh networks
Worth noting is that wireless communication is of paramount to the functioning of the IoT and the spread of its data-driven applications across the city, beyond the domain of energy. A most popular form of government-sponsored Internet access is seen in the form of public Wi-Fi spanning different city districts in Stockholm as well as Barcelona.
Number 4 in Fig. 8 is associated with integrated renewables and distributed energy. This facilitates the integration of back-up generators, storage, and distributed solar, as well as disconnection in case of network overload (Bibri 2020b). In terms of the distributed solar and wind stations, the use of these applications are intended to improve coordination and planning around power generation from renewable plants depending on the wind or sun. Quire good estimations of power generation from wind, solar panels, and photovoltaic plants can be made a few days in advance thanks to the weather forecast. It is well conceivable, for instance, to offer a better price for electricity on a windy or sunny day and thus create an incentive to use this carbon neutral energy at a certain time.
Stockholm strongly advocates renewable energy generation in order for SRS to become fossil fuel-free by 2030. The future energy system in SRS is intended to be based on renewable sources. This is very crucial for the district to fulfil the ambition of becoming environmentally sustainable (City of Stockholm 2010). Every part of the district that is affected by the energy system, e.g., buildings, infrastructures, and systems, must be highly effective and efficient in order for the district to become climate-positive district, especially SRS is part of the Clinton Climate Initiate (City of Stockholm 2010).

Smart buildings
The building management system (BMS) is an overarching computer-based control system (an intelligent distributed network of electronic devices and systems) that is responsible for the automatic regulation, control, and monitoring of the building or facility's mechanical and electrical subsystems, such as heating, ventilation, air conditioning (HVAC), lighting, power systems, and security systems. These technical processes are primarily intended to maintain predefined parameters (or set points) and the control of their functionality. The BMS uses smart metering and advanced visualization tools to provide real-time monitoring and continuously gather the data on what is taking place in a building and how its equipment is operating and feeding these data into a control system to improve energy efficiency. So, the collected data can be used to identify additional opportunities for improvements.
Smart eco-cities are making substantial efforts towards meeting their climate change commitments and thus achieving their environmental targets-with support of datadriven smart technologies and solutions-in response to their national and local policies. Applied in Stockholm, in addition to existing and newly constructed smart buildings, is a novel data-driven smart approach to strategic planning of building energy retrofitting, which is based on the urban building energy model (UBEM), using data about actual building heat energy consumption, energy performance certificates, and reference databases (Pasichnyi et al. 2019). This approach allows a holistic city-level analysis of retrofitting strategies thanks to the aggregated projections of the energy performance of each building, such as energy saving, emissions reduction, and required social investment. Three retrofitting packages: (1) heat recovery ventilation, (2) energyefficient windows, and (3) a combination of these, are considered for the multi-family residential buildings constructed between 1946 and 1975. The identified potential lies in decreasing heat demand by 334 GWh (18%) and consequent emissions reduction by 19.6 kt-CO2 per year in the City of Stockholm, which demonstrates the potential of rich urban energy datasets and data science techniques for better decision making and strategic planning. The proposed approach allows the change in total energy demand from large-scale retrofitting to be assessed, and explores its impact on the supply side, thereby enabling more precisely targeted and better coordinated energy efficiency programs. Prior to this study, Shahrokni et al. (2014b) evaluate the energy efficiency potential of different building vintages in the City of Stockholm in collaboration with the district heating and electricity utility Fortum. The authors found that the retrofitting potential of the building stock to current building codes can reduce heating energy use by 1/3. In terms of market segmentation, the greatest reduction potential in total energy was found to be for the buildings constructed between 1946 and 1975 due to their poor energy performance.
Limiting or alleviating pollution levels requires a substantial decrease in the average carbon intensity of buildings. This in turn requires using decision-support systems that enable largescale energy efficiency improvements in the existing building stock. Among the common hurdles preventing the widespread adoption of energy efficiency measures in buildings are: poor design of buildings, which makes it difficult to implement BMS and to apply common standards for efficiency and operation; lack of incentives or funding schemes for architects, builders, and developers to invest in smart building technology; and reluctance of building owners to accept too much built-in automation. The most effective approach to overcome these hurdles and thus realize the full potential of advanced ICT is to design innovative policies, including developing strong frameworks to encourage consumers to adopt these technologies, providing incentives for consumers or other types of intervention, and raising awareness of the benefits of ICTbased climate solutions.
Barcelona As part of the new study: Smart Cities: Strategies and Forecasts in Energy, Transport and Lighting 2017-2022, Juniper (2020 analyzed five global cities to assess their performance and approach towards energy consumption and delivery, and one of their conclusion is that smart meter roll-outs, as well as several smart grid, such as the GrowSmarter initiative, are being deployed to deliver low-to zero-emissions zones in Barcelona. With the roll-out of smart metering devices and novel software applications, the IoT has made it possible to reorganize and coordinate demand and supply, using new pricing and billing mechanisms, based on the energy market and production (Bibri 2018b). Additionally, however, the MONICA project develops a system capable of precisely establishing the status of the distribution grid in real time and at any given moment (Status Estimator), which provides real and immediate information about the impact on the quality and safety of the supply (Nikitin et al. 2016). This project deploys an entire network of medium and low voltage sensors that record measurements for all the electrical variables needed to be entered in the grid's new Status Estimator. This receives the collected data in real time via the deployed sensors and the existing smart meters diagnosing the different problems on the grid in order to prevent or improve them, as applicable. As regards BMS, one of the main categories of energy monitoring management system in Barcelona is installed in municipal buildings, where sensors obtain information about energy consumption, such as electricity meter, electricity ambient conditions, internal ambient conditions, and temperature (Sinaeepourfard et al. 2016).
Worth pointing out is that the smart meter roll-outs and several smart grid projects were developed in Barcelona and Stockholm during approximately the same period of time. Moreover, most of the data-driven smart energy solutions associated with SRS, as explained and elaborated on earlier, apply to Barcelona from a technical and operational perspective, with some key differences in the degree of the development of data-driven technologies and competencies. In particular, the sensor infrastructure is largely developed proportionally in the two cities. Barcelona has a denser network of sensors which compile data from a wide variety of sources. Also, the city must have significantly improved its public Wi-Fi network whose construction was, according to many studies (e.g., Bibri and Krogstie 2020b; Mora and Bolici 2016;Nikitin et al. 2016;Noori et al. 2020;Sinaeepourfard et al. 2016) launched during the early 2010s. A city Wi-Fi can have a significant impact on the communication capabilities of the sensor infrastructure and the data transfer system, which is of utmost importance to the operation and functioning of smart grids and AMIs, as illustrated in Fig. 8. Barcelona has declared its intentions to become the most connected city in the world and is following through on its promise by investing considerably in the IoT infrastructure and thus sensor network for the city (Eden Strategy Institute 2018). It has recently become an interesting location for Cisco to open a global innovation center for the IoE paradigm and architecture. In addition, the two cities slightly differ in the degree of their readiness as to the availability and development level of the ICT infrastructure and competencies needed to generate, transmit, process, and analyze data to extract useful knowledge for enhanced decision making and deep insights pertaining to environmental sustainability uses and applications. Barcelona has the best practices in the ICT infrastructure, especially horizontal information platforms, and in the operations centers as a data-oriented competence. It was only recently when the City of Stockholm has established a platform for data collection after realizing the importance of coordinating and orchestrating the plethora of the different systems that constitute the ICT infrastructure (Bibri 2020a). In relation to the SRS project, the City of Stockholm was still in the mid 2010s "working on securing structures and databases for collection of data that can be used to give feedback and inform inhabitants and also sort out a viable business model for the data collection unit" (Kramers et al. 2016, p. 104). Further, Barcelona and Stockholm both have these data-oriented institutional competences: educational centers and training programs, innovation and research centers, and strategic planning and policy offices (e.g., Bibri 2020a; Bibri and Krogstie 2020a, b; Mora and Bolici 2016;Nikitin et al. 2016;Noori et al. 2020;Kramers et al. 2016). Nevertheless, Stockholm has higher degree of the implementation of applied technology solutions in data-driven city management in relation to environmental sustainability compared to Barcelona: The development of applied data-driven solutions for city operational functioning and city development planning in the area of energy and the environment. The establishment of city competences with respect to environmental education, research, innovation, and strategic planning and policy.
In relation to number 4 in Fig. 8, Barcelona has invested in smart energy in terms of photovoltaic panels, thermal solar panels, and energy modernization. According to Noori et al. (2020), Barcelona Energia's energy transition model has the mission of producing a 100% certified renewable energy supply plan through smart energy (Barcelona Self-sufficient Energy Plan 2014-2024). According to de Barcelona (2018), 73 projects for installing solar energy panels in the different parts of the buildings have been established as part of the Program for Promoting Solar-Energy Generation, in addition to the 87 solar energy installations already distributed around the city, as reported by Barcelona Energia. According to Sinaeepourfard et al. (2016), energy monitoring management includes two main categories installed in municipal buildings and solar thermal installations. The data on energy consumption are obtained from the sensors installed in the municipal buildings, and the solar thermal installation aids the city in understanding the solar thermal energy produced and consumed. The number of components, frequency of measure, frequency of sending and updating information, and some other information details are presented in Table 3.
Concerning the local production of electricity by renewables, considered to be the first regulations of their kind to be enacted in Europe, Barcelona has required the use of solar water heaters by households since 2006, as well as new large buildings to produce their own domestic hot water since 2000 (Bibri and Krogstie 2020b). For a recent and detailed study on the renewables in Barcelona, the interested reader can be directed to Juniper (2020). On the whole, renewable energy systems are among the key data-driven smart solutions adopted by the City of Barcelona as to supporting its smart grid system.
In addition, Barcelona is home to one of the larger electric vehicles (EV) charging networks among the five cities analyzed by Juniper (2020). Like Stockholm, EVs are rapidly gaining mindshare among consumers in Barcelona. However, smart grid technologies that go hand-in-hand with renewables, such as solar, wind, wave, hydro and geothermal power, are required due to the energy demands of the massive adoption of EVs. This raises the question of how renewable energy should be integrated with the existing grid at scale, and therefore, storage solutions are required, so are mechanisms for decentralized energy generation, sharing, and sale. The IoT can enable new mechanisms for trade on the basis of supply and demand in the energy market. The role of policy in smart sustainable grids and buildings The vision of smart grids proposed by the two cities has triggered a broad range of research, development, and demonstration projects that aim to facilitate the development and modernization of their power grid on the basis of modern technologies. This is justified by the benefits of smart grids, which allow for monitoring, analysis, communication, and control within the energy supply chain to help optimize energy efficiency, curb energy usage conserve energy, maximize the transparency and reliability of the energy supply chain, and decrease costs. Concerning the latter, new data from Juniper Research (2020) has found that the development of smart grids will result in citizens saving $14 billion per annum in energy bills by 2022. This is up from the $3.4 billion saving estimated for 2017, resulting from smart meter rollouts, energy-saving policies, and sensing technology to improve grid reliability and efficiency.
Considering the above benefits, the development of smart grids has resulted from the emergence of new policies in Stockholm and Barcelona, which are essentially concerned with supporting projects of smart grid technologies; subsidizing projects that accelerate efficiency technology adoption; allowing decentralization of energy production; encouraging energy production from renewable sources; promoting multiplication of grid distribution networks; and subsidizing renewable energy integration in power distribution network. The successful implementation of these policies has been essential to addressing barriers to the deployment of smart grids and to meet the emerging challenges, such as climate change, energy security, equity concerns, and privacy protection. With respect to the latter, for example, Barcelona has developed three strategic initiatives related to data protection and regulation: "Data Commons Barcelona," "City Data Analytics Office," and "Decode" (the EU's scientific) project (Calzada 2018), Data Commons Barcelona offers an open-source policy toolkit regarding ethical digital standards "for cities to develop digital policies that put citizens at the center and make governments more open, transparent, and collaborative" (Ajuntament de Barcelona 2020). However, there are major barriers to the development of smart grids--see "Policy Issues in Sustainable Smart Grids" by Brown and Zhou (2013), as well as significant challenges for their implementation (Ahmadiahangar et al. 2020) that need to be addressed. It is crucial to overcome these barriers and challenges in order to develop and deploy ICT-based energy efficiency and climate solutions so as to realize full GHG emissions reductions opportunities. And policy makers need to identify more effective mechanisms to get producers and consumers to use more innovative ICT-based solutions in ways that support reductions in GHG emissions to levels that are economically, environmentally, and socially sustainable. Indeed, advanced ICT cannot act in isolation to mitigate climate change, nor can environmental practices become widespread with free will. Policy is a salient factor for any societal transition or transformation, in particular sustainability. Bibri (2019f) argues that political action is of critical importance to, if not determining in, the emergence, materialization, expansion, functioning, and evolution of data-driven smart sustainable cities as an academic discourse. In fact, this emerging paradigm of urbanismis not an element closed in the "ivory tower" of the research community, but it is influenced by the macro-political practices in connection with sustainable development. Among the common political mechanisms used in this process, which represent facets of the operations that link this discourse and political action, include: Creating regulatory and policy instruments and carrying out legislations. Assigning scholarly roles and institutional positions to particular universities and organisations, thereby authorizing them and legitimising their actions in regard to R&D activities, technology and innovation, policy recommendation, vision construction, and so on. Government involvement in projects and initiatives through funnelling investments, providing positive incentives, advocating product and service adoption, organizing forums and symposiums, encouraging national and local programs, and devising comprehensive plans.
Policy remains more important than technology to smart sustainable cities. Most of the data-driven smart solutions that are being rolled out are only plasters that fail to address the wider environmental issue of climate change. This implies that policy must be put into place to maximize the benefits of such solutions through more effective measures. Specifically, smart sustainable cities should have a set of specific policies to ensure that progress is made in any area of environmental sustainability where innovative solutions need to be implemented. With reference to SRS, the smart sustainable city "is fundamentally dependent on the initiative by and interest of other actors-that developers see it as relevant to install smart metering devices, that energy companies see it as relevant to provide information about energy use to their customers, that inhabitants see it as relevant to equip their homes with 'smart' appliances-and, moreover, that the initiatives of these actors in some way are coordinated so that they can in fact support each other. Otherwise there is a risk that technology is not implemented all the way" (Kramers et al. 2016, p. 99). Policy has a primary role in aligning and mobilizing different stakeholders in the same direction. As stated by Bibri (2019f), political processes represent the set-up under which dynamic networks of urban actors can interact within diverse urban sectors in the development, diffusion, and utilization of knowledge and technology pertaining to data-driven solutions in the context of smart sustainable urbanism.
Furthermore, to avoid the failure of the enabling potential of the IoT and big data technologies for improving energy efficiency and hence minimizing the impacts of energy consumption on the environment, it is important to strategically analyze and holistically design policies to ensure that the implementation of data-driven smart solutions make a concrete contribution to the environment. The new policies that aim to encourage or require the use of advanced ICT to mitigate climate change should be evaluated carefully in terms of their ability to absolutely reduce GHG emissions, not merely to slow down their rate of increase. Appropriate policy frameworks can provide the incentives needed to act and innovate to curb energy use and alleviate pollution levels. However, policy tools should include both incentives and prohibitions through a mixture of regulation, co-regulation and self-regulation; top-down and bottom-up approaches to policy development and implementation; and governance arrangements that engage all stakeholders in their roles as citizens and consumers.
In connection with the study conducted to evaluate the energy efficiency potential in the City of Stockholm mentioned earlier, Shahrokni et al. (2014b) found that the least energy-efficient buildings in the city are those built between 1926 and 1945 in contradiction to commonly held beliefs, and the large number of buildings constructed between 1946 and 1975 have poor energy performance. Their findings indicate the need for a shift in public policy towards the buildings with highest retrofitting potential. This applies to Barcelona as well. Indeed, to enable the full enabling potential of advanced iCT requires designing and implementing a number of policies. These include rewarding the best-in-class buildings' owners and operators; incentivizing operators to retrofit their buildings, providing funding schemes to owners to invest in BMS, subsidizing design and district development projects supporting energy efficiency technology adoption; developing energy efficiency building assessment tools; regulating the application of automation measures in the construction of buildings, developing strategic alliances between city governments and industries, and so froth.

Environmental monitoring: air and noise pollution
Stockholm According to 2018 Environment Performance Index (EPI), Sweden stood out for high scores in air quality among the world's five most environmentally friendly countries (Buder 2019). And Stockholm leads in Sweden given its progressive environmental performance and strong environmental policy. The City of Stockholm has made substantial efforts towards meeting its climate change commitments, including a GHG emission target of 3 t per capita by 2020 and making SRS a candidate of Clinton Climate Initiative's Climate Positive Program (Shahrokni et al. 2014b). SRS as a worldclass environmental city district has set three ambitious environmental goals (Stockholm City 2020): 1. To reduce CO2 emissions from 4.5 t in 2008 to a level below 1.5 t per inhabitant by 2020. 2. To be fossil fuel-free and climate + by 2030. 3. To be adapted to a changed climate, i.e., increasing precipitation.
One of the key strategies of the environmental program for SRS to achieve the aforementioned energy goals is "resource efficiency and climate responsibility" (Stockholm City 2020). The focus of this strategy is to develop SRS as a district that strives for a fossil-fuel-free and low-resource future. Energy flows are designed to minimize environmental and climate impacts. In addition, the local production of electricity through solar panels is required due to the awareness that GHG emissions in Stockholm mostly come from heating (42%) and electricity (20%) (Bibri 2020a). However, there are a number of barriers to adopting data-driven smart solutions and realizing the full opportunity of GHG emissions reductions, especially in relation to buildings.
However, the use of ICT in the SRS project pertains mainly to its role in and potential for reaching the environmental targets set by the SRS district as part of the digital city plan developed for this purpose (Bibri and Krogstie 2020a;Kramers et al. 2016). In short, it is largely associated with environmental planning. The interview showed that the database systems for collecting the environmental data on SRS were secured and used to inform the residents about different aspects of energy and GHG emissions. The strategic implementation of ICT was brought in to SRS by the environmental program for the City of Stockholm, which requires the district to be smart in the area of environmental sustainability (Bibri 2020a, b). Among the smart sustainable solutions implemented by SRS are the establishment of digitalized monitoring and feedback processes (e.g., the IoT and visualization) (The Nordics 2017). With respect to the IoT, one of Stockholm's main domains is air pollution, in addition to smart grids, smart lighting, smart traffic, and environmental policies. The small-scale tests performed within the different areas of the city to see if smart technologies work have been converted into pilot projects within these domain (Johansson 2018). With respect to air pollution, the sensors connected to the city's Wi-Fi network report in real-time the air pollution level concentrated in particular urban environments and provide real-time information about the air quality in the city. The IoT has great potential to improve air quality. This is usually achieved by deploying and setting up stations for environmental monitoring across the city, as well as mounting sensors on bike wheels and cars for measuring the air quality. The collected data can be used to make inferences about the quality of the air. Then the outcome can be transferred to the decisionmaking unit for implementing pollution preventive measures to remove different types of pollutants detrimental to public health. The air quality monitors are operated by regulatory agencies, citizens, as well as researchers to investigate the air quality and the effects of air pollution. Commonly, the interpretation and analysis of ambient air monitoring data involves a consideration of the spatial and temporal representativeness of the data gathered, and the health effects or risks associated with the exposure to the monitored levels.
Barcelona Air pollutants as atmospheric substances-especially anthropogenic-have negative impacts on the environment, as well as pose a high environmental risk to human health, so too is noise pollution, both direct and indirect. Noise pollution denotes harmful outdoor sound with road traffic being the greatest contributor. The demand for the smart systems that monitor the quality of the environment has increased due to the elevation of pollutants in the atmosphere The escalating urbanization trend leads to the environmental degradation of the air. Nevertheless, new and emerging technologies allow a real-time tracking of the various substances in the air and applying preventive measures in a timely manner. For a city to have the best air quality, it must significantly reduce GHG emissions from its energy and transport sectors, and to become zerocarbon. According to the Municipal Action Program for Barcelona, the city has to achieve a significant objective: the definition of a new development model for a healthy and hyper-connected city with zero emissions "where the environment, urban planning, and ICT infrastructures are fully integrated" and characterized by "productive neighborhoods at a human pace" (Mora and Bolici 2016, p.4). Many recent studies on Barcelona focus on the impacts of energy consumption on the environment, control over transport flows and their effects on the noise level, and car exhaust gases (Bibri and Krogstie 2020b;Nikitin et al. 2016).
In Barcelona, the solutions devised for control over air pollution entail the analysis of the data collected from sensors on the level of air pollution in the different districts of the city to alleviate it. And the solutions devised for noise pollution control involve the analysis of the data collected from sensors on the level of noise pollution for planning of work to reduce it. The environment monitoring system is based on the data automatically collected from the sensors installed across the city. It has been implemented in the framework of a pilot project, and allows users to collect data about the noise level, air pollution, temperature, and humidity by special sensors, which are transmitted via Wi-Fi network in real-time mode to social centers (Nikitin et al. 2016). The recorded data is used to analyze the effects of the measures taken or the impact of the solutions adopted to improve the environmental conditions of the city, compile further programs for environment protection, and identify the areas where further actions are to be undertaken (Bibri and Krogstie 2020b).
From a technical perspective, the Sentilo platform, as mentioned earlier, collects the city data provided by the network of sensors for city management. Up till 2016, there were almost 1800 sensors installed as part of the Sentilo platform in Barcelona, monitoring data about different areas, including noise monitoring (Sinaeepourfard et al. 2016). Noise monitoring management detects any kind of noise and acoustic pollution data using about 50 sensors deployed in the city and installed in seven different urban areas. The number of components, frequency of measure, frequency of sending and updating information, and some other information details are presented in Table 4. The smart noise control solution implemented in Barcelona enables to optimize and centralize the collection, integration, processing, and dissemination of information by the noise sensors of different suppliers and sound level meters distributed throughout the city (Bibri and Krogstie 2020b).
As stated by Sinaeepourfard et al. (2016), air monitoring is part of urban lab monitoring management, which provides a variety of services related to the air, temperature, humidity, and other transportation issues. The active sensors recording the relative and appropriate information for the services are spread in the different zones of Barcelona for obtaining the accurate data for services. Table 5 presents only the data for the air quality. The sensors provide real-time information about the air quality in the city.  However, due to the challenges of enacting environmental monitoring, the collection of information of various types about the state of the environment does not guarantee a maximized effect of the use of this information. This opens up wide prospects for further developing environmental monitoring technologies and enhancing their applications in the future. The current challenge lies in the effective integration of multiple environmental data sources originating from different environmental networks and institutions, which requires specialized observation equipment, tools, techniques, and models to establish air pollutant concentrations at different spatial and temporal scales. Among the technologies implemented in Barcelona for environmental monitoring include: Community Multiscale Air Quality (CMAQ) modeling system, Real-time Air Quality Index (AQI), NMMB/BSC-Dust Forecast OMI (Ozone Monitoring Instrument), An Artificial Neural Network (ANN) to forecast PM10 daily concentration (Nikitin et al. 2016).
Smart urban metabolism: real-time feedback on energy flows tailored to various stakeholder groups Urban metabolism (UM) as a model is used to understand the flows of the energy and materials through urban environments by facilitating their description and analysis. It provides researchers with a metaphorical framework to study the interactions of natural systems and human systems in specific districts, cities, or regions. It also provides a platform through which sustainability implications can be considered (Pincet et al. 2012). The term has been defined by Kennedy et al. (2007, p. 44) as "the total sum of the technical and socioeconomic processes that occur in cities, resulting in growth, production of energy, and elimination of waste." UM is the stocks and flows of energy and materials in cities and their relationship with urban infrastructure (Kennedy et al. 2012), However, sustainable (eco-) cities have tended to focus mainly on the underlying structure of UM-sewage, water, energy, and waste generation and management, thereby falling short in considering data-driven smart solutions Krogstie 2017a, 2019a). In fact, there are some limitations associated with the current UM framework, including high data and resource requirement, lack of follow-up and evaluation of the evolution of a city's UM, and difficulties in identifying the cause-and-effect relationships of the metabolic flows (Shahrokni et al. 2014b). Moreover, the application of this framework at the city level has been limited by the lack of data on energy and material flows at this scale (Broto et al. 2012;Kennedy et al. 2007;Weisz and Steinberger 2010), an issue which concern both production-and consumption-based approaches (Baynes and Wiedmann 2012). Therefore, the new smart urban metabolism (SUM) framework has recently gained more focus in research and practice. In the context of this paper, the SUM framework as an ICT-enabled evolution of UM has been developed to overcome those challenges as applied to the case of SRS (Shahrokni et al. 2015b). The key features of the new SUM framework are that (Shahrokni et al. 2015a, b) it is based on: the integration of high-quality (up to real-time), siloed, heterogenous data streams in urban environments; high temporal resolution in the sense of processing energy and material flows in a real-time calculation engine to provide real-time data on energy consumption, GHG emissions, water consumption, material consumption, and waste production; high spatial resolution in the sense of simultaneously providing the UM on several levels of urbanism, from the city down to the household; and the continuous illustration of energy and material flows to city officials, organizations, and citizens through real-time feedback (visualizations) tailored to each stakeholder level, from the household to the urban district.
Smart sustainable cities are increasingly utilizing urban dashboards in the operations and management tasks of their complex UM. These intelligent systems aid in monitoring the dynamics of the city, integrating numerous sensors and big data analysis technologies with the aim of optimizing the infrastructures and services of the city and maintaining its robustness. However, important to note is that the focus of this paper is on energy flows and related environmental issues. These flows, detailed in Table 6, are collected on the lowest level possible, starting at the household, then aggregated to the building level, and finally to the district level. Table 2 includes only local flows of energy related to electricity consumption, heating and cooling consumption, and on/site generation; fuel consumption; and on-side energy production as relevant to this paper. Shahrokni et al. (2015b) present the first implementation of SUM in the Smart Eco-City SRS R&D project, and further analyze some challenges and barriers to this implementation and discuss the potential long-term implications of the findings. Four key performance indicators (KPIs) are generated in real time based on the integration of heterogeneous, real-time data sources, namely: 1. Kilowatt-hours per square meter 2. Carbon dioxide equivalents per capita 3. Kilowatt-hours of primary energy per capita 4. Share of renewables percentage. These KPIs are fed back on three levels (household, building, and district) on four interfaces developed for different audiences. Table 7 provides an overview of current smart urban metabolism feedback metrics.
Speaking of performance indicators at the building and household levels, advanced ICT has made it easier to collect performance parameters from the built environment so to be able to carry out a detailed evaluation of energy consumption. Holmstedt et al. (2018) examine the potential of using dynamic and high resolution meter data for the evaluation of energy consumption in buildings and households in SRS. The novelty identified with this approach is that it can increase the level of detail in the evaluation results and ease the detection of deviations in the structures performance. However, most benefits are from the occupant perspective, as more detailed evaluation information enable better inclusion of this stakeholder group. The authors found that the commonly used indicator energy use per heated floor area remains an inadequate tool for communication when taking a holistic approach to building energy evaluation.
Furthermore, the prototype developed for SRS employs a hybrid approach to the implementation of the SUM concept, with the real-time calculation engine being able to process production and consumption data. This implementation includes three phases: (1) the aquisition of data, (2) the development of a calculation engine and data processing, and (3) the development of feedback tailored to individual stakeholder requirements. The current focus of the SRS prototype is to understand the GHG emissions resulting from the consumption of electricity, heat, water, and the production of waste in the SRS (Shahrokni et al. 2015a).
However, as with all advanced ICT-based solutions, there are several challenges, barriers, and issues that need to be addressed and overcome, just as there are opportunities that need to be embraced and explored. One of the challenging barriers identified by Shahrokni et al. (2015b) lies in accessing and integrating siloed data from the different data owners. There are some instances when some residents choose simply not to be involved in, or later opt out of, providing data due to privacy concerns. Adding to this is the technical issues related to emission factors, system boundaries, data structure, ontology, heterogeneous data, and multiple sensors tracking the same flow (Shahrokni and Brandt 2013). Also, Holmstedt et al. (2018) identify several limitations associated with using dynamic and high resolution meter data for the evaluation of energy consumption in buildings and households, namely data collection and management, preservation of personal integrity, and incentives to react to the given evaluation information. Nevertheless, the new SUM framework involves a number of long-term opportunities, including enabling a new understanding of the causalities that govern urbanism and allowing citizens and city officials to receive feedback on the consequences of their choices in a systematic way (Shahrokni et al. 2015b). Integrating and analyzing data from different city systems and domains to provide real-time feedback to such city stakeholders as planners, businesses, industries, organizations, institutions, and citizens can support decision making and generate new insights through making them aware of the effects of their actions. This is important to meet the vision of the real-time feedback as outlined in the city's sustainability program for SRS, which represents the joint collaboration effort of utilities, developers, citizens, as well as the departments of the city (Kramers et al. 2016).

Discussion
The results have shown that smart grids, smart meters, smart buildings, smart environmental monitoring, and smart urban metabolism are the main data-driven smart solutions applied for improving and advancing environmental sustainability in both ecocities and smart cities. Such solutions are increasingly being implemented within sustainable cities as part of their sustainable energy systems and within smart cities as part of their smart energy systems. Smart grids are considered as the backbone or anchor of smart cities.
A number of studies on the overall relationship between ICT and climate change show that the positive effects of ICT on reducing GHG emissions result from increasing the efficiency and flexibility of energy production, distribution, and transmission (e.g., GeSI 2008; Griffiths 2008;ITU 2007;MacLean and Arnaud 2008;EEF 2008;EICTA 2009;Reding 2008), and such effects increase more significantly when energy efficiency is combined with renewable energy sources (WWF, Pamlin and Pahlman 2008). Renewables continue to scale faster than expected. According to Renewable Energy Policy Network for the 21st Century (REN21) (2010), renewable energy capacity grew at annual rates of 10-60% worldwide for many renewable technologies. The levelised cost of renewables has come down to the point where build-out (work done to make energy systems ready for use or to expand them) have become cheaper than fossil fuels coupled to carbon capture and storage technology. This puts the emphasis on how renewable energy should be integrated with the power grid system at scale, and what this requires in respect to storage solutions as well as mechanisms for decentralized energy generation, sharing, and sale.
Smart grid technologies provide numerous benefits associated with energy management, energy conservation, cost reduction, as well as the integration of alternative energy sources in power generation, transmission, and distribution systems in the context of smart cities and sustainable cities (e.g., Al Nuaimi et al. 2015;Bibri 2018bBibri , 2019bBibri , 2020aBrown and Zhou 2012Brown 2014;Ersue et al. 2014;Hashem et al. 2016;Kumar and Prakash 2016;Mohamed and Al-Jaroodi 2014;Kyriazis et al. 2014;Parello et al. 2014;Yin et al. 2013). They allow bi-directional energy flows and information between suppliers and consumers and provide data on real time usage and energy pricing. This in turn provides numerous advantages, including real time visibility, service reliability, control of cost and electricity usage, shift in peak load, capacity requirement of the grid, and energy production and sharing (prosumer). Similarly, smart building technologies have proven to be effective in curbing energy consumption (e.g., Bibri 2018b; GeSI 2008; Kramers et al. 2014). They can provide a multifunctional role in energy efficiency and GHG emissions reductions through highly advanced automatic systems for efficient and natural lighting, temperature control, window and door operations, efficient electric appliances, and many other functions. BMS allows more efficient operation, keeps the building climate within a specified range, reduces energy consumption, decreases energy costs, and gurantees safety and security.
The different methods of collecting information about the air quality and the presence of different harmful substances in the air have undergone major advances thanks to the IoT and the associated sensor networks. These are able in real time to gather data about the air condition in different parts of the city and transmit these data via a wireless connection to special analytical centers for further processing and analysis. Moreover, it is possible now to produce a comprehensive analysis of the obtained data, which enables the city authorities to observe the condition of the air and then forecasts about its pollution on the basis of such analysis based on sophisticated modelling and simulation systems. This is to effectively build a variety of preventive systems for environmental protection and to inform citizens and other city stakeholders about GHG emissions. In this light, more and more technologies have recently been developed and implemented in Stockholm and Barcelona for the purpose of monitoring the environment and the timely implementation of preventive measures for its protection, as well as dealing with the problem of air pollution. The identified data-driven smart solutions for air pollution are complementary to those for energy efficiency. The latter are indeed intended to control GHG emissions. Smart environmental control systems in smart sustainable cities can help to collect critical information to make better policy decisions to reduce GHG emissions. Such systems can also guide citizens on making their own efforts for rediucing GHG emissions by a variety of means.
However, although the two cities do collect information of various types about the state of the environment, not all competent authorities have an idea about how to maximize the effect of the use of the collected data, which opens up wide prospects for advancing this technology in the future. Air quality monitoring is challenging to enact as it requires the effective integration of multiple environmental data sources, which often originate from different environmental networks and institutions (Rada et al. 2016). These challenges require specialized observation equipment and tools to establish air pollutant concentrations, including sensor networks, geographic information system (GIS) models, and the Sensor Observation Service (SOS), a web service for querying real-time sensor data (Rada et al. 2016).
The benefits of UM are numerous as to supporting the sustainable development of urban systems (Baccini 1997;Barles 2010;Minx et al. 2010) through a holistic analysis of energy and material pathways. This serves to conceive of management systems and technologies that allow for the reintegration of natural processes, increasing the efficiency of resource use, and the conservation of (and even production of) energy (Newman 1999). These are expected to undergo major transformations thanks to big data analytics. Indeed, advanced ICT has recently demonstrated high potential not only to overcome the limitations associated with UM, but also to provide sophisticated approaches to data collection and analysis under the new SUM framework. Big data technology can allow for radical increases in the speed and complexity of data processing and analysis. The associated solutions often contribute to strategies for decoupling environmental impact from urban development as to various dimensions of urbanization, increasingly achieved through the increase in efficiency enabled by the IoT and big data analytics. The development of data-driven smart solutions to improve the environmental sustainability of cities has been triggered by the co-development of advanced ICT and infrastructure systems. The increasing integration of the core enabling technologies of the IoT and big data analytics in smart sustainable cities, such as sensor networks, real-time heterogeneous data-sources, and data processing platforms, creates the possibilities of obtaining a better understanding of energy flows in urban environments. This can have several effects as to enhancing smart infrastructure systems to augment energy flows and communicate related information to achieve the environmental objectives of sustainable development by different city stakeholder using a number of communication tools and methods. These include sustainable human computer interaction (HCI) (DiSalvo et al. 2010), eco-visualization (Holmes 2007), augmented reality (Azuma et al. 2001), computers and smart phones (Townsend 2010;Zapico et al. 2009), persuasive technology (Fogg 2002), and climate pervasive services (Zapico et al. 2009). On the whole, the real-time data collection and analytics provides great opportunities for developing applications to use and visualize energy consumption and GHG emissions, directed for behavioral change, sustainable lifestyles, environmental stewardship, and so on.
Worth discussing moreover is that SUM is in line with the unprecedented paradigmatic and scholarly shifts that the many sciences underlying smart sustainable urbanism are undergoing in light of big data science and analytics (see Bibri 2019d for further details). This relates to what has been termed "the fourth paradigm of science," a scientific revolution that is marked by both the emergence of big data science and analytics and the increasing adoption of the underlying technologies in scientific and scholarly research and social practices. Everything about knowledge production is fundamentally changing thanks to the fast-flowing torrent of big data. This is the primary fuel of the new age, which powerful computational processes algorithms are using to generate valuable knowledge for enhanced decision-making and deep insights pertaining to a wide variety of practical uses and applications. This is at the core of UM given its inherent quantitative nature. UM studies have been used to provide indicators for assessing urban sustainability and quantifying GHG emissions of cities, such as measures of energy consumption (Kennedy et al. 2011). UM is also applied to sustainable urban planning and design as well as policy analysis. These applications are categorized by Kennedy et al. (2011) into four main areas: sustainability indicators (e.g., information pertaining to energy efficiency, quantification of GHG emissions, dynamic mathematical models for policy analysis, and urban design). Generally, urban sustainability as entailing complex dynamics of human-natural system interactions requires a decisive, radical change in the way the science is undertaken and developed. This change is what data-intensive science-a data-driven exploration-centered form of science, where big data computing and the underpinning technologies are heavily used to help scientists and scholars to manage, analyze, and share data for multiple purposes-is about (Bibri 2019d). SUM is one of the transformations that is enabled by what data-intensive science is offering in terms of its novel computational and scientific approaches in the light of the nature of the shortcomings associated with the application of UM in the context of urban planning and design, including intensive data collection and analysis and a lack of data at the city scale.
Stockholm has the best practices for environmental sustainability given its high level of sustainable development practices, including the implementation of applied datadriven solutions and their integration with green energy technologies to reach environmental targets. This can further be demonstrated by the SUM solution that has been implemented in the Smart Eco-city District of SRS to monitor environmental sustainability outcomes concerning energy consumption and GHG emissions. SUM as a new framework is more associated with sustainable cities given their strong environmental policies than smart cities. The concept of UM is fundamental to the development of sustainable cities (Kennedy et al. 201;Niza et al. 2009). UM research "involves conceptualizing a city … as an organism and tracking resources that go into the system and products and wastes that leave it" (Bai 2007, p. 1). In the eco-city as defined by Register (2002) as an urban environmental system, input of resources and output of waste are minimized (Register 2002).
Nonetheless, while the two cities differ in the nature rather than the degree of the implementation of data-driven smart solutions as best reflected in their overall environmental performance, Barcelona as a smart city is taking concrete actions with respect to energy efficiency and pollution mitigation. Accordingly, the smart ecological/environmental ideal has succeeded in enabling action in major cities around the world, and has recently become normalized as a widely accepted set of consensus concepts and ideas related to the sustainable city (Bibri 2020a;Cowley 2016). Besides, the enabling, integrative, and ubiquity nature of the IoT and big data technologies supports and justifies their applicability to the different paradigms of urbanism within different contexts, irrespective of the complexity of the environmental, economic, and socio-political systems of the city.
In recent years, the IoT and big data technologies have become a central issue in the domain of smart sustainable urbanism. The generation of colossal amounts of data and the development of sophisticated data analytics techniques for monitoring, understanding, and analyzing urban systems are the most significant aspects of smart cities that are being embraced and leveraged by sustainable cities in the endeavor to enhance their contribution to sustainability (Bibri and Krogstie 2019a, b). While smart eco-cities generally deal with the challenges of environmental, economic, and social sustainability and prioritize strategies and solutions accordingly (see Bibri and Krogstie 2020a for a comprehensive case study), the environmental dimension of sustainability remains at the core of the eco-city(e.g., Bibri 2020b; Holmstedt et al. 2017; Mostafavi and Doherty 2010; Rapoport and Vernay 2011). As such, they involve the combination of ecological and compact strategies as well as smart solutions (e.g., Bibri and Krogstie 2020a, c;Höjer and Wangel 2015;Pandis and Brandt 2011;Späth 2017). Regarding the latter, the use of the IoT and big data analytics in ecological urbanism has just recently gained interest in research (e.g., Bibri 2018aBibri , 2019aBibri , 2020bBibri and Krogstie 2017b;Shahrokni et al. 2014a, b;Shahrokni et al. 2015a, b). As regards smart cities, while all of them face the same challenges of sustainability in the light of the escalating urbanization trend, they differ in the policies and strategies they adopt to deal with and overcome such challenges. Moreover, smart cities vary in the kind of challenges they face and the solutions they prioritize. Evertzen et al. (2018) provide some comparative insights into the key differences between several cities. Regardless, the challenges for achieving the goals they pursue have been brought to the forefront by the combination of the IoT and big data analytics in recent years.
The emerging data-driven smart solutions have become of paramount importance to smart sustainable urbanism in regard to city development planning and city operational management. A key aspect of this is the use of urban big data as the evidence base for formulating urban policies, plans, strategies, and programs themselves, as well as for tracking their effectiveness and modelling and simulating future urban development projects. The operation and organization of urban systems and the coordination of urban domains require not only the use of complex interdisciplinary knowledge, but also the application of sophisticated approaches and the use of powerful engineering solutions underpinned by advanced computational analytics (e.g., Batty 2013, Batty et al. 2012Bibri 2019aBibri , d, e, 2020aKrogstie 2017c, 2018;Bibri et al. 2020;Bettencourt 2014;Kitchin 2014). Modern cities employ the latest technologies in city development planning and city operational management to support sustainable development given rapid urban growth, increasing urban domains, and more complex infrastructures. The use of big data provides the basis for cities to be more sustainable, efficient, resilient, equitable, and livable.

Conclusion
Data-driven technologies have become essential to the functioning of smart sustainable cities, particularly in relation to their contribution to environmental sustainability. This paper investigated the potential and role of data-driven smart solutions in improving and advancing environmental sustainability in the context of smart cities as well as sustainable cities under what can be labeled "environmentally data-driven smart sustainable cities." This study has shown that smart grids, smart meters, smart buildings, smart environmental monitoring, and smart urban metabolism are the main datadriven smart solutions applied for improving and advancing environmental sustainability in both eco-cities and smart cities. There is a clear synergy between such solutions in terms of their interaction or cooperation to produce combined effects greater than the sum of their separate effects-with respect to the environment. This involves energy efficiency improvement, environmental pollution reduction, renewable energy adoption, and real-time feedback on energy flows, with high temporal and spatial resolutions.
Every city has its specific opportunities, capabilities, and constraints, not least in relation to the application of advanced technologies for environmental sustainability. Hence, there are many things for cities to learn from each other concerning the knowledge and expertise they can demonstrate in this regard. It is therefore crucial to investigate the innovative solutions and sustainable strategies of different cities based on the ongoing and future projects and initiatives in their local context for learning purposes. Especially, it is well understood that there cannot be a set of rigid strategic guidelines that should be strictly followed and implemented anywhere around the world to achieve environmental sustainability. Sustainability generally depends on several intertwined factors that should fit the local context. In view of that, each city should tap into its local opportunities and capabilities as well as assesses its constraints and potentials from a more integrated perspective given the complexity surrounding the socio-political systems of the city. Overall, smart sustainable urbanism is shaped by sociocultural and politico-institutional structures.
There is much enthusiasm currently about the opportunities created by the big data deluge and its new and more extensive sources in the domain of smart sustainable urbanism. This involves, in the context of SUM, the collection, processing, and analysis of energy flows to provide data on, among others, energy consumption and GHG emissions based on high temporal and spatial resolutions. The analytical outcome can be used in planning to follow up on the environmental goals of sustainability by optimizing energy efficiency with respect to utilities and building owners, as well as by mitigating the environmental impacts of energy consumption in regard to households thanks to the user-generated automated data collection, real-time analytics, and tailored feedback to various stakeholders needs.
The prospect of real-time data collection and analysis at any instant will provide the opportunity for aggregating and harnessing urban data to deal with urban changes at any scale and over any time period. Currently, datasets are able to show the real-time functioning of energy systems and provide deep insights into how long term environmental changes can be detected. Short-termism in energy planning is about measuring, evaluating, modelling, and simulating what takes place over hours, days, or weeks instead of months, years, or decades. In this respect, big data analytics can be used to derive new theories of how urban systems function, energy consumption increases, and GHG emissions rise in ways that focus on much shorter term issues than hitherto to contain the negative impacts of energy use on the environment. In addition, continuous energy planning as data constantly flood from urban systems in operation and are updated in real time allows for a dynamic conception of planning in response to the processual outcomes of urbanization as regards living and consuming processes. Especially, the data-driven smart solutions pertaining to urban metabolism, which include smart grids as part of energy production flows, derive a real-time dynamic understanding of energy flows, which can provide planners a good basis for decision-making as to the system consequences of their decisions and actions on the environment. They moreover enable the further optimization of energy efficiency through automated decisions. In a nutshell, as concluded by Bibri (2019f), smart sustainable urbanism will prevail for many years yet to come given the underlying transformational power of big data science and analytics, coupled with its legitimation capacity associated with the scientific discourse as the ultimate form of rational thought and the basis for legitimacy in knowledge production.
The present study offers insights that can inform future research agendas on smart sustainable urbanism from a technological and environmental perspective. More specifically, it provides the grounding for further in-depth research on the untapped potential of the IoT and big data technologies and their novel applications in advancing and improving environmental sustainability in the context of smart sustainable cities of the future. We would particularly like to encourage research on the development of a holistic approach to environmental sustainability underpinned by a strong synergy and dynamic interplay between techno-scientific and socio-political dimensions for the primary purpose of devising more effective solutions and more concrete guidelines and clear pathways for a wider implementation. This is predicated on the assumption that the data-driven smart solutions applied do not exist independently of the instruments, systems, practices, and knowledge employed and embedded within the multidimensional context (e.g., local, national, social, political, cultural, institutional, organizational, regulatory, etc.)-where they are created and disseminated. Also, we would like to draw the attention of future researchers to the importance of developing a deeper understanding of the multi-faceted processes of change to achieve environment sustainability in the era of big data revolution through focused discursive investigations on, and practical implementations of, data-driven smart solutions in different contexts. Moreover, qualitative analyses of the kind that we have attempted, which try to illuminate how the data-driven smart solutions contribute to SDG 7 is of high importance and value.
One key reason for this is that as the demand for practical ideas from both the technologically and ecologically advanced nations about how to achieve the environmental objectives of sustainable development through emerging technologies, such solutions are likely to get increasing attention from the policy makers and practitioners from other major cities around the world. Further research should focus on providing the knowledge that these actors will need to make informed decisions about how to achieve those objectives through the development and implementation of the solutions in question in their own context. In addition, as this study has demonstrated that solutions for improving and advancing environmental sustainability already exist and are rapidly evolving across the selected cities, it would be useful and worthy to pursue a wider and more varied comparison (involving cities from other European and Scandinavian countries or from other parts of the world) with a view to revealing more global trends in smart sustainable urbanism. Taking up this in future research is indeed justified by the limitations to the present study, which pertain to the case selection that included only European countries. Due to this bias in the case selection, it is moreover conceivable that potentially more data-driven smart solutions for environmental sustainability exist in other cities in Europe and around the world.
Finally, the concepts, ideas, and findings presented in this study for policy makers provide practical clues as well as lessons on the expected benefits of developing and implementing data-driven smart solutions to accelerate the movement towards environmental sustainability in the light of the emerging paradigm of the IoT and big data computing. Most of the time, when it comes to data-driven smart sustainable urbanism, contradictions, uncertainties, and even contentions and conflicts emerge during the cooperation and interaction between policymakers, planners, government officials, sustainability strategists, urban scientists, ICT experts, environmental engineers, technologists, industry experts, thought leaders, and citizens, irrespective of whether the city is already badging or just regenerating itself as data-driven smart sustainable. This phenomenon is nevertheless common in all urban development projects and initiatives due to the difficulty of aligning and accommodating the various interests and expectations of the involved city stakeholders. Regardless, learning from the experience and knowledge of the leading cities in their areas of expertise is a common way to formulate and implement urban visions, policies, and strategies through drawing positive and negative lessons and acting about the outcome We hope to have contributed our share to improving that practice.