|
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" |
|
"http://www.w3.org/TR/html4/loose.dtd"> |
|
<html> |
|
<head> |
|
<title>Demo of the tree layout in D3.js</title> |
|
<!-- source: http://blog.pixelingene.com/demos/d3_tree/ |
|
http://javadude.wordpress.com/2012/06/20/d3-js-from-tree-to-cluster-and-radial-projection/ |
|
http://bl.ocks.org/1249394--> |
|
<style> |
|
g.node { |
|
font-family: Verdana, Helvetica; |
|
font-size: 12px; |
|
font-weight: bold; |
|
} |
|
circle.node-dot { |
|
fill: lightsalmon; |
|
stroke: red; |
|
stroke-width: 1px; |
|
} |
|
|
|
path.link { |
|
fill: none; |
|
stroke: gray; |
|
} |
|
|
|
</style> |
|
</head> |
|
<body> |
|
|
|
<div id="tree-container"></div> |
|
<div id="viz"></div> |
|
|
|
<script type="text/javascript" src="../js/jquery-1.6.2.min.js"></script> |
|
<script type="text/javascript" src="../js/d3.min.js"></script> |
|
<script type="text/javascript" src="../js/d3.layout.min.js"></script> |
|
|
|
<script> |
|
/** |
|
* Created by JetBrains RubyMine. |
|
* User: pavanpodila |
|
* Date: 7/17/11 |
|
* Time: 4:30 PM |
|
* To change this template use File | Settings | File Templates. |
|
*/ |
|
|
|
var treeData = |
|
<?php |
|
// $json = file_get_children('naa-agift.json'); |
|
// $raw = json_decode($json); |
|
// echo $json; |
|
// print_r($raw); |
|
$raw = json_decode('[ |
|
"Home", |
|
"index.htm", |
|
[ |
|
"BUSINESS SUPPORT AND REGULATION", |
|
"000411.htm", |
|
[ |
|
"Association registration", |
|
"000396.htm" |
|
], |
|
[ |
|
"Business process auditing", |
|
"000413.htm" |
|
], |
|
[ |
|
"Business registration and licensing", |
|
"000414.htm" |
|
], |
|
[ |
|
"Business sponsorship", |
|
"001371.htm" |
|
], |
|
[ |
|
"Consumer protection", |
|
"000439.htm" |
|
], |
|
[ |
|
"Fair trading compliance", |
|
"000482.htm", |
|
[ |
|
"Prices surveillance", |
|
"000533.htm" |
|
], |
|
[ |
|
"Product safety", |
|
"000534.htm" |
|
], |
|
[ |
|
"Trade practices compliance", |
|
"000583.htm" |
|
] |
|
], |
|
[ |
|
"Financial institutions regulation", |
|
"000485.htm" |
|
], |
|
[ |
|
"Government procurement regulation", |
|
"000491.htm" |
|
], |
|
[ |
|
"Industry assistance schemes", |
|
"000499.htm" |
|
], |
|
[ |
|
"Industry development", |
|
"000500.htm" |
|
], |
|
[ |
|
"Insurance regulation", |
|
"000501.htm", |
|
[ |
|
"General insurance", |
|
"000489.htm" |
|
], |
|
[ |
|
"Life insurance", |
|
"000505.htm" |
|
] |
|
], |
|
[ |
|
"Professional accreditation", |
|
"000535.htm" |
|
], |
|
[ |
|
"Small business services", |
|
"000565.htm", |
|
[ |
|
"Small business advocacy", |
|
"000563.htm" |
|
], |
|
[ |
|
"Small business development", |
|
"000564.htm" |
|
] |
|
], |
|
[ |
|
"Stock market regulation", |
|
"000572.htm" |
|
] |
|
], |
|
[ |
|
"CIVIC INFRASTRUCTURE", |
|
"000424.htm", |
|
[ |
|
"Civic management", |
|
"000425.htm", |
|
[ |
|
"Architectural services", |
|
"000387.htm" |
|
], |
|
[ |
|
"Building approval services", |
|
"000406.htm" |
|
], |
|
[ |
|
"Building regulations and standards", |
|
"000408.htm" |
|
], |
|
[ |
|
"Engineering services", |
|
"000477.htm" |
|
], |
|
[ |
|
"Town planning", |
|
"000582.htm" |
|
] |
|
], |
|
[ |
|
"Energy supply", |
|
"000476.htm" |
|
], |
|
[ |
|
"Integrated services planning", |
|
"000503.htm" |
|
], |
|
[ |
|
"Public housing", |
|
"000536.htm", |
|
[ |
|
"Public housing construction", |
|
"000537.htm" |
|
], |
|
[ |
|
"Public housing design", |
|
"000538.htm" |
|
], |
|
[ |
|
"Public housing maintenance", |
|
"000540.htm" |
|
] |
|
], |
|
[ |
|
"Public land management", |
|
"000541.htm", |
|
[ |
|
"Burial ground management", |
|
"000410.htm" |
|
], |
|
[ |
|
"Cultural centre management", |
|
"000444.htm" |
|
], |
|
[ |
|
"Garden management", |
|
"000488.htm" |
|
], |
|
[ |
|
"Memorial maintenance", |
|
"000509.htm" |
|
], |
|
[ |
|
"Recreational park management", |
|
"000549.htm" |
|
], |
|
[ |
|
"Sporting facilities management", |
|
"000571.htm" |
|
] |
|
], |
|
[ |
|
"Regional development", |
|
"000552.htm" |
|
], |
|
[ |
|
"Transport network maintenance", |
|
"000586.htm" |
|
], |
|
[ |
|
"Waste management", |
|
"001349.htm" |
|
] |
|
], |
|
[ |
|
"COMMUNICATIONS", |
|
"000433.htm", |
|
[ |
|
"Advertising standards", |
|
"000381.htm" |
|
], |
|
[ |
|
"Broadcasting", |
|
"000403.htm", |
|
[ |
|
"Broadcasting standards", |
|
"000404.htm" |
|
], |
|
[ |
|
"Radio broadcasting", |
|
"000546.htm" |
|
], |
|
[ |
|
"Television broadcasting", |
|
"000580.htm" |
|
] |
|
], |
|
[ |
|
"Call centre administration", |
|
"000417.htm" |
|
], |
|
[ |
|
"Electronic commerce", |
|
"000468.htm", |
|
[ |
|
"Authentication", |
|
"000399.htm" |
|
], |
|
[ |
|
"Online transaction standards", |
|
"000526.htm" |
|
] |
|
], |
|
[ |
|
"Government media", |
|
"000490.htm" |
|
], |
|
[ |
|
"Information management standards", |
|
"000283.htm", |
|
[ |
|
"Data management", |
|
"000448.htm" |
|
], |
|
[ |
|
"Information dissemination", |
|
"000502.htm" |
|
], |
|
[ |
|
"Information technology standards", |
|
"000282.htm" |
|
] |
|
], |
|
[ |
|
"Media ownership regulation", |
|
"000508.htm" |
|
], |
|
[ |
|
"Postal services", |
|
"000530.htm", |
|
[ |
|
"Courier services", |
|
"000441.htm" |
|
], |
|
[ |
|
"Electronic postal services", |
|
"000469.htm" |
|
], |
|
[ |
|
"Retail postal services", |
|
"000554.htm" |
|
] |
|
], |
|
[ |
|
"Publishing", |
|
"000543.htm", |
|
[ |
|
"Electronic publishing", |
|
"000470.htm" |
|
], |
|
[ |
|
"Publishing standards", |
|
"000544.htm" |
|
], |
|
[ |
|
"Website development", |
|
"000591.htm" |
|
] |
|
], |
|
[ |
|
"Radio communication", |
|
"000547.htm", |
|
[ |
|
"Apparatus licensing", |
|
"000385.htm" |
|
], |
|
[ |
|
"Spectrum management", |
|
"000570.htm" |
|
] |
|
], |
|
[ |
|
"Satellite communication", |
|
"000560.htm" |
|
], |
|
[ |
|
"Telecommunications", |
|
"000578.htm", |
|
[ |
|
"Carriage service providers", |
|
"000420.htm" |
|
], |
|
[ |
|
"Carrier licensing", |
|
"000421.htm" |
|
], |
|
[ |
|
"Equipment licensing", |
|
"000480.htm" |
|
], |
|
[ |
|
"Mobile telephone services", |
|
"000516.htm" |
|
], |
|
[ |
|
"Telephone services", |
|
"000579.htm" |
|
] |
|
] |
|
], |
|
[ |
|
"COMMUNITY SERVICES", |
|
"000435.htm", |
|
[ |
|
"Accommodation services", |
|
"000377.htm", |
|
[ |
|
"Defence housing", |
|
"000458.htm" |
|
], |
|
[ |
|
"Emergency accommodation", |
|
"000471.htm" |
|
], |
|
[ |
|
"Public housing entitlements", |
|
"000539.htm" |
|
], |
|
[ |
|
"Refuge support", |
|
"000551.htm" |
|
] |
|
], |
|
[ |
|
"Community support", |
|
"000436.htm", |
|
[ |
|
"Adoption services", |
|
"000378.htm" |
|
], |
|
[ |
|
"Aged care services", |
|
"000382.htm" |
|
], |
|
[ |
|
"Child and youth support", |
|
"000422.htm" |
|
], |
|
[ |
|
"Child-care services", |
|
"000423.htm" |
|
], |
|
[ |
|
"Defence community programs", |
|
"000452.htm" |
|
], |
|
[ |
|
"Family reunion programs", |
|
"000483.htm" |
|
], |
|
[ |
|
"Veterans\" entitlements", |
|
"000587.htm" |
|
] |
|
], |
|
[ |
|
"Counselling services", |
|
"000440.htm" |
|
], |
|
[ |
|
"Emergency services", |
|
"000474.htm", |
|
[ |
|
"Ambulance services", |
|
"000384.htm" |
|
], |
|
[ |
|
"Emergency funding", |
|
"000472.htm" |
|
], |
|
[ |
|
"Firefighting services", |
|
"000487.htm" |
|
] |
|
], |
|
[ |
|
"Financial assistance", |
|
"000484.htm", |
|
[ |
|
"Benefits", |
|
"000402.htm" |
|
], |
|
[ |
|
"Income support schemes", |
|
"000494.htm" |
|
] |
|
], |
|
[ |
|
"Natural disasters", |
|
"000521.htm", |
|
[ |
|
"Disaster recovery", |
|
"000462.htm" |
|
], |
|
[ |
|
"Disaster relief", |
|
"000463.htm" |
|
] |
|
], |
|
[ |
|
"Rural community development", |
|
"000557.htm" |
|
], |
|
[ |
|
"Social justice and equity", |
|
"000566.htm" |
|
], |
|
[ |
|
"Transport access schemes", |
|
"000901.htm" |
|
] |
|
], |
|
[ |
|
"CULTURAL AFFAIRS", |
|
"000442.htm", |
|
[ |
|
"Arts development", |
|
"000391.htm", |
|
[ |
|
"Arts funding", |
|
"000393.htm" |
|
], |
|
[ |
|
"Arts incentive schemes", |
|
"000394.htm" |
|
], |
|
[ |
|
"Arts promotion", |
|
"000395.htm" |
|
] |
|
], |
|
[ |
|
"Collection access", |
|
"000427.htm", |
|
[ |
|
"Descriptive standards", |
|
"000461.htm" |
|
], |
|
[ |
|
"Finding aids development", |
|
"000486.htm" |
|
], |
|
[ |
|
"Reference services", |
|
"000550.htm" |
|
] |
|
], |
|
[ |
|
"Collection management", |
|
"000430.htm", |
|
[ |
|
"Artefact export regulation", |
|
"000390.htm" |
|
], |
|
[ |
|
"Collection accessioning", |
|
"000428.htm" |
|
], |
|
[ |
|
"Collection acquisition", |
|
"000429.htm" |
|
], |
|
[ |
|
"Collection storage", |
|
"000432.htm" |
|
], |
|
[ |
|
"Preservation services", |
|
"000532.htm" |
|
] |
|
], |
|
[ |
|
"Collection promotion", |
|
"000431.htm", |
|
[ |
|
"Exhibition programs", |
|
"000481.htm" |
|
], |
|
[ |
|
"Publicity programs", |
|
"000542.htm" |
|
] |
|
], |
|
[ |
|
"Cultural awards and scholarships", |
|
"000443.htm" |
|
], |
|
[ |
|
"Cultural festivals", |
|
"000445.htm" |
|
], |
|
[ |
|
"Cultural gifts programs", |
|
"000446.htm" |
|
], |
|
[ |
|
"Multicultural heritage promotion", |
|
"000518.htm", |
|
[ |
|
"Multicultural festivals", |
|
"000517.htm" |
|
], |
|
[ |
|
"Multicultural services", |
|
"000519.htm" |
|
] |
|
] |
|
], |
|
[ |
|
"DEFENCE", |
|
"000449.htm", |
|
[ |
|
"Australian Defence Forces", |
|
"000397.htm", |
|
[ |
|
"Air Force", |
|
"002266.htm" |
|
], |
|
[ |
|
"Army", |
|
"000388.htm" |
|
], |
|
[ |
|
"Badges and insignia", |
|
"000401.htm" |
|
], |
|
[ |
|
"Cadets", |
|
"000416.htm" |
|
], |
|
[ |
|
"Defence force commands", |
|
"000456.htm" |
|
], |
|
[ |
|
"Military bands", |
|
"000510.htm" |
|
], |
|
[ |
|
"Navy", |
|
"000524.htm" |
|
], |
|
[ |
|
"Reserves", |
|
"000553.htm" |
|
], |
|
[ |
|
"Roulettes", |
|
"000556.htm" |
|
] |
|
], |
|
[ |
|
"Defence estate management", |
|
"000454.htm" |
|
], |
|
[ |
|
"Defence force careers", |
|
"000455.htm", |
|
[ |
|
"Defence career development", |
|
"000450.htm" |
|
], |
|
[ |
|
"Military employment services", |
|
"000512.htm" |
|
] |
|
], |
|
[ |
|
"Defence strategic development", |
|
"000574.htm", |
|
[ |
|
"Defence efficiency review", |
|
"000453.htm" |
|
], |
|
[ |
|
"Defence reform program", |
|
"000460.htm" |
|
] |
|
], |
|
[ |
|
"Defence strategic policy", |
|
"000576.htm", |
|
[ |
|
"Strategic decisions", |
|
"000573.htm" |
|
], |
|
[ |
|
"Strategic planning", |
|
"000575.htm" |
|
] |
|
], |
|
[ |
|
"Defence strategic support", |
|
"000577.htm", |
|
[ |
|
"Capital equipment programs", |
|
"000419.htm" |
|
], |
|
[ |
|
"Defence industry", |
|
"000459.htm" |
|
], |
|
[ |
|
"Defence science and technology", |
|
"000905.htm" |
|
], |
|
[ |
|
"Logistics", |
|
"000506.htm" |
|
] |
|
], |
|
[ |
|
"Emergency management", |
|
"000473.htm", |
|
[ |
|
"Civil community assistance", |
|
"000426.htm" |
|
], |
|
[ |
|
"Disaster support", |
|
"000464.htm" |
|
] |
|
], |
|
[ |
|
"Military law", |
|
"001814.htm" |
|
], |
|
[ |
|
"Military operations", |
|
"000515.htm", |
|
[ |
|
"Australian theatre of war", |
|
"000398.htm" |
|
], |
|
[ |
|
"Military exercises", |
|
"000514.htm" |
|
], |
|
[ |
|
"Special operations", |
|
"000569.htm" |
|
], |
|
[ |
|
"Warfare", |
|
"000589.htm" |
|
] |
|
] |
|
], |
|
[ |
|
"EDUCATION AND TRAINING", |
|
"000467.htm", |
|
[ |
|
"Arts education", |
|
"000392.htm" |
|
], |
|
[ |
|
"Community education", |
|
"000434.htm", |
|
[ |
|
"Adult education programs", |
|
"000379.htm" |
|
], |
|
[ |
|
"Adult migrant education", |
|
"000380.htm" |
|
], |
|
[ |
|
"Road safety awareness", |
|
"000555.htm" |
|
] |
|
], |
|
[ |
|
"Curriculum development", |
|
"000447.htm" |
|
], |
|
[ |
|
"Early childhood education", |
|
"000466.htm" |
|
], |
|
[ |
|
"Military education and training", |
|
"000511.htm", |
|
[ |
|
"Army reserve training", |
|
"000389.htm" |
|
], |
|
[ |
|
"Defence college training", |
|
"000451.htm" |
|
] |
|
], |
|
[ |
|
"Overseas skills recognition", |
|
"000527.htm" |
|
], |
|
[ |
|
"School education", |
|
"000561.htm", |
|
[ |
|
"Discipline programs", |
|
"000465.htm" |
|
], |
|
[ |
|
"School transport regulation", |
|
"000562.htm" |
|
], |
|
[ |
|
"Special needs programs", |
|
"000568.htm" |
|
] |
|
], |
|
[ |
|
"Tertiary education", |
|
"000581.htm" |
|
], |
|
[ |
|
"Vocational education", |
|
"000588.htm", |
|
[ |
|
"Apprenticeship programs", |
|
"000386.htm" |
|
], |
|
[ |
|
"Hospital teaching programs", |
|
"000493.htm" |
|
], |
|
[ |
|
"Trainee programs", |
|
"000584.htm" |
|
], |
|
[ |
|
"Workplace training", |
|
"000595.htm" |
|
] |
|
] |
|
], |
|
[ |
|
"EMPLOYMENT", |
|
"000016.htm", |
|
[ |
|
"Human resources development", |
|
"000348.htm", |
|
[ |
|
"Occupational health and safety", |
|
"000355.htm" |
|
], |
|
[ |
|
"Recruitment programs", |
|
"000356.htm" |
|
], |
|
[ |
|
"Termination processes", |
|
"002103.htm" |
|
], |
|
[ |
|
"Workers compensation schemes", |
|
"000363.htm" |
|
], |
|
[ |
|
"Workplace discrimination monitoring", |
|
"000364.htm" |
|
], |
|
[ |
|
"Workplace equity and justice programs", |
|
"000365.htm" |
|
] |
|
], |
|
[ |
|
"Industrial awards and conditions", |
|
"000349.htm", |
|
[ |
|
"Award conditions", |
|
"000366.htm" |
|
], |
|
[ |
|
"Remuneration review", |
|
"000368.htm" |
|
] |
|
], |
|
[ |
|
"Labour market programs", |
|
"000347.htm", |
|
[ |
|
"Employment services marketing", |
|
"000351.htm" |
|
], |
|
[ |
|
"Job placement programs", |
|
"000352.htm" |
|
], |
|
[ |
|
"Job vacancy data management", |
|
"000353.htm" |
|
] |
|
], |
|
[ |
|
"Workplace agreement processes", |
|
"000350.htm", |
|
[ |
|
"Agreement bargaining processes", |
|
"002141.htm" |
|
], |
|
[ |
|
"Agreement dispute mediation", |
|
"000370.htm" |
|
], |
|
[ |
|
"Certified employment conditions", |
|
"000371.htm" |
|
], |
|
[ |
|
"Employment advocacy services", |
|
"000374.htm" |
|
] |
|
] |
|
], |
|
[ |
|
"ENVIRONMENT", |
|
"000478.htm", |
|
[ |
|
"Built environment", |
|
"000409.htm", |
|
[ |
|
"Building acoustics", |
|
"000405.htm" |
|
], |
|
[ |
|
"Building preservation", |
|
"000407.htm" |
|
] |
|
], |
|
[ |
|
"Climate information services", |
|
"000203.htm" |
|
], |
|
[ |
|
"Conservation programs", |
|
"000438.htm", |
|
[ |
|
"Endangered species protection", |
|
"000475.htm" |
|
], |
|
[ |
|
"Landcare programs", |
|
"000504.htm" |
|
], |
|
[ |
|
"Soil preservation programs", |
|
"000567.htm" |
|
] |
|
], |
|
[ |
|
"Environmental impact assessment", |
|
"000479.htm" |
|
], |
|
[ |
|
"Historic relic protection", |
|
"000492.htm" |
|
], |
|
[ |
|
"Marine life protection programs", |
|
"000507.htm" |
|
], |
|
[ |
|
"Natural heritage protection", |
|
"000522.htm", |
|
[ |
|
"National park management", |
|
"000520.htm" |
|
], |
|
[ |
|
"Nature reserve management", |
|
"000523.htm" |
|
], |
|
[ |
|
"Wilderness area management", |
|
"000593.htm" |
|
], |
|
[ |
|
"Wildlife sanctuary management", |
|
"000594.htm" |
|
] |
|
], |
|
[ |
|
"Oceans governance", |
|
"000525.htm" |
|
], |
|
[ |
|
"Pollutant prevention programs", |
|
"000529.htm" |
|
], |
|
[ |
|
"World heritage listings", |
|
"000596.htm" |
|
] |
|
], |
|
[ |
|
"FINANCE MANAGEMENT", |
|
"000001.htm", |
|
[ |
|
"Commonwealth State funding", |
|
"000017.htm" |
|
], |
|
[ |
|
"Currency", |
|
"000018.htm", |
|
[ |
|
"Counterfeiting control", |
|
"000027.htm" |
|
] |
|
], |
|
[ |
|
"Financial investment", |
|
"000021.htm", |
|
[ |
|
"Investment scheme regulation", |
|
"000031.htm" |
|
] |
|
], |
|
[ |
|
"Financial system management", |
|
"002302.htm", |
|
[ |
|
"Financial system monitoring", |
|
"002306.htm" |
|
], |
|
[ |
|
"Payments management", |
|
"002297.htm" |
|
] |
|
], |
|
[ |
|
"Fiscal policy", |
|
"000022.htm", |
|
[ |
|
"Public borrowing", |
|
"000032.htm" |
|
], |
|
[ |
|
"Public debt", |
|
"000033.htm" |
|
], |
|
[ |
|
"Public expenditure", |
|
"000034.htm" |
|
] |
|
], |
|
[ |
|
"Foreign investment control", |
|
"000030.htm" |
|
], |
|
[ |
|
"International monetary regulation", |
|
"000023.htm" |
|
], |
|
[ |
|
"Monetary policy", |
|
"000020.htm", |
|
[ |
|
"Exchange rates", |
|
"000028.htm" |
|
], |
|
[ |
|
"Inflation", |
|
"000029.htm" |
|
], |
|
[ |
|
"Interest rates", |
|
"002295.htm" |
|
] |
|
], |
|
[ |
|
"Resource management", |
|
"000024.htm", |
|
[ |
|
"Contract management", |
|
"000037.htm" |
|
], |
|
[ |
|
"Financial administration", |
|
"000035.htm" |
|
], |
|
[ |
|
"Financial budgeting", |
|
"000036.htm" |
|
] |
|
], |
|
[ |
|
"Retirement income", |
|
"000025.htm", |
|
[ |
|
"Asset assessment", |
|
"000038.htm" |
|
], |
|
[ |
|
"Retirement saving", |
|
"000039.htm" |
|
], |
|
[ |
|
"Superannuation regulation", |
|
"000040.htm" |
|
] |
|
], |
|
[ |
|
"Statistical analysis", |
|
"000019.htm" |
|
], |
|
[ |
|
"Taxation", |
|
"000026.htm", |
|
[ |
|
"Income assessment", |
|
"000041.htm" |
|
], |
|
[ |
|
"Revenue raising", |
|
"000042.htm" |
|
], |
|
[ |
|
"Taxation compliance", |
|
"000043.htm" |
|
] |
|
] |
|
], |
|
[ |
|
"GOVERNANCE", |
|
"000002.htm", |
|
[ |
|
"Civic celebrations", |
|
"000046.htm" |
|
], |
|
[ |
|
"Constitutional matters", |
|
"000048.htm", |
|
[ |
|
"Constitutional conventions", |
|
"000061.htm" |
|
], |
|
[ |
|
"Constitutional referenda", |
|
"000062.htm" |
|
] |
|
], |
|
[ |
|
"Electoral matters", |
|
"000049.htm", |
|
[ |
|
"Declaration of interests", |
|
"000063.htm" |
|
], |
|
[ |
|
"Election campaigning", |
|
"000064.htm" |
|
], |
|
[ |
|
"Electoral boundary assessment", |
|
"000065.htm" |
|
] |
|
], |
|
[ |
|
"Honours and awards programs", |
|
"000050.htm" |
|
], |
|
[ |
|
"Intergovernmental relations", |
|
"000052.htm", |
|
[ |
|
"Cross-border cooperation", |
|
"000067.htm" |
|
], |
|
[ |
|
"Intergovernment policy dissemination", |
|
"000069.htm" |
|
] |
|
], |
|
[ |
|
"Legislative drafting", |
|
"000053.htm", |
|
[ |
|
"Draft Bill amendment process", |
|
"000070.htm" |
|
], |
|
[ |
|
"Legislation review", |
|
"000071.htm" |
|
], |
|
[ |
|
"Preparation of legislative regulations", |
|
"000072.htm" |
|
] |
|
], |
|
[ |
|
"Official protocol", |
|
"000054.htm", |
|
[ |
|
"Ceremonial events and representation", |
|
"000073.htm" |
|
], |
|
[ |
|
"Head of Government protocol", |
|
"000074.htm" |
|
], |
|
[ |
|
"Official establishment management", |
|
"000075.htm" |
|
], |
|
[ |
|
"Official hospitality", |
|
"000076.htm" |
|
], |
|
[ |
|
"Official visits", |
|
"000077.htm" |
|
] |
|
], |
|
[ |
|
"Parliamentary chamber support", |
|
"000045.htm", |
|
[ |
|
"Hansard services", |
|
"000058.htm" |
|
], |
|
[ |
|
"Parliamentary papers", |
|
"000059.htm" |
|
], |
|
[ |
|
"Tabling of official documents", |
|
"000060.htm" |
|
] |
|
], |
|
[ |
|
"Parliamentary committee and member support", |
|
"000047.htm" |
|
], |
|
[ |
|
"Population census", |
|
"000044.htm", |
|
[ |
|
"Demographic surveys", |
|
"000055.htm" |
|
], |
|
[ |
|
"Household census", |
|
"000056.htm" |
|
], |
|
[ |
|
"Population distribution analysis", |
|
"000057.htm" |
|
] |
|
], |
|
[ |
|
"Public administration", |
|
"002290.htm", |
|
[ |
|
"Government auditing", |
|
"002291.htm" |
|
], |
|
[ |
|
"Public service", |
|
"002292.htm" |
|
], |
|
[ |
|
"Territories administration", |
|
"002293.htm" |
|
] |
|
], |
|
[ |
|
"Statistics", |
|
"002289.htm" |
|
] |
|
], |
|
[ |
|
"HEALTH CARE", |
|
"000003.htm", |
|
[ |
|
"Community health services", |
|
"000078.htm", |
|
[ |
|
"Clinical health services", |
|
"000087.htm" |
|
], |
|
[ |
|
"Health promotion", |
|
"000089.htm" |
|
], |
|
[ |
|
"Primary health care", |
|
"000090.htm" |
|
] |
|
], |
|
[ |
|
"Health insurance schemes", |
|
"000079.htm" |
|
], |
|
[ |
|
"Health protocol administration", |
|
"000080.htm", |
|
[ |
|
"Drugs and poisons regulation", |
|
"000091.htm" |
|
], |
|
[ |
|
"Food hygiene regulation", |
|
"000092.htm" |
|
], |
|
[ |
|
"Practitioner discipline", |
|
"000093.htm" |
|
], |
|
[ |
|
"Practitioner registration", |
|
"000095.htm" |
|
] |
|
], |
|
[ |
|
"Hospital services", |
|
"000081.htm", |
|
[ |
|
"Hospital administration", |
|
"000096.htm" |
|
], |
|
[ |
|
"Patient care", |
|
"000097.htm" |
|
], |
|
[ |
|
"Pharmaceutical and drug support", |
|
"000098.htm" |
|
] |
|
], |
|
[ |
|
"Medical research", |
|
"000083.htm", |
|
[ |
|
"Ethical compliance", |
|
"000099.htm" |
|
], |
|
[ |
|
"Medical aids regulation", |
|
"000100.htm" |
|
], |
|
[ |
|
"Medical research funding", |
|
"000101.htm" |
|
], |
|
[ |
|
"National referral laboratory services", |
|
"000102.htm" |
|
], |
|
[ |
|
"Population-based research", |
|
"000103.htm" |
|
] |
|
], |
|
[ |
|
"Public health services", |
|
"000084.htm", |
|
[ |
|
"Epidemiology", |
|
"000104.htm" |
|
], |
|
[ |
|
"Health disaster preparedness", |
|
"000106.htm" |
|
], |
|
[ |
|
"Health hazard prevention", |
|
"000105.htm" |
|
], |
|
[ |
|
"Medical quarantine services", |
|
"000108.htm" |
|
], |
|
[ |
|
"Notifiable disease management", |
|
"000109.htm" |
|
] |
|
], |
|
[ |
|
"Special needs services", |
|
"000085.htm", |
|
[ |
|
"Dental health services", |
|
"000111.htm" |
|
], |
|
[ |
|
"Independent living services", |
|
"000112.htm" |
|
], |
|
[ |
|
"Mental health services", |
|
"000113.htm" |
|
], |
|
[ |
|
"Residential services", |
|
"000114.htm" |
|
] |
|
], |
|
[ |
|
"Veterans\" health services", |
|
"000086.htm" |
|
] |
|
], |
|
[ |
|
"IMMIGRATION", |
|
"000004.htm", |
|
[ |
|
"Citizenship", |
|
"000115.htm", |
|
[ |
|
"Naturalisation assessment", |
|
"000121.htm" |
|
], |
|
[ |
|
"Presentation arrangements", |
|
"000122.htm" |
|
] |
|
], |
|
[ |
|
"Deportation", |
|
"000116.htm" |
|
], |
|
[ |
|
"Detention programs", |
|
"000117.htm" |
|
], |
|
[ |
|
"Migrant services", |
|
"000118.htm", |
|
[ |
|
"Interpreter services", |
|
"000123.htm" |
|
], |
|
[ |
|
"Migrant accommodation services", |
|
"000125.htm" |
|
], |
|
[ |
|
"Migrant settlement programs", |
|
"000126.htm" |
|
] |
|
], |
|
[ |
|
"Refugee services", |
|
"000119.htm" |
|
], |
|
[ |
|
"Travel authorisation", |
|
"000120.htm", |
|
[ |
|
"Permanent entry arrangements", |
|
"000127.htm" |
|
], |
|
[ |
|
"Temporary entry arrangements", |
|
"000128.htm" |
|
] |
|
] |
|
], |
|
[ |
|
"INDIGENOUS AFFAIRS", |
|
"002285.htm", |
|
[ |
|
"Indigenous cultural heritage", |
|
"000495.htm", |
|
[ |
|
"Cultural artefact repatriation", |
|
"001772.htm" |
|
] |
|
], |
|
[ |
|
"Indigenous enterprise development", |
|
"000496.htm" |
|
], |
|
[ |
|
"Indigenous health services", |
|
"000082.htm" |
|
], |
|
[ |
|
"Indigenous heritage conservation", |
|
"000497.htm" |
|
], |
|
[ |
|
"Indigenous reconciliation", |
|
"000051.htm" |
|
], |
|
[ |
|
"Indigenous welfare programs", |
|
"000498.htm" |
|
] |
|
], |
|
[ |
|
"INTERNATIONAL RELATIONS", |
|
"000005.htm", |
|
[ |
|
"Consular services", |
|
"000129.htm" |
|
], |
|
[ |
|
"Defence liaison", |
|
"000132.htm", |
|
[ |
|
"Defence attach�s", |
|
"000140.htm" |
|
], |
|
[ |
|
"Defence cooperation programs", |
|
"000141.htm" |
|
], |
|
[ |
|
"Defence personnel exchanges", |
|
"000142.htm" |
|
], |
|
[ |
|
"Military advisors", |
|
"000143.htm" |
|
] |
|
], |
|
[ |
|
"Diplomatic missions", |
|
"000130.htm" |
|
], |
|
[ |
|
"International affairs", |
|
"000131.htm", |
|
[ |
|
"Disarmament and arms control", |
|
"000137.htm" |
|
], |
|
[ |
|
"Nuclear safeguards", |
|
"000139.htm" |
|
] |
|
], |
|
[ |
|
"International treaties", |
|
"000133.htm", |
|
[ |
|
"Treaty administration", |
|
"001384.htm" |
|
] |
|
], |
|
[ |
|
"Overseas aid programs", |
|
"000134.htm", |
|
[ |
|
"Development assistance programs", |
|
"000146.htm" |
|
], |
|
[ |
|
"Overseas student scholarship programs", |
|
"000147.htm" |
|
] |
|
], |
|
[ |
|
"Overseas promotion", |
|
"000135.htm" |
|
], |
|
[ |
|
"Passport services", |
|
"000136.htm" |
|
] |
|
], |
|
[ |
|
"JUSTICE ADMINISTRATION", |
|
"000006.htm", |
|
[ |
|
"Administrative law", |
|
"000149.htm", |
|
[ |
|
"Administrative decision appeal", |
|
"000163.htm" |
|
], |
|
[ |
|
"Administrative decision review", |
|
"000164.htm" |
|
], |
|
[ |
|
"Censorship standards", |
|
"000165.htm" |
|
], |
|
[ |
|
"Copyright regulation", |
|
"000166.htm" |
|
], |
|
[ |
|
"Recordkeeping standards", |
|
"000167.htm" |
|
] |
|
], |
|
[ |
|
"Associations and corporate law", |
|
"000150.htm", |
|
[ |
|
"Bankruptcy proceedings", |
|
"000168.htm" |
|
], |
|
[ |
|
"Merger regulation", |
|
"000169.htm" |
|
] |
|
], |
|
[ |
|
"Civil law", |
|
"000151.htm", |
|
[ |
|
"Civil registration", |
|
"000170.htm" |
|
], |
|
[ |
|
"Conveyancing", |
|
"000171.htm" |
|
], |
|
[ |
|
"Dispute mediation programs", |
|
"000174.htm" |
|
], |
|
[ |
|
"Family law proceedings", |
|
"000172.htm" |
|
], |
|
[ |
|
"Probate applications", |
|
"000173.htm" |
|
] |
|
], |
|
[ |
|
"Commissions of inquiry", |
|
"000152.htm" |
|
], |
|
[ |
|
"Coronial law", |
|
"000153.htm" |
|
], |
|
[ |
|
"Court reporting", |
|
"000154.htm" |
|
], |
|
[ |
|
"Criminal law", |
|
"000155.htm" |
|
], |
|
[ |
|
"Human rights obligations", |
|
"000156.htm" |
|
], |
|
[ |
|
"Juvenile justice", |
|
"000157.htm" |
|
], |
|
[ |
|
"Legal aid services", |
|
"000158.htm" |
|
], |
|
[ |
|
"Local laws and ordinances", |
|
"000159.htm" |
|
], |
|
[ |
|
"Native title claims", |
|
"000160.htm", |
|
[ |
|
"Native title mediation programs", |
|
"000180.htm" |
|
], |
|
[ |
|
"Native title settlement negotiations", |
|
"000181.htm" |
|
] |
|
], |
|
[ |
|
"Privacy guideline monitoring", |
|
"000161.htm" |
|
], |
|
[ |
|
"Prosecution services", |
|
"000162.htm" |
|
] |
|
], |
|
[ |
|
"MARITIME SERVICES", |
|
"000007.htm", |
|
[ |
|
"Cargo control", |
|
"000198.htm" |
|
], |
|
[ |
|
"Harbour management", |
|
"000183.htm" |
|
], |
|
[ |
|
"Marina management", |
|
"000184.htm" |
|
], |
|
[ |
|
"Navigation", |
|
"000185.htm", |
|
[ |
|
"Charting sea lanes", |
|
"000191.htm" |
|
], |
|
[ |
|
"Light station maintenance", |
|
"000192.htm" |
|
], |
|
[ |
|
"Navigation systems development", |
|
"000193.htm" |
|
] |
|
], |
|
[ |
|
"Pilotage management", |
|
"000182.htm" |
|
], |
|
[ |
|
"Port regulation", |
|
"001471.htm" |
|
], |
|
[ |
|
"Sea passengers", |
|
"001487.htm" |
|
], |
|
[ |
|
"Search and rescue", |
|
"000187.htm", |
|
[ |
|
"Rescue coordination", |
|
"000194.htm" |
|
], |
|
[ |
|
"Search technology development", |
|
"000195.htm" |
|
] |
|
], |
|
[ |
|
"Ship personnel", |
|
"000188.htm", |
|
[ |
|
"Personnel safety standards", |
|
"000196.htm" |
|
], |
|
[ |
|
"Pilot licensing", |
|
"000197.htm" |
|
] |
|
], |
|
[ |
|
"Ship safety", |
|
"000189.htm", |
|
[ |
|
"Seaworthiness", |
|
"000201.htm" |
|
], |
|
[ |
|
"Ship commissioning", |
|
"000199.htm" |
|
], |
|
[ |
|
"Ship inspection", |
|
"000200.htm" |
|
] |
|
] |
|
], |
|
[ |
|
"NATURAL RESOURCES", |
|
"000009.htm", |
|
[ |
|
"Crown land administration", |
|
"000218.htm" |
|
], |
|
[ |
|
"Energy resources", |
|
"001451.htm", |
|
[ |
|
"Fossil fuel management", |
|
"000226.htm" |
|
], |
|
[ |
|
"Renewable energy development", |
|
"000227.htm" |
|
] |
|
], |
|
[ |
|
"Land use planning", |
|
"000220.htm", |
|
[ |
|
"Land use zoning", |
|
"001429.htm" |
|
] |
|
], |
|
[ |
|
"Land valuation", |
|
"000222.htm" |
|
], |
|
[ |
|
"Mineral resources", |
|
"000223.htm", |
|
[ |
|
"Land rehabilitation programs", |
|
"000231.htm" |
|
], |
|
[ |
|
"Mining regulations", |
|
"000232.htm" |
|
] |
|
], |
|
[ |
|
"Pollution emission control", |
|
"000224.htm" |
|
], |
|
[ |
|
"Water resources", |
|
"000225.htm", |
|
[ |
|
"Water conservation plans", |
|
"000233.htm" |
|
], |
|
[ |
|
"Water quality monitoring", |
|
"000234.htm" |
|
], |
|
[ |
|
"Water usage management", |
|
"000235.htm" |
|
], |
|
[ |
|
"Waterway management", |
|
"000236.htm" |
|
] |
|
] |
|
], |
|
[ |
|
"PRIMARY INDUSTRIES", |
|
"000008.htm", |
|
[ |
|
"Chemical and pesticide regulation", |
|
"000202.htm" |
|
], |
|
[ |
|
"Marine and rural regulation", |
|
"000204.htm", |
|
[ |
|
"Agricultural industry", |
|
"000208.htm" |
|
], |
|
[ |
|
"Fisheries industry", |
|
"000209.htm" |
|
], |
|
[ |
|
"Food quality assurance", |
|
"000213.htm" |
|
], |
|
[ |
|
"Forestry industry", |
|
"000210.htm" |
|
] |
|
], |
|
[ |
|
"Marine and rural support", |
|
"000205.htm", |
|
[ |
|
"Aquaculture industry", |
|
"000212.htm" |
|
], |
|
[ |
|
"Horticultural industry", |
|
"000214.htm" |
|
], |
|
[ |
|
"Pastoral industry", |
|
"000215.htm" |
|
], |
|
[ |
|
"Silvicultural industry", |
|
"000216.htm" |
|
], |
|
[ |
|
"Viticultural industry", |
|
"000217.htm" |
|
] |
|
], |
|
[ |
|
"Quarantine", |
|
"000211.htm" |
|
], |
|
[ |
|
"Rural field day promotion", |
|
"000206.htm" |
|
], |
|
[ |
|
"Rural partnership programs", |
|
"000207.htm" |
|
] |
|
], |
|
[ |
|
"SCIENCE", |
|
"000010.htm", |
|
[ |
|
"Agricultural sciences", |
|
"000237.htm" |
|
], |
|
[ |
|
"Animal and veterinary sciences", |
|
"000238.htm" |
|
], |
|
[ |
|
"Applied sciences", |
|
"000239.htm", |
|
[ |
|
"Engineering and technology sciences", |
|
"000246.htm" |
|
], |
|
[ |
|
"Weights and measures standards", |
|
"000247.htm" |
|
] |
|
], |
|
[ |
|
"Biological sciences", |
|
"000240.htm", |
|
[ |
|
"Biochemistry", |
|
"000248.htm" |
|
], |
|
[ |
|
"Biodiversity preservation", |
|
"000249.htm" |
|
], |
|
[ |
|
"Biotechnology development", |
|
"000250.htm" |
|
], |
|
[ |
|
"Botany", |
|
"000251.htm" |
|
], |
|
[ |
|
"Entomology", |
|
"000252.htm" |
|
], |
|
[ |
|
"Genetic engineering", |
|
"000253.htm" |
|
], |
|
[ |
|
"Physiology", |
|
"000254.htm" |
|
] |
|
], |
|
[ |
|
"Earth sciences", |
|
"000241.htm", |
|
[ |
|
"Atmospheric sciences", |
|
"000255.htm" |
|
], |
|
[ |
|
"Hydrology", |
|
"000256.htm" |
|
], |
|
[ |
|
"Mineral exploration", |
|
"000257.htm" |
|
], |
|
[ |
|
"Oceanography", |
|
"000258.htm" |
|
], |
|
[ |
|
"Seismology", |
|
"000259.htm" |
|
] |
|
], |
|
[ |
|
"Mathematical sciences", |
|
"000242.htm" |
|
], |
|
[ |
|
"Medical and health sciences", |
|
"001229.htm" |
|
], |
|
[ |
|
"Physical sciences", |
|
"000244.htm", |
|
[ |
|
"Astronomical sciences", |
|
"000260.htm" |
|
], |
|
[ |
|
"Atomic and molecular sciences", |
|
"000261.htm" |
|
], |
|
[ |
|
"Nuclear sciences", |
|
"000262.htm" |
|
] |
|
], |
|
[ |
|
"Spatial information research", |
|
"000245.htm" |
|
] |
|
], |
|
[ |
|
"SECURITY", |
|
"000011.htm", |
|
[ |
|
"Corrective services", |
|
"000263.htm", |
|
[ |
|
"Community based corrections", |
|
"000270.htm" |
|
], |
|
[ |
|
"Detention centre management", |
|
"000271.htm" |
|
] |
|
], |
|
[ |
|
"External security", |
|
"000264.htm", |
|
[ |
|
"Peacekeeping forces", |
|
"000273.htm" |
|
] |
|
], |
|
[ |
|
"Information security", |
|
"000265.htm" |
|
], |
|
[ |
|
"Intelligence", |
|
"000266.htm", |
|
[ |
|
"Forensic analysis", |
|
"000275.htm" |
|
], |
|
[ |
|
"Intelligence liaison", |
|
"001159.htm" |
|
], |
|
[ |
|
"Intelligence support", |
|
"000277.htm" |
|
] |
|
], |
|
[ |
|
"Law enforcement", |
|
"000267.htm", |
|
[ |
|
"Community policing", |
|
"000278.htm" |
|
], |
|
[ |
|
"Criminology", |
|
"000279.htm" |
|
], |
|
[ |
|
"Police administration", |
|
"000280.htm" |
|
], |
|
[ |
|
"Protective services", |
|
"000281.htm" |
|
] |
|
], |
|
[ |
|
"National security", |
|
"001548.htm", |
|
[ |
|
"Coastal surveillance", |
|
"000269.htm" |
|
] |
|
] |
|
], |
|
[ |
|
"SPORT AND RECREATION", |
|
"000012.htm", |
|
[ |
|
"Caravan and camping services", |
|
"000284.htm" |
|
], |
|
[ |
|
"Community recreational programs", |
|
"000285.htm", |
|
[ |
|
"Gambling support services", |
|
"000290.htm" |
|
], |
|
[ |
|
"Public fitness promotion", |
|
"000291.htm" |
|
], |
|
[ |
|
"Social club support", |
|
"000292.htm" |
|
], |
|
[ |
|
"Volunteer support programs", |
|
"000293.htm" |
|
] |
|
], |
|
[ |
|
"Gaming industry regulation", |
|
"000286.htm" |
|
], |
|
[ |
|
"Park and reserve services", |
|
"000289.htm" |
|
], |
|
[ |
|
"Sport and fitness development", |
|
"000287.htm", |
|
[ |
|
"Athlete scholarship programs", |
|
"000295.htm" |
|
], |
|
[ |
|
"Fundraising and donation schemes", |
|
"000296.htm" |
|
], |
|
[ |
|
"Games administration", |
|
"000297.htm" |
|
], |
|
[ |
|
"Games promotion", |
|
"000298.htm" |
|
], |
|
[ |
|
"Sporting grants administration", |
|
"000299.htm" |
|
] |
|
], |
|
[ |
|
"Sports drugs monitoring", |
|
"000288.htm", |
|
[ |
|
"Doping detection research", |
|
"000300.htm" |
|
] |
|
] |
|
], |
|
[ |
|
"TOURISM", |
|
"000013.htm", |
|
[ |
|
"Tourism industry development", |
|
"000301.htm" |
|
], |
|
[ |
|
"Tourist event promotion", |
|
"000302.htm", |
|
[ |
|
"Advertising campaigns", |
|
"000305.htm" |
|
] |
|
], |
|
[ |
|
"Travel missions", |
|
"000303.htm" |
|
] |
|
], |
|
[ |
|
"TRADE", |
|
"000014.htm", |
|
[ |
|
"Export regulation", |
|
"000311.htm", |
|
[ |
|
"Export promotion", |
|
"000320.htm" |
|
], |
|
[ |
|
"Prohibited export control", |
|
"000321.htm" |
|
] |
|
], |
|
[ |
|
"Import regulation", |
|
"000312.htm", |
|
[ |
|
"Prohibited import control", |
|
"000323.htm" |
|
], |
|
[ |
|
"Tariff regulation", |
|
"000322.htm" |
|
] |
|
], |
|
[ |
|
"Intellectual property management", |
|
"000910.htm", |
|
[ |
|
"Copyright registration", |
|
"000308.htm" |
|
], |
|
[ |
|
"Design registration", |
|
"000310.htm" |
|
], |
|
[ |
|
"Patent registration", |
|
"000315.htm" |
|
], |
|
[ |
|
"Trademark registration", |
|
"000318.htm" |
|
] |
|
], |
|
[ |
|
"International trade agreements", |
|
"000313.htm" |
|
], |
|
[ |
|
"Interstate trade agreements", |
|
"000314.htm" |
|
], |
|
[ |
|
"Trade development programs", |
|
"000316.htm" |
|
], |
|
[ |
|
"Trade expositions", |
|
"000317.htm" |
|
] |
|
], |
|
[ |
|
"TRANSPORT", |
|
"000015.htm", |
|
[ |
|
"Air transport", |
|
"000324.htm", |
|
[ |
|
"Air transport safety", |
|
"000332.htm" |
|
], |
|
[ |
|
"Aircraft standards", |
|
"000330.htm" |
|
], |
|
[ |
|
"Airport services", |
|
"000331.htm" |
|
] |
|
], |
|
[ |
|
"Freight movement regulation", |
|
"000325.htm" |
|
], |
|
[ |
|
"Passenger services", |
|
"000326.htm" |
|
], |
|
[ |
|
"Rail transport", |
|
"000327.htm", |
|
[ |
|
"Rail harmonisation standards", |
|
"000333.htm" |
|
], |
|
[ |
|
"Rail land acquisition regulation", |
|
"000336.htm" |
|
], |
|
[ |
|
"Rail transport safety", |
|
"000337.htm" |
|
], |
|
[ |
|
"Railway maintenance", |
|
"000338.htm" |
|
], |
|
[ |
|
"Rolling stock regulation", |
|
"000339.htm" |
|
] |
|
], |
|
[ |
|
"Road transport", |
|
"000328.htm", |
|
[ |
|
"Driving licences administration", |
|
"000340.htm" |
|
], |
|
[ |
|
"Road surface maintenance", |
|
"000341.htm" |
|
], |
|
[ |
|
"Road traffic regulation", |
|
"000342.htm" |
|
], |
|
[ |
|
"Road transport safety", |
|
"000343.htm" |
|
], |
|
[ |
|
"Vehicle registration", |
|
"000344.htm" |
|
], |
|
[ |
|
"Vehicle standards", |
|
"000345.htm" |
|
] |
|
], |
|
[ |
|
"Transport infrastructure development", |
|
"000329.htm" |
|
] |
|
] |
|
]'); |
|
class ArrayUtil |
|
{ |
|
public static function FilterRecursive(Array $source, $fn) |
|
{ |
|
$result = array(); |
|
foreach ($source as $key => $value) |
|
{ |
|
if (is_array($value)) |
|
{ |
|
$result[$key] = self::FilterRecursive($value, $fn); |
|
continue; |
|
} |
|
if ($fn($key, $value)) |
|
{ |
|
$result[$key] = $value; // KEEP |
|
continue; |
|
} |
|
} |
|
return $result; |
|
} |
|
public static function DoRecursive(Array $source) |
|
{ |
|
$result = array(); |
|
foreach ($source as $key => $value) |
|
{ |
|
if (is_array($value)) |
|
{ |
|
$result["children"][] = self::DoRecursive($value); |
|
|
|
} else { |
|
$result["name"] = $value; // KEEP |
|
|
|
} |
|
} |
|
return $result; |
|
} |
|
} |
|
|
|
// EXAMPLE ANONYMOUS CALLBACK FUNCTION |
|
$fn = function ($key, $value) |
|
{ |
|
if (strpos($value, '.htm') !== FALSE) |
|
{ |
|
return FALSE; // DROP |
|
} |
|
return TRUE; // KEEP |
|
}; |
|
|
|
|
|
$postFilter = ArrayUtil::FilterRecursive($raw, $fn); |
|
$postWrangle = ArrayUtil::DoRecursive($postFilter); |
|
|
|
echo json_encode($postWrangle); |
|
?> |
|
; |
|
// Create a svg canvas |
|
var vis = d3.select("#viz").append("svg:svg") |
|
.attr("width", 1400) |
|
.attr("height", 1400) |
|
.append("svg:g") |
|
.attr("transform", "translate(450, 450)"); |
|
|
|
// Create a cluster "canvas" |
|
var cluster = d3.layout.cluster() |
|
.size([500,500]); |
|
|
|
var diagonal = d3.svg.diagonal.radial() |
|
.projection(function(d) { return [d.y, d.x / 180 * Math.PI]; }); |
|
|
|
var nodes = cluster.nodes(treeData); |
|
var links = cluster.links(nodes); |
|
|
|
var link = vis.selectAll("pathlink") |
|
.data(links) |
|
.enter().append("svg:path") |
|
.attr("class", "link") |
|
.attr("d", diagonal) |
|
|
|
var node = vis.selectAll("g.node") |
|
.data(nodes) |
|
.enter().append("svg:g") |
|
.attr("transform", function(d) { return "rotate(" + (d.x - 90) + ")translate(" + d.y + ")"; }) |
|
|
|
// Add the dot at every node |
|
node.append("svg:circle") |
|
.attr("r", 3.5); |
|
|
|
node.append("svg:text") |
|
.attr("dx", function(d) { return d.x < 180 ? 8 : -8; }) |
|
.attr("dy", ".31em") |
|
.attr("text-anchor", function(d) { return d.x < 180 ? "start" : "end"; }) |
|
.attr("transform", function(d) { return d.x < 180 ? null : "rotate(180)"; }) |
|
.text(function(d) { return d.name; }); |
|
|
|
// alt |
|
|
|
function visit(parent, visitFn, childrenFn) |
|
{ |
|
if (!parent) return; |
|
|
|
visitFn(parent); |
|
|
|
var children = childrenFn(parent); |
|
if (children) { |
|
var count = children.length; |
|
for (var i = 0; i < count; i++) { |
|
visit(children[i], visitFn, childrenFn); |
|
} |
|
} |
|
} |
|
|
|
function buildTree(containerName, customOptions) |
|
{ |
|
// build the options object |
|
var options = $.extend({ |
|
nodeRadius: 5, fontSize: 12 |
|
}, customOptions); |
|
|
|
|
|
// Calculate total nodes, max label length |
|
var totalNodes = 0; |
|
var maxLabelLength = 0; |
|
visit(treeData, function(d) |
|
{ |
|
totalNodes++; |
|
maxLabelLength = Math.max(d.name.length, maxLabelLength); |
|
}, function(d) |
|
{ |
|
return d.children && d.children.length > 0 ? d.children : null; |
|
}); |
|
|
|
// size of the diagram |
|
var size = { width:$(containerName).outerWidth(), height: totalNodes * 15}; |
|
|
|
var tree = d3.layout.tree() |
|
.sort(null) |
|
.size([size.height, size.width - maxLabelLength*options.fontSize]) |
|
.children(function(d) |
|
{ |
|
return (!d.children || d.children.length === 0) ? null : d.children; |
|
}); |
|
|
|
var nodes = tree.nodes(treeData); |
|
var links = tree.links(nodes); |
|
|
|
|
|
/* |
|
<svg> |
|
<g class="container" /> |
|
</svg> |
|
*/ |
|
var layoutRoot = d3.select(containerName) |
|
.append("svg:svg").attr("width", size.width).attr("height", size.height) |
|
.append("svg:g") |
|
.attr("class", "container") |
|
.attr("transform", "translate(" + maxLabelLength + ",0)"); |
|
|
|
|
|
// Edges between nodes as a <path class="link" /> |
|
var link = d3.svg.diagonal() |
|
.projection(function(d) |
|
{ |
|
return [d.y, d.x]; |
|
}); |
|
|
|
|
|
layoutRoot.selectAll("path.link") |
|
.data(links) |
|
.enter() |
|
.append("svg:path") |
|
.attr("class", "link") |
|
.attr("d", link); |
|
|
|
|
|
/* |
|
Nodes as |
|
<g class="node"> |
|
<circle class="node-dot" /> |
|
<text /> |
|
</g> |
|
*/ |
|
var nodeGroup = layoutRoot.selectAll("g.node") |
|
.data(nodes) |
|
.enter() |
|
.append("svg:g") |
|
.attr("class", "node") |
|
.attr("transform", function(d) |
|
{ |
|
return "translate(" + d.y + "," + d.x + ")"; |
|
}); |
|
|
|
nodeGroup.append("svg:circle") |
|
.attr("class", "node-dot") |
|
.attr("r", options.nodeRadius); |
|
|
|
nodeGroup.append("svg:text") |
|
.attr("text-anchor", function(d) |
|
{ |
|
return d.children ? "end" : "start"; |
|
}) |
|
.attr("dx", function(d) |
|
{ |
|
var gap = 2 * options.nodeRadius; |
|
return d.children ? -gap : gap; |
|
}) |
|
.attr("dy", 3) |
|
.text(function(d) |
|
{ |
|
return d.name; |
|
}); |
|
|
|
} |
|
$(function(){ |
|
buildTree("#tree-container"); |
|
}); |
|
</script> |
|
|
|
|
|
</body> |
|
</html> |