This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<!-- This was one of Scott Murray's Knight D3 course files, modified a bit. --> | |
<!-- This was copied from Lynn Cherny's class files and modified to load Josh's data. --> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Loading CSV Data with D3</title> | |
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js"></script> | |
<script type="text/javascript" src="https://code.jquery.com/jquery-1.12.0.min.js"></script> | |
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
d3.select("body").append("h1").text("My Data"); | |
var body = d3.select("body"); | |
// Open the console to see this. You may need to reload if you | |
// didn't have it open when you first loaded the page. | |
console.log("D3 Selection of body:", body); | |
// The selection via jquery returns something different: | |
console.log("Jquery selection:", $("body")); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
h1, | |
h2 { | |
font-family: 'Graduate', cursive; | |
text-align: center; | |
text-transform: uppercase; | |
} | |
p { | |
font-family: 'Roboto', sans-serif; | |
text-align: center; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.chartist-tooltip { | |
position: absolute; | |
display: inline-block; | |
opacity: 0; | |
min-width: 5em; | |
padding: .5em; | |
background: #F4C63D; | |
color: #453D3F; | |
font-family: Oxygen,Helvetica,Arial,sans-serif; | |
font-weight: 700; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
h1, | |
h2 { | |
font-family: 'Graduate', cursive; | |
text-align: center; | |
text-transform: uppercase; | |
} | |
p { | |
font-family: 'Roboto', sans-serif; | |
text-align: center; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
h1, | |
h2 { | |
font-family: 'Graduate', cursive; | |
text-align: center; | |
text-transform: uppercase; | |
} | |
p { | |
font-family: 'Roboto', sans-serif; | |
text-align: center; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>SVG Shapes</title> | |
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js"></script> | |
<script type="text/javascript" src="https://code.jquery.com/jquery-1.12.0.min.js"></script> | |
</head> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
h1, | |
h2 { | |
font-family: 'Graduate', cursive; | |
text-align: center; | |
text-transform: uppercase; | |
} | |
p { | |
font-family: 'Roboto', sans-serif; | |
text-align: center; |
We can make this file beautiful and searchable if this error is corrected: It looks like row 7 should actually have 25 columns, instead of 1. in line 6.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
country,dwellingsWithoutBasicFacilities,housingExpenditure,roomsPerPerson,householdNetAdjustedDisposableIncome,householdNetFinancialWealth,employmentRate,jobSecurity,longTermUnemploymentRate,personalEarnings,qualityOfSupportNetwork,educationalAttainment,studentSkills,yearsInEducation,airPollution,waterQuality,consultationOnRuleMaking,voterTurnout,lifeExpectancy,selfReportedHealth,lifeSatisfaction,assaultRate,homicideRate,employeesWorkingVeryLongHours,timeDevotedToLeisureAndPersonalCare | |
Australia,1.1,20,2.3,31197,38482,72,4.4,1.06,46585,93,74,512,18.8,13,93,10.5,93,82,85,7.4,2.1,0.8,14.23,14.41 | |
Austria,1,21,1.6,29256,48125,73,3.4,1.07,43837,95,82,500,16.9,27,95,7.1,75,81.1,69,7.5,3.4,0.5,8.61,14.46 | |
Belgium,1.9,20,2.3,27811,78368,62,4.5,3.37,47276,91,71,509,18.8,21,84,4.5,89,80.5,74,7.1,6.6,1.2,4.41,15.71 | |
Brazil,6.7,21,1.4,10310,6875,67,4.8,2.17,7909,90,43,402,16.3,18,67,4,79,73.4,69,7.2,7.9,25.5,10.74,14.97 | |
Canada,0.2,22,2.5,30212,63261,72,6.6,0.9,44017,94,89,522,17,15,90,10.5,61,81,88,7.6,1.3,1.7,3.98,14.25 | |
C |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
h1, | |
h2 { | |
font-family: 'Graduate', cursive; | |
text-align: center; | |
text-transform: uppercase; | |
} | |
p { | |
font-family: 'Roboto', sans-serif; | |
text-align: center; |
OlderNewer