About the project
Built to answer a real Freelancer brief to the letter: one self-contained SVG of every country and its first-level regions, each shape clickable, a chart opening inside the SVG from external JSON, and a blank HTML page as the acceptance test. The borders are Natural Earth’s, simplified with mapshaper until the whole world fits in 1.3 MB (417 KB compressed) while every one of the 4,859 shapes keeps a unique ID: ISO 3166-1 for countries, ISO 3166-2 for regions, and Natural Earth’s own code for the 349 without one. The charts are real numbers, not filler: World Bank population, GDP per capita and life expectancy for 217 economies, and OpenDOSM’s figures for all 16 Malaysian states, each fetched by a build script and credited on the page, with the client’s sample JSON kept alongside as clearly labelled mock data. Regions with no figures of their own show their country’s, and say so. The chart panel is drawn in screen pixels, so it stays readable at any zoom; the map pans and zooms, works from the keyboard (Tab in, arrows to move, Enter to open, Esc to close) and respects reduced motion. It runs with no libraries, and a 97-check Playwright run passed on the live site with zero console errors in Chrome, Firefox and WebKit.
