Built with blockbuilder.org
##Name: Joel D. Rodriguez-Ortiz Above are the results of working through the D3 tutorial. Refreshing serveral times will produce the same bar graph with randomized data.
A sampling of the randomized data was logged, to produce the same bar graph in R (shown below).
###R Source Code
data <- c(28, 17, 18, 13, 13, 28, 4, 16, 12, 13, 10, 18, 7, 27,
25, 29, 4, 10, 12, 27, 5, 28, 26, 17, 16)
barplot(data,
main='Data',
ylab='Count',
border='blue')
xxxxxxxxxx
<html lang="en">
<head>
<meta charset="utf-8" />
<title>D3 Test</title>
<script type="text/javascript" src="https://d3js.org/d3.v3.min.js"></script>
<style>
div.bar
{
display: inline-block;
width: 20px;
height: 75px;
background-color: teal;
margin-right: 2px;
}
</style>
</head>
<body>
<script type="text/javascript" src="jdr.js"></script>
</body>
</html>
Modified http://d3js.org/d3.v3.min.js to a secure url
https://d3js.org/d3.v3.min.js