Increasingly, vast data sets collected about complex network activities via monitoring and sensing devices define dynamics of these networks. This creates a challenge for controlling them, since it requires formal definition of network dynamics. In this talk, we introduce a framework for deriving the formal definition of complex network’s dynamics from data. It provides an important description of the network dynamic that focuses on its failures. Its control has multiple sources of cost, which are beyond the current scope of traditional control theory. We developed a method for converting network interaction data into continuous dynamics, to which we apply optimal control. In the talk, we describe this approach in two meaningful examples. In the first example, we focus on control of pandemics. We identify seven risks commonly used by governments to control COVID-19 spread. We illustrate how our method can control dynamics on this pandemic risk network optimally and analyze how the chosen control nodes affect total cost. We show that many alternative sets of controlling risks, different from commonly used ones, exist with potentially lower cost of control. The second example focuses on the air transportation network of the United States to abate its annoying frequent failures of flight delays. We build flight delay networks for each U.S. airline. Analyzing these networks, we uncover and formalize their dynamics. We use this formalization to design the optimal control for the flight delay networks. Our results demonstrate that the framework can effectively reduce the delay propagation and it significantly reduces the costs of delays to passengers, airlines and airports.