Basic CSS practice to style the HTML page with headlines, byline, body text, and images in an external style sheet.
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 | 2013 | 2010 | 2005 | 2000 | 1995 | 1990 | Change in Mortality Rate (1990-2013) | |
---|---|---|---|---|---|---|---|---|
Afghanistan | 400 | 500 | 730 | 1100 | 1200 | 1200 | -0.666666667 | |
Albania | 21 | 21 | 24 | 28 | 29 | 31 | -0.322580645 | |
Algeria | 89 | 92 | 100 | 120 | 140 | 160 | -0.44375 | |
Angola | 460 | 530 | 750 | 1100 | 1400 | 1400 | -0.671428571 | |
Argentina | 69 | 76 | 70 | 63 | 60 | 71 | -0.028169014 | |
Armenia | 29 | 31 | 37 | 43 | 51 | 47 | -0.382978723 | |
Australia | 6 | 5 | 6 | 9 | 8 | 7 | -0.142857143 | |
Austria | 4 | 3 | 5 | 5 | 7 | 10 | -0.6 | |
Azerbaijan | 26 | 27 | 36 | 57 | 83 | 60 | -0.566666667 |
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> | |
<head> | |
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'> | |
<title>Highcharts Extract Example</title> | |
<!-- Code example for class extracted from http://datatools.urban.org/Features/wealth-inequality-charts/ with code from Tim Meko and Ben Chartoff --> | |
<style> | |
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
<!DOCTYPE html> | |
<!-- A modified example from Scott Murray's Knight d3 course. --> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Maternal Mortality Rate in 2013 by Country</title> | |
<link href="style.css" rel="stylesheet" type="text/css" /> | |
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js"></script> | |
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> | |
<!-- Modification of an example by Scott Murray from Knight D3 course --> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Line Chart with Multiple Lines</title> | |
<link href="style.css" rel="stylesheet" type="text/css" /> | |
</head> | |
<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
<!DOCTYPE html> | |
<!-- Modification of an example by Scott Murray from Knight D3 course --> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Line Chart with Multiple Lines</title> | |
<link href="style.css" rel="stylesheet" type="text/css" /> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js" charset="utf-8"></script> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.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
Country | Year | Meningitis_encephalitis | Respiratory_infections | Sepsis | Pertussis | Malaria | Measles | HIV_Aids | Diarrhoeal_diseases | Asphyxia_trauma | |
---|---|---|---|---|---|---|---|---|---|---|---|
Angola | Year 2013 | 5461 | 26392 | 7199 | 897 | 19405 | 627 | 1778 | 22465 | 14245 | |
Angola | Year 2012 | 5747 | 26910 | 7149 | 893 | 19692 | 1278 | 1769 | 23655 | 14150 | |
Angola | Year 2000 | 9282 | 25989 | 4172 | 931 | 21138 | 1103 | 1179 | 27209 | 9800 | |
Angola | Year 2001 | 9452 | 26463 | 4784 | 918 | 21232 | 3889 | 1276 | 27064 | 9715 | |
Angola | Year 2011 | 6107 | 27282 | 7044 | 911 | 21331 | 573 | 1704 | 24567 | 13909 | |
Angola | Year 2002 | 9628 | 27141 | 5269 | 931 | 21793 | 5054 | 1373 | 26969 | 10068 | |
Angola | Year 2006 | 10465 | 30754 | 6064 | 1047 | 22022 | 602 | 1590 | 27001 | 12620 | |
Angola | Year 2003 | 9840 | 28190 | 5219 | 964 | 22530 | 1786 | 1466 | 27015 | 11186 | |
Angola | Year 2005 | 10242 | 29865 | 5742 | 1014 | 23066 | 297 | 1601 | 26962 | 12292 |
Read in data for the Maternal Mortality Rates in the World with d3.js. Logs the data in the console. This gist was not done in the real D3 'way.' This uses a JS loop that will add p elements for each item in the data set manually instead of using enter().
d3.csv("maternalMortalityRate.csv", function (mydata) {
//Everything involving the dataset should go here.
Assigment:
- fix any column names you think should/could be improved in the csv (and give it a new name)
- load your data in d3 using d3.csv, and in the function in d3.csv:
- add a property to the data set in javascript that is the sum of the years' values for each
- add a property to the data set in javascript that is the difference between 2010 and 2013
- sort the data by the new value that is the sum of the refugees
- draw your
's for each row of the fixed data set, using the sort order for sum of refugees (largest at the top)
OlderNewer