Opportunity metrics

Resolves theodi/shared#103, and a few bits of the metrics ticket as well.