<commit_before>class Workbench.Models.Datastream extends Backbone.Model
  idAttribute: "uid"

  initialize: ->

  getTimeSeries: ->
    @object.getTimeSeries
      start: new Date("2013-10-01 00:00:00Z")
      end: new Date("2013-10-16 00:00:00Z")
      done: (seriesData) =>
        # Data is returned in newest-first order, so reverse it
        @set("seriesData", seriesData.reverse())

  seriesData: ->
    @get("seriesData")

  # name is alias for id
  name: ->
    @get("id")

  # units is alias for unit
  units: ->
    @get("unit")

class Workbench.Collections.DatastreamsCollection extends Backbone.Collection
  model: Workbench.Models.Datastream

  # Retrieve a list of datastreams from the GeoCENS JS API<commit_msg>Retrieve 500 most recent time series results<commit_after>class Workbench.Models.Datastream extends Backbone.Model
  idAttribute: "uid"

  initialize: ->

  getTimeSeries: ->
    @object.getTimeSeries
      recent: true
      limit: 500
      done: (seriesData) =>
        # Data is returned in newest-first order, so reverse it
        @set("seriesData", seriesData.reverse())

  seriesData: ->
    @get("seriesData")

  # name is alias for id
  name: ->
    @get("id")

  # units is alias for unit
  units: ->
    @get("unit")

class Workbench.Collections.DatastreamsCollection extends Backbone.Collection
  model: Workbench.Models.Datastream

  # Retrieve a list of datastreams from the GeoCENS JS API
{'fraction_non_alphanumeric': 0.10761705101327743, 'fraction_numerical': 0.023759608665269043, 'mean_word_length': 3.274626865671642, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6721606', 'n_tokens_mistral': 474, 'n_tokens_neox': 431, 'n_words': 125}