Map of Australia: React (hooks) + D3.js

Area SQKM by Australian Commonwealth Electoral Division

D3 map featuring cloropeth colors, tooltip, scroll zoom and map control


Getting and formating the data

In order to draw Australian map, we need the Geography Boundaries and we can get this shapefile from here:

Australian Bureau of Statistics:

Now we have the file  —  — we have to upload this file on

  • You will see the Australian map.
  • Now we will decrease the size simplifying and export as GeoJSON. We used 4% but you can use any value.

  • Next, we’ll visit the Ogre to Ogre (ogr2ogr) web client to convert our file to the correct EPSG:4326 coordinate system.
  • Upload the GeoJSON simplified

Now we have the GeoJSON formatted to work with d3.js.