Skip to content

Meta data, variables, and units

Will Pearse edited this page Jun 22, 2017 · 1 revision

While writing a download function, be on the look-out for variables that correspond to the following kinds of data, and make sure their variable name matches the "official name". Re-name them as necessary, and also make sure that no other variables in the data your function downloads have an "official name" if their description does not match that given below.

Description Official name
Total mass of an organism (note: plants may have body masses, even though they have no bodies!) body_mass
Observed height of an organism, or average of multiple measurements of an organism height

While writing a download function, you should be defining meta-data. As with variables, there are some kinds of meta-data that you want to make match their 'official name'. These include:

Description Official name
Latitude of observation latitude
Longitude of observation longitude

Units are, sadly, easy to get right and easy to get wrong :D Follow SI standards for reporting units, making note of the following:

  • Simplify units wherever possible. For example, meters per second would be written as "m/s", but meters per second squared (acceleration) would be written as "m s^-2" and not "m/s/s". Do not write "meters", write "m" - it's unambiguous if you use SI units.
  • A space between units means product (multiply) and is required. Thus writing "m g" means "meters times grams"; it would be wrong to write "m*g" or "mg". There is no other whitespace in a unit definition.
  • "^" means "to the power of", "/" means "divided by"

If you follow the three rules above, it will be easy for others to make use of the units in the package.

The two kinds of meta-data

There are two kinds of meta-data. The first is about species, and the second is about sites. It's pretty self-explanatory: a species doesn't have a latitude or longitude, but the site it was found at does. A site doesn't have a body mass, but a species might do.

Clone this wiki locally