Skip to content

Instantly share code, notes, and snippets.

@rbino
Created March 23, 2018 13:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rbino/784492b232970a9dae40c5086ea7bc6a to your computer and use it in GitHub Desktop.
Save rbino/784492b232970a9dae40c5086ea7bc6a to your computer and use it in GitHub Desktop.
Simple ExLTTB example
# Downsample a list of data in the default shape of %{x: x, y: y}
input_samples = for x <- 1..1000, do: %{x: x, y: :random.uniform() * 100}
# 50 output samples
output_samples = ExLTTB.downsample_to(input_samples, 50)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment