← All datasets

National Flags

Every national flag as data: 200 sovereign-state flags in one free CSV download, computed by pixel-counting each country's public-domain Wikimedia Commons flag render against the same deterministic color families the Crayola Colors dataset uses. Rows carry the number of colors covering at least 5 percent of the flag (the tricolor is the mode by test, and France splits exactly 33-33-33), the dominant color with its share (Japan is 81 percent white), exact red, white and blue percentages, Has flags for the seven big families (red flies on about three quarters of the world's flags by test, orange on barely a dozen), the aspect ratio snapped to the traditional labels where 2:3 rules, 1:2 follows, Switzerland is square, the United States keeps its odd 10:19, Qatar stretches to 11:28 and Nepal's double pennant lands honestly in Nonstandard, plus the flag adoption year from Wikidata (Denmark oldest, South Sudan and friends newest) and the ISO code that joins the Countries topic. Open to analysis of color geopolitics, tricolor fashion by independence era, aspect-ratio families, and whether neighbors share palettes. Eleven acceptance tests, one enforcing the 25 percent fill rule on every column.
197 rows 1 file last pulled 2026-11-13
Where would you start?
Pick a question, or ask your own and answer it; publish what you find as an insight. The same question can carry many insights from different angles.
  • Which colors and symbols dominate national flags by region?
  • How do flag adoption dates cluster with independence waves?
  • Which flags changed most recently and why?
National Flags 197 rows × 20 columns
CountryISO2Colors_CountDominant_ColorDominant_PctRed_PctWhite_PctBlue_PctHas_RedHas_WhiteHas_BlueHas_GreenHas_YellowHas_BlackHas_OrangeAspect_RatioAspect_LabelAdoption_YearWikidata_IDFlag_Image_URL

Questions and answers

What is the National Flags dataset?

Every national flag as data: 200 sovereign-state flags in one free CSV download, computed by pixel-counting each country's public-domain Wikimedia Commons flag render against the same deterministic color families the Crayola Colors dataset uses. Rows carry the number of colors covering at least 5 percent of the flag (the tricolor is the mode by test, and France splits exactly 33-33-33), the dominant color with its share (Japan is 81 percent white), exact red, white and blue percentages, Has flags for the seven big families (red flies on about three quarters of the world's flags by test, orange on barely a dozen), the aspect ratio snapped to the traditional labels where 2:3 rules, 1:2 follows, Switzerland is square, the United States keeps its odd 10:19, Qatar stretches to 11:28 and Nepal's double pennant lands honestly in Nonstandard, plus the flag adoption year from Wikidata (Denmark oldest, South Sudan and friends newest) and the ISO code that joins the Countries topic. Open to analysis of color geopolitics, tricolor fashion by independence era, aspect-ratio families, and whether neighbors share palettes. Eleven acceptance tests, one enforcing the 25 percent fill rule on every column.

How big is the National Flags dataset?

197 rows in one CSV file, with 20 columns in total: Country, ISO2, Colors_Count, Dominant_Color, Dominant_Pct, Red_Pct, White_Pct, Blue_Pct, Has_Red, Has_White, Has_Blue, Has_Green, Has_Yellow, Has_Black, Has_Orange, Aspect_Ratio, Aspect_Label, Adoption_Year, Wikidata_ID, Flag_Image_URL.

Where does the data come from?

It is built by programmatically scraping wikidata.org, last pulled on 2026-11-13. Datasets are versioned; older versions stay downloadable.

Is the dataset free to download?

Yes. Every CodeSights dataset is completely free as a CSV download; a free account is all it takes. Anyone can preview the data without signing in.

Can I see the code that built this dataset?

Yes. The exact Python scraper that built it is viewable on the dataset page by any signed-in member, so every number is reproducible.

Can the data contain errors?

Automated scraping leaves room for error and the underlying sources change over time, so no version is guaranteed accurate or complete. If a number matters, verify it against the original source.

Browse every free dataset on CodeSights