This is a sankey diagram made by Google Chart.
Last active
July 10, 2019 05:59
-
-
Save sabrinamochi/9cbebf8a0bb6f620ee894a2f027c147c to your computer and use it in GitHub Desktop.
Taiwan Gov Money
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> | |
<link rel="stylesheet" href="style.css"> | |
<style> | |
.source { | |
position: absolute; | |
top: 560px; | |
} | |
</style> | |
</head> | |
<body> | |
<h1> How Taiwnese Governemnt Received and Spent the Money Last Year? </h1> | |
<p></p> | |
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> | |
<div id="sankey_multiple" style="width: 650px; height: 280px;"></div> | |
<script type="text/javascript"> | |
google.charts.load("current", { | |
packages: ["sankey"] | |
}); | |
google.charts.setOnLoadCallback(drawChart); | |
function drawChart() { | |
var data = new google.visualization.DataTable(); | |
data.addColumn('string', 'From'); | |
data.addColumn('string', 'To'); | |
data.addColumn('number', 'Value'); | |
data.addRows( | |
[ | |
['Customs Duties', 'Total Receipts', 120056787], | |
['Income Tax', 'Total Receipts', 961790995], | |
['Commodity Tax', 'Total Receipts', 162100284], | |
['Securities Transaction Tax', 'Total Receipts', 101170665], | |
['Business Tax', 'Total Receipts', 239317168], | |
['Other Taxes', 'Total Receipts', 54781019], | |
['Fines & Indemnities', 'Total Receipts', 35326407], | |
['Fees', 'Total Receipts', 61725313], | |
['Public Properties', 'Total Receipts', 29601712], | |
['Revenues and Surplus from Public Enterprises', 'Total Receipts', 238257217], | |
['Other Income', 'Total Receipts', 13608072], | |
['Total Receipts', 'Surplus', 108023731], | |
['Total Receipts', 'Total Spending', 1909711908], | |
['Total Spending', 'General Administration', 185065504], | |
['Total Spending', 'National Defense', 313741616], | |
['Total Spending', 'Education, Science & Culture', 386911647], | |
['Total Spending', 'Economic Development', 233095949], | |
['Total Spending', 'Social Welfare', 487377072], | |
['Total Spending', | |
'Community Development & Environmental Protection', | |
18003496 | |
], | |
['Total Spending', 'Retirement and Condolence', 127649826], | |
['Total Spending', 'Obligations', 100724972], | |
['Total Spending', 'Aid', 52308130], | |
['Total Spending', 'Others', 4833696] | |
]); | |
// Set chart options | |
var options = { | |
width: 1200, | |
height: 500 | |
}; | |
// Instantiate and draw our chart, passing in some options. | |
var chart = new google.visualization.Sankey(document.getElementById('sankey_multiple')); | |
chart.draw(data, options); | |
} | |
</script> | |
<a href='http://web02.mof.gov.tw/njswww/WebProxy.aspx?sys=100&funid=defjspf2' class='source'>Data Source: Ministry of Finance, | |
Taiwan</a> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment