View Source Coda.Behaviour.Analytics behaviour (coda v0.3.0)

Behaviour of facets analytics

Summary

Types

@type dataframe() :: Explorer.DataFrame.t()
@type digest() :: %{
  counts: integer(),
  max_year: integer(),
  min_year: integer(),
  n_albums: integer(),
  n_artists: integer(),
  n_tracks: integer(),
  n_years: integer(),
  years_digest: [year_count()]
}
@type facets() :: Explorer.DataFrame.t()
Link to this type

facets_analytics_response()

View Source
@type facets_analytics_response() :: {facets(), facet_type(), scrobbles()}
@type options() :: Keyword.t()
@type scrobbles() :: Explorer.DataFrame.t()
@type year_count() :: %{year: integer(), counts: integer()}

Callbacks

@callback dataframe(options()) :: {:ok, dataframe()} | {:error, term()}
@callback digest(dataframe()) :: digest()
Link to this callback

sample_albums(dataframe, options)

View Source
@callback sample_albums(dataframe(), options()) :: facets_analytics_response()
Link to this callback

sample_artists(dataframe, options)

View Source
@callback sample_artists(dataframe(), options()) :: facets_analytics_response()
Link to this callback

sample_tracks(dataframe, options)

View Source
@callback sample_tracks(dataframe(), options()) :: facets_analytics_response()
Link to this callback

top_albums(dataframe, options)

View Source
@callback top_albums(dataframe(), options()) :: facets_analytics_response()
Link to this callback

top_artists(dataframe, options)

View Source
@callback top_artists(dataframe(), options()) :: facets_analytics_response()
Link to this callback

top_tracks(dataframe, options)

View Source
@callback top_tracks(dataframe(), options()) :: facets_analytics_response()