Built with blockbuilder.org
R code to accompany the week2 d3 portion
countries <- c(12, 31, 15, 21, 22, 29, 29, 45, 46, 47, 49, 59,
69, 67, 83, 93, 112, 121, 92, 80, 140, 159, 169, 197, 200, 201, 204, 205)
years <- c(1896, 1900, 1904, 1906, 1908, 1912, 1920, 1924, 1928, 1932, 1936,
1948, 1952, 1956, 1960, 1964, 1968, 1972, 1976, 1980, 1984, 1988, 1992, 1996, 2000, 2004, 2008, 2012)
barX <- barplot(countries,xlab = "Years", beside=TRUE)
text(barX, 0, round(years,1),cex=0.8, pos=3,srt=90)
Modified http://d3js.org/d3.v3.min.js to a secure url
https://d3js.org/d3.v3.min.js