View Source Coda.Analytics.Commons (coda v0.3.0)

Common data frame analytics functions.

Summary

Functions

Compute count and frequency for a columns subset.

Rank data frame by counts or (year) frequency, limits to nth rows.

Types

Functions

Link to this function

frequencies(df, facet_type, opts \\ [])

View Source
@spec frequencies(dataframe(), facet_type(), keyword()) :: dataframe()

Compute count and frequency for a columns subset.

Options:

  • filter - an Explorer.DataFrame filter function that excludes data in analytics
  • counts - includes only facets with this counts (integer)
  • sort - by :counts or :freq (frequencies over the years)
Link to this function

rank_and_limit(df, opts \\ [])

View Source
@spec rank_and_limit(
  dataframe(),
  keyword()
) :: dataframe()

Rank data frame by counts or (year) frequency, limits to nth rows.