WolframAlpha.com
WolframCloud.com
All Sites & Public Resources...
Products & Services
Wolfram|One
Mathematica
Wolfram|Alpha Notebook Edition
Programming Lab
Finance Platform
SystemModeler
Wolfram Player
Wolfram Engine
WolframScript
Enterprise Private Cloud
Enterprise Mathematica
Wolfram|Alpha Appliance
Enterprise Solutions
Corporate Consulting
Technical Consulting
Wolfram|Alpha Business Solutions
Resource System
Data Repository
Neural Net Repository
Function Repository
Wolfram|Alpha
Wolfram|Alpha Pro
Problem Generator
API
Data Drop
Products for Education
Mobile Apps
Wolfram Player
Wolfram Cloud App
Wolfram|Alpha for Mobile
Wolfram|Alpha-Powered Apps
Services
Paid Project Support
Wolfram U
Summer Programs
All Products & Services »
Technologies
Wolfram Language
Revolutionary knowledge-based programming language.
Wolfram Cloud
Central infrastructure for Wolfram's cloud products & services.
Wolfram Science
Technology-enabling science of the computational universe.
Wolfram Notebooks
The preeminent environment for any technical workflows.
Wolfram Engine
Software engine implementing the Wolfram Language.
Wolfram Natural Language Understanding System
Knowledge-based broadly deployed natural language.
Wolfram Data Framework
Semantic framework for real-world data.
Wolfram Universal Deployment System
Instant deployment across cloud, desktop, mobile, and more.
Wolfram Knowledgebase
Curated computable knowledge powering Wolfram|Alpha.
All Technologies »
Solutions
Engineering, R&D
Aerospace & Defense
Chemical Engineering
Control Systems
Electrical Engineering
Image Processing
Industrial Engineering
Mechanical Engineering
Operations Research
More...
Finance, Statistics & Business Analysis
Actuarial Sciences
Bioinformatics
Data Science
Econometrics
Financial Risk Management
Statistics
More...
Education
All Solutions for Education
Trends
Machine Learning
Multiparadigm Data Science
Internet of Things
High-Performance Computing
Hackathons
Software & Web
Software Development
Authoring & Publishing
Interface Development
Web Development
Sciences
Astronomy
Biology
Chemistry
More...
All Solutions »
Learning & Support
Learning
Wolfram Language Documentation
Fast Introduction for Programmers
Wolfram U
Videos & Screencasts
Wolfram Language Introductory Book
Webinars & Training
Summer Programs
Books
Need Help?
Support FAQ
Wolfram Community
Contact Support
Premium Support
Paid Project Support
Technical Consulting
All Learning & Support »
Company
About
Company Background
Wolfram Blog
Events
Contact Us
Work with Us
Careers at Wolfram
Internships
Other Wolfram Language Jobs
Initiatives
Wolfram Foundation
MathWorld
Computer-Based Math
A New Kind of Science
Wolfram Technology for Hackathons
Student Ambassador Program
Wolfram for Startups
Demonstrations Project
Wolfram Innovator Awards
Wolfram + Raspberry Pi
Summer Programs
More...
All Company »
Search
WOLFRAM COMMUNITY
Connect with users of Wolfram technologies to learn, solve problems and share ideas
Join
Sign In
Dashboard
Groups
People
Search
Message Boards
Answer
(
Unmark
)
Mark as an Answer
GROUPS:
Data Science
Image Processing
Curated Data
Wolfram Language
Machine Learning
Geographic Information System
Wolfram High School Summer Camp
1
Matthew Sprintson
[WSC20] Coloring Nations based on how similar their flags are.
Matthew Sprintson, Thomas Jefferson High School for Science and Technology
Posted
8 months ago
841 Views
|
0 Replies
|
1 Total Likes
Follow this post
|
Mapping countries by their Flag similarities and coloring nations by their closeness to another countries flag.
A flag can symbolize the history, culture, and ideals of a nation. Because of that, we can use flags to see which nations are similar and which ones are not. In this project, I used Clusters and Image Processing in order to map what flags are most similar to others. I created maps of countries with similar flags, and a function that shows you which nations have similar flags to any nation of your choosing.
Creating the Dictionary.
I
f
i
r
s
t
c
h
o
s
e
t
o
m
a
k
e
a
s
y
s
t
e
m
t
h
a
t
w
o
u
l
d
s
e
p
a
r
a
t
e
t
h
e
f
l
a
g
s
i
n
t
h
e
W
o
l
f
r
a
m
D
a
t
a
b
a
s
e
i
n
t
o
g
r
o
u
p
s
.
T
h
o
u
g
h
,
i
n
o
r
d
e
r
t
o
d
o
t
h
i
s
,
I
w
o
u
l
d
n
e
e
d
a
s
y
s
t
e
m
t
h
a
t
w
h
e
n
g
i
v
e
n
a
f
l
a
g
c
o
u
l
d
r
e
t
u
r
n
t
h
e
n
a
t
i
o
n
t
o
w
h
i
c
h
t
h
a
t
f
l
a
g
b
e
l
o
n
g
s
.
I
d
i
d
t
h
i
s
b
y
f
i
r
s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
e
o
f
F
r
a
n
c
e
,
T
h
e
N
e
t
h
e
r
l
a
n
d
s
,
a
n
d
N
o
r
w
a
y
a
l
i
s
t
o
f
c
o
u
n
t
r
i
e
s
)
.
I
n
a
m
e
d
t
h
i
s
F
2
N
3
,
a
s
i
t
i
s
t
h
e
d
o
c
u
m
e
n
t
a
t
i
o
n
f
o
r
F
l
a
g
t
o
N
a
t
i
o
n
s
(
F
2
N
)
.
Putting all the flags into a directory.
F
l
a
g
L
i
s
t
=
D
e
l
e
t
e
D
u
p
l
i
c
a
t
e
s
[
C
o
u
n
t
r
y
D
a
t
a
[
#
,
"
F
l
a
g
"
]
]
&
/
@
C
o
u
n
t
r
y
D
a
t
a
[
]
[
[
1
;
;
2
4
9
]
]
;
C
o
u
n
t
r
y
L
i
s
t
4
=
D
e
l
e
t
e
D
u
p
l
i
c
a
t
e
s
[
D
e
l
e
t
e
[
E
n
t
i
t
y
L
i
s
t
[
"
C
o
u
n
t
r
y
"
]
,
9
]
]
;
F
2
N
3
=
M
e
r
g
e
[
D
e
l
e
t
e
C
a
s
e
s
[
I
f
[
!
M
i
s
s
i
n
g
Q
[
C
o
u
n
t
r
y
D
a
t
a
[
#
,
"
F
l
a
g
"
]
]
,
C
o
u
n
t
r
y
D
a
t
a
[
#
,
"
F
l
a
g
"
]
#
]
&
/
@
E
n
t
i
t
y
L
i
s
t
[
"
C
o
u
n
t
r
y
"
]
,
N
u
l
l
]
,
J
o
i
n
]
;
I
n
[
]
:
=
Nicely enough, If you attach a flag of any nation into the documentation, it will return the entity of the nation of origin.
F
2
N
3
[
C
o
u
n
t
r
y
D
a
t
a
[
"
F
r
a
n
c
e
"
,
"
F
l
a
g
"
]
]
I
n
[
]
:
=
F
r
a
n
c
e
,
M
a
r
t
i
n
i
q
u
e
,
S
a
i
n
t
B
a
r
t
h
e
l
e
m
y
,
S
a
i
n
t
M
a
r
t
i
n
,
S
a
i
n
t
P
i
e
r
r
e
a
n
d
M
i
q
u
e
l
o
n
,
W
a
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P
l
o
t
,
g
i
v
i
n
g
i
t
t
h
i
n
e
d
g
e
s
a
n
d
a
t
r
a
n
s
p
a
r
e
n
t
b
l
a
c
k
i
n
t
e
r
i
o
r
,
w
e
g
e
t
a
m
a
p
o
f
a
l
l
o
f
t
h
e
n
a
t
i
o
n
s
w
h
o
w
e
r
e
g
r
o
u
p
e
d
t
o
g
e
t
h
e
r
.
An example of a map with all of the Tricolor Flags.
T
r
i
P
l
a
t
f
o
r
m
=
F
i
n
d
C
l
u
s
t
e
r
s
[
F
l
a
g
L
i
s
t
,
1
0
0
,
P
e
r
f
o
r
m
a
n
c
e
G
o
a
l
"
Q
u
a
l
i
t
y
"
]
;
I
n
[
]
:
=
G
e
o
L
i
s
t
P
l
o
t
[
F
l
a
t
t
e
n
[
M
a
p
[
F
2
N
3
,
T
r
y
P
l
a
t
f
o
r
m
[
[
1
8
]
]
]
]
,
G
e
o
R
a
n
g
e
"
W
o
r
l
d
"
,
P
l
o
t
S
t
y
l
e
D
i
r
e
c
t
i
v
e
[
E
d
g
e
F
o
r
m
[
T
h
i
n
]
,
O
p
a
c
i
t
y
[
0
.
5
]
,
B
l
a
c
k
]
]
I
n
[
]
:
=
I made 4 other maps with the same strategy. One with all flags containing a circle in the center, one with a diagonal dash, one with the Union Jack, and one with a background similar to the US with red and white horizontal lines. They are shown below.
I
m
a
g
e
R
e
s
i
z
e
[
R
a
s
t
e
r
i
z
e
@
C
i
r
c
l
e
I
n
M
i
d
d
l
e
,
1
5
0
]
I
n
[
]
:
=
O
u
t
[
]
=
I
m
a
g
e
R
e
s
i
z
e
[
R
a
s
t
e
r
i
z
e
@
D
i
a
g
o
n
a
l
D
a
s
h
,
1
5
0
]
I
n
[
]
:
=
O
u
t
[
]
=
I
m
a
g
e
R
e
s
i
z
e
[
R
a
s
t
e
r
i
z
e
@
U
n
i
o
n
J
a
c
k
,
1
5
0
]
I
n
[
]
:
=
O
u
t
[
]
=
I
m
a
g
e
R
e
s
i
z
e
[
R
a
s
t
e
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,
F
a
l
k
l
a
n
d
I
s
l
a
n
d
s
,
F
i
j
i
,
M
o
n
t
s
e
r
r
a
t
,
N
e
w
Z
e
a
l
a
n
d
,
N
i
u
e
,
P
i
t
c
a
i
r
n
I
s
l
a
n
d
s
,
S
a
i
n
t
H
e
l
e
n
a
,
A
s
c
e
n
s
i
o
n
a
n
d
T
r
i
s
t
a
n
d
a
C
u
n
h
a
,
S
o
u
t
h
G
e
o
r
g
i
a
a
n
d
t
h
e
S
o
u
t
h
S
a
n
d
w
i
c
h
I
s
l
a
n
d
s
,
T
u
r
k
s
a
n
d
C
a
i
c
o
s
I
s
l
a
n
d
s
,
T
u
v
a
l
u
,
B
r
i
t
i
s
h
I
n
d
i
a
n
O
c
e
a
n
T
e
r
r
i
t
o
r
y
,
U
n
i
t
e
d
K
i
n
g
d
o
m
O
u
t
[
]
=
So now those nations would be on the map of nations with a Union Jack somewhere on their flag.
Creating the Flag-closeness Function.
After I was finished with the maps, Harshal helped me make a function that would map the nations of the world with colors based on how close their flags are. We did this through the "ImageDistance[]" function, which assigns a numeric value for how far away two images are.
A code which allows me to color the countries of the world based on how close their flags are.
C
o
u
n
t
r
y
F
l
a
g
C
o
l
o
r
[
c
o
u
n
t
r
y
_
]
:
=
G
e
o
R
e
g
i
o
n
V
a
l
u
e
P
l
o
t
[
F
l
a
t
t
e
n
@
M
a
p
[
F
u
n
c
t
i
o
n
[
{
x
}
,
#
L
a
s
t
[
x
]
&
/
@
F
i
r
s
t
[
x
]
]
,
M
a
p
[
F
l
a
t
t
e
n
[
F
2
N
3
[
#
]
]
I
m
a
g
e
D
i
s
t
a
n
c
e
[
R
a
s
t
e
r
i
z
e
@
C
o
u
n
t
r
y
D
a
t
a
[
c
o
u
n
t
r
y
,
"
F
l
a
g
"
]
,
#
]
&
,
F
l
a
g
L
i
s
t
]
]
,
G
e
o
R
a
n
g
e
"
W
o
r
l
d
"
]
I
n
[
]
:
=
I
m
a
g
e
R
e
s
i
z
e
[
R
a
s
t
e
r
i
z
e
@
C
o
u
n
t
r
y
F
l
a
g
C
o
l
o
r
[
"
T
a
j
i
k
i
s
t
a
n
"
]
,
2
0
0
]
I
n
[
]
:
=
O
u
t
[
]
=
In that map, the darker a color is, the further away it is from the original map. For example, in the map above, we can see that the flags of India, Yemen, Iraq, Syria, Hungary, Niger, The Netherlands, and more are similar to the flag of Tajikistan. Meanwhile the Flags of Russia, Libya, Mozambique, and more have nothing in similar with the flag of Tajikistan.
Using Feature Extraction
After we were finished with the ImageDistance Function, we chose to make a similar graph but instead employ the "FeatureExtraction[]" method.
F
e
a
t
u
r
e
=
F
e
a
t
u
r
e
E
x
t
r
a
c
t
i
o
n
[
F
l
a
g
L
i
s
t
]
F
e
a
t
u
r
e
C
o
u
n
t
r
y
P
l
o
t
[
n
a
t
i
o
n
_
]
:
=
G
e
o
R
e
g
i
o
n
V
a
l
u
e
P
l
o
t
[
F
l
a
t
t
e
n
@
M
a
p
[
F
u
n
c
t
i
o
n
[
{
x
}
,
#
L
a
s
t
[
x
]
&
/
@
F
i
r
s
t
[
x
]
]
,
M
a
p
[
F
l
a
t
t
e
n
[
F
2
N
3
[
#
]
]
F
e
a
t
u
r
e
D
i
s
t
a
n
c
e
[
R
a
s
t
e
r
i
z
e
@
C
o
u
n
t
r
y
D
a
t
a
[
n
a
t
i
o
n
,
"
F
l
a
g
"
]
,
#
,
F
e
a
t
u
r
e
]
&
,
F
l
a
g
L
i
s
t
]
]
,
G
e
o
R
a
n
g
e
"
W
o
r
l
d
"
]
I
n
[
]
:
=
The "FeatureCountryPlot[]" method works better than the "CountryFlagColor[]" method on some flags, like the example with the United Kingdom Below, but worse with others, like Tajikistan above.
I
m
a
g
e
R
e
s
i
z
e
[
R
a
s
t
e
r
i
z
e
@
F
e
a
t
u
r
e
C
o
u
n
t
r
y
P
l
o
t
[
"
U
n
i
t
e
d
K
i
n
g
d
o
m
"
]
,
1
5
0
]
I
n
[
]
:
=
O
u
t
[
]
=
Keywords
Flag
◼
Country
◼
Geography
◼
World
◼
Map
◼
Wolfram Summer Camp 2020
◼
Wolfram Language
◼
Website
◼
POSTED BY:
Matthew Sprintson
Answer
Mark as an Answer
Reply
|
Flag
Reply to this discussion
in reply to
Add Notebook
Community posts can be styled and formatted using the
Markdown syntax
.
Tag limit exceeded
Note: Only the first five people you tag will receive an email notification; the other tagged names will appear as links to their profiles.
Publish anyway
Cancel
Reply Preview
Attachments
Remove
Add a file to this post
Follow this discussion
or
Discard
Group Abstract
Be respectful. Review our
Community Guidelines
to understand your role and responsibilities.
Community Terms of Use
Feedback
Enable JavaScript to interact with content and submit forms on Wolfram websites.
Learn how »