Skip to main content
added 2 characters in body
Source Link
Mr.Wizard
  • 273.1k
  • 34
  • 595
  • 1.4k

I work with a lot of dynamic data in {{date, datum}. . .} format,

datedatalist={{{2001, 1, 1}, 45.2}, {{2002, 1, 1}, 132.}, {{2003, 1, 2}, 121.1}};

and I have historically attached a header to each object in a format like

datedataObject={{header version, data series name, type (value, % change, etc.)}, datedatalist};

I can see advantages to using Mathematica's TemporalData[] type, and to using MetaInformation[] for recording the header. I would set this up with something like

newObject = TemporalData[datedatalist, MetaInformation -> {"name" -> "whatever", "type" -> "value"}];

and extract header items with, for example

newObject["name"]

But this leaves me with two puzzles,

  1. How do I add MetaInformation after the object has been created? and
  2. How do I change existing MetaInformation?

I work with a lot of dynamic data in {{date, datum}. . .} format,

datedatalist={{{2001, 1, 1}, 45.2}, {{2002, 1, 1}, 132.}, {{2003, 1, 2}, 121.1}};

and I have historically attached a header to each object in a format like

datedataObject={{header version, data series name, type (value, % change, etc.)}, datedatalist};

I can see advantages to using Mathematica's TemporalData[] type, and to using MetaInformation[] for recording the header. I would set this up with something like

newObject = TemporalData[datedatalist, MetaInformation -> {"name" -> "whatever", "type" -> "value"}];

and extract header items with, for example

newObject["name"]

But this leaves me with two puzzles,

  1. How do I add MetaInformation after the object has been created? and
  2. How do I change existing MetaInformation?

I work with a lot of dynamic data in {{date, datum}. . .} format,

datedatalist={{{2001, 1, 1}, 45.2}, {{2002, 1, 1}, 132.}, {{2003, 1, 2}, 121.1}};

and I have historically attached a header to each object in a format like

datedataObject={{header version, data series name, type (value, % change, etc.)}, datedatalist};

I can see advantages to using Mathematica's TemporalData[] type, and to using MetaInformation[] for recording the header. I would set this up with something like

newObject = TemporalData[datedatalist, MetaInformation -> {"name" -> "whatever", "type" -> "value"}];

and extract header items with, for example

newObject["name"]

But this leaves me with two puzzles,

  1. How do I add MetaInformation after the object has been created? and
  2. How do I change existing MetaInformation?
Source Link
Michael Stern
  • 4.7k
  • 1
  • 21
  • 37

Setting and changing MetaInformation for arbitrary objects

I work with a lot of dynamic data in {{date, datum}. . .} format,

datedatalist={{{2001, 1, 1}, 45.2}, {{2002, 1, 1}, 132.}, {{2003, 1, 2}, 121.1}};

and I have historically attached a header to each object in a format like

datedataObject={{header version, data series name, type (value, % change, etc.)}, datedatalist};

I can see advantages to using Mathematica's TemporalData[] type, and to using MetaInformation[] for recording the header. I would set this up with something like

newObject = TemporalData[datedatalist, MetaInformation -> {"name" -> "whatever", "type" -> "value"}];

and extract header items with, for example

newObject["name"]

But this leaves me with two puzzles,

  1. How do I add MetaInformation after the object has been created? and
  2. How do I change existing MetaInformation?