[PYTHON] [Momentary interest] Which country does the Japanese resemble the national character of?

With the presidential election in the United States and the renewal of the Prime Minister of Japan, I wondered what the characteristics of Japanese people are, so I took a quick look at it in about the time before eating breakfast. Nori

Of course, I don't know the details, but the Hofstede index (data hofstede quantifies the national character such as behavior and values by hofstede insights. Using matrix /? _ Ga = 2.14739574.1545356180.1601592631-662590749.1600905258)), we can lightly grasp which country the Japanese "behavior and values" are similar to, and what about other countries. Illustrated by hierarchical clustering (general (I think) "ward" method, distance: "euclidean")

The content of the data is

I think there are various high and low rankings, but about the degree of "similarity"

Setting data maintenance

import warnings
warnings.filterwarnings('ignore')

import numpy as np
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
from scipy.cluster.hierarchy import dendrogram, linkage

plt.style.use('seaborn-darkgrid')

#DL data from the above website
data_from_web = pd.read_csv('6-dimensions-for-website-2015-08-16.csv', index_col=0)

#No processing is performed for missing values, only those for which all data is available are extracted.
data_from_web_all = data_from_web[data_from_web != '#NULL!'].dropna(0)
data_from_web_all.index = data_from_web_all['country']
data_from_web_all = data_from_web_all.drop('country', 1)

Create hierarchical clustering

fig, ax = plt.subplots(1, 1, figsize=(12, 15))
ax = dendrogram(linkage(data_from_web_all, method="ward", metric="euclidean"),
                labels=data_from_web_all.index, 
                orientation="left", leaf_font_size=15,
                color_threshold=100)
fig.tight_layout()
fig.show()

fig.png

Japan in the black cluster. It's like that, it's not like that.

Recommended Posts

[Momentary interest] Which country does the Japanese resemble the national character of?
Japanese translation of the e2fsprogs manual
Japanese translation of the man-db manual
Japanese translation of the util-linux manual
Japanese translation of the iproute2 manual