rn {
        name: name,
        sample: vega.randomInteger(min, max).sample
      };
    }
    function sampleNominal(name, values) {
      const sample = vega.randomInteger(0, values.length).sample;
      return {
        name: name,
        sample: () => values[sample()]
      };
    }
    function toCSV(data) {
      const headers = Object.keys(data[0]);
      let csv = headers.join(',') + '\n';
      for (let i = 0, n = data.length; i < n; ++i) {
        csv += headers.map(h => data[i][h]).join(',') + 