Bar charts and histograms look similar but they are used for different kinds of data. Bar charts are useful for catagorical data whereas histograms are useful for continuous variables.
Example one, this graph shows the number of days in office for different UK Prime Ministers. Note that Prime ministers are not a continuous variable. Each Prime Minister is separate from every other Prime Minister. The order of the Prime Ministers is also not fixed, I arranged them in chronological order but any order is valid.
Example 2, the graph below is a histogram, the variable is finishing time for elite athletes in the London marathon in 2015. Time is a continuous variable so a histogram can be used. With histograms the number, width and positioning of the bins can change the appearance of the histogram. Too few bins and fine detail in the data is lost, too many bins and some of the bins will have few or no data points
This blog includes:
Scripts mainly in Python with a few in R covering NLP, Pandas, Matplotlib and others. See the home page for links to some of the scripts. Also includes some explanations of basic data science terminology.