code: function getDataflowUrl(item) {
    if (!item.dataflowUrlComponent) {
      return;
    }
    var dataUrlComponent = "/" + item.dataUrlComponent + "/";
    var dataUrlIndex = item._originalUrl.lastIndexOf(dataUrlComponent);
    // If the URL contains /data/, look for how many / terms come after it.
    if (dataUrlIndex >= 0) {
      var suffix = item._originalUrl.slice(
        dataUrlIndex + dataUrlComponent.length
      );
      // eg. suffix would be ABS_REGIONAL_LGA/CABEE_2.LGA2013.1+.A/all...
      // If it contains a /, and anything after the /, then treat it as #1.
      if (suffix.indexOf("/") >= 0 && suffix.indexOf("/") < suffix.length - 1) {
        return;
      } else {
        // return the same URL but with /data/ replaced with /dataflow/.
        var dataflowUrlComponent = "/" + item.dataflowUrlComponent + "/";
        return item._originalUrl.replace(dataUrlComponent, dataflowUrlComponent);
      }
    }
  }
docs: The URL can have two different forms, which require different handling. 1. http://stat.abs.gov.au/sdmx-json/data/ABS_REGIONAL_LGA/CABEE_2.LGA2013.1+.A/all?startTime=2013&endTime=2013 Read data from this URL directly and construct the table and concepts from it. 2. http://stat.abs.gov.au/sdmx-json/data/ABS_REGIONAL_LGA Do not attempt to hit this URL directly. Instead get the concepts from .../dataflow/ABS_REGIONAL_LGA, and then, whenever the active concepts are changed, construct a specific URL like in #1 from those concepts, load the data from it, and construct a table. If no 'dataflow' URL is recognizable, revert to #1 behaviour. If the URL fits neither form, assume it is a datafile to be handled like #1. You can also force the #1 behaviour by blanking out item.dataflowUrlComponent. This function returns undefined for #1, and the dataflow URL for #2.