These functions get the first letter of every camera model name and give a count of how many starts with “A” and “C”. This is used to tell us how many Agfa and Canon models there are.
This code structure is taken from an online example that is cited at the bottom. It works with the format related code and the array or all of the camera data to create the chart.
These are the format related code which takes the data from the array to know how to space out the lines on the chart, the labeling position, and the bin size of each bar. There is a variant for each value except for the variable “format”. There are variants because each histogram has different scales for the X axis and different amount of cases since there are some missing data.
These segments calculate the maximum, minimum, average, and sum value of the data. Some histograms only give the average because logically it does not make sense to give both. For example, giving the sum value of zoom is not useful information.
This function removes any missing values, the .csv file had some illogical values such as a camera not having any weight. This allows the histograms to show only what is logical.