mitmedialab / Vida_Modeling

User Interface and Simulation Platform for a System Dynamics Model
MIT License
6 stars 2 forks source link

Make data that updates less frequently than every day be displayed as such #29

Closed jackreid closed 3 years ago

jackreid commented 3 years ago

Basically we need to format it such that the temporal data only shows data points that are actual updates, while not breaking the model by having it try and use data points that don't exist.

jackreid commented 3 years ago

@seamuslo

I made an initial attempt at this. Now the plots handle historical data with missing days fine. On the temporal csv, just leave blank the entries that don't contain data. For modeling and other purposes, calling SD_object.value() will return the last, non empty data point. There are two details to note:

  1. The system will still respond poorly to a history that is completely empty. It needs at least one data point.
  2. When running the simulation, the graph will plot the new simulated data on a daily basis, regardless of the span between data points in the historical data. If we want to set up a mechanism for designating a "plot refresh rate" of something other than daily, we can but it will require more work.