Chapter 4. Simulating Time Series Data
Up to this point, we have discussed where to find time series data and how to process it. Now we will look at how to create times series data via simulation.
Our discussion proceeds in three parts. First, we compare simulations of time series data to other kinds of data simulations, noting what new areas of particular concern emerge when we have to account for time passing. Second, we look at a few code-based simulations. Third, we discuss some general trends in the simulation of time series.
The bulk of this chapter will focus on specific code examples for generating various kinds of time series data. We will run through the following examples:
We simulate email opening and donation behavior of members of a nonprofit organization over the course of several years. This is related to the data we examined in “Retrofitting a Time Series Data Collection from a Collection of Tables”.
We simulate events in a taxicab fleet of 1,000 vehicles with various shift start times and hour-of-the-day-dependent passenger pickup frequencies over the course of a single day.
We simulate step-by-step state evolution of a magnetic solid for a given temperature and size using relevant laws of physics.
These three code examples correlate to three classes of time series simulations:
- Heuristic simulations
We decide how the world should work, ensure it makes sense, and code it up, one rule at a time.
- Discrete event simulations
We build individual actors with certain ...