ation', 'upright')
        }

        d3.json('xinjiang.json').then(data => {
            root = d3.hierarchy(data);
            // alternatively, we can set size of each node; 
            // root = d3.tree().nodeSize([30, width / (root.height + 1)])(root);
            root = d3.tree().size([innerWidth, innerHeight])(root);
            render(root);
        });

    </script>
</body>

</html>