Histogram Generator from Random Data
A coding challenge to generate a histogram based on random data
Prompt: retrieve a list of numbers from an endpoint, then plot a histogram showing the frequency of each number in the list. The histogram should have appropriately numbered x and y axes
In the example below, the list contained 24 ones, 17 twos, 30 threes, and so on.
Time limit: 60 minutes
Possible extensions
-Ensure your histogram displays correctly with extremes, e.g. how does it handle very high frequencies of a single number, what about negative numbers?
-Use different colors for each bar in the histogram
-Add a button to refetch/regenerate the data (the endpoint will return random numbers each time)
-On hovering over a bar in the histogram, change the color and show a label above the bar with the precise value
-You may notice that the random.org URL takes query parameters that will change the numbers generated: include a form that will dynamically generate the URL to provide a different set of numbers (e.g. more numbers, min/max value)