In [1]:
import matplotlib.pyplot as plt
import json
import pandas as pd

China - CN: CN-01

This notebook contains few data analysis through the China's CN-01 data from Cultural Crowds dataset¹

¹ FAVARETTO, R.; DIHL, L. ; BARRETO, R. ; MUSSE, S. R. Using Group Behaviors To Detect Hofstede Cultural Dimensions. IEEE International Conference on Image Processing (ICIP), 2016.


In [2]:
d = None
with open('..\..\group_analysis.json') as f:
    d = json.load(f)

Number of groups for frame

Collected data about the number of groups through time. The average of the number of groups was 15.7777, minimum of 14 and maximum of 19.


In [3]:
df_num_groups = pd.DataFrame(data={'Min. Num. of Groups': d['min_num_groups'], 'Avg. Num. of Groups': d['avg_num_groups'], 'Max. Num. of Groups': d['max_num_groups']})
df_num_groups


Out[3]:
Avg. Num. of Groups Max. Num. of Groups Min. Num. of Groups
0 18.000000 18 18
1 18.500000 19 18
2 18.666667 19 18
3 18.500000 19 18
4 18.600000 19 18
5 18.500000 19 18
6 18.428571 19 18
7 18.250000 19 17
8 18.111111 19 17
9 17.900000 19 16
10 17.727273 19 16
11 17.583333 19 16
12 17.384615 19 15
13 17.214286 19 15
14 17.000000 19 14
15 16.812500 19 14
16 16.647059 19 14
17 16.500000 19 14
18 16.473684 19 14
19 16.400000 19 14
20 16.333333 19 14
21 16.227273 19 14
22 16.173913 19 14
23 16.125000 19 14
24 16.080000 19 14
25 16.038462 19 14
26 16.000000 19 14
27 15.964286 19 14
28 15.931034 19 14
29 15.866667 19 14
... ... ... ...
69 15.971429 19 14
70 15.985915 19 14
71 16.000000 19 14
72 16.013699 19 14
73 16.027027 19 14
74 16.026667 19 14
75 16.026316 19 14
76 16.012987 19 14
77 16.000000 19 14
78 15.987342 19 14
79 15.975000 19 14
80 15.962963 19 14
81 15.939024 19 14
82 15.915663 19 14
83 15.892857 19 14
84 15.894118 19 14
85 15.895349 19 14
86 15.885057 19 14
87 15.875000 19 14
88 15.865169 19 14
89 15.866667 19 14
90 15.857143 19 14
91 15.858696 19 14
92 15.849462 19 14
93 15.851064 19 14
94 15.842105 19 14
95 15.833333 19 14
96 15.814433 19 14
97 15.795918 19 14
98 15.777778 19 14

99 rows × 3 columns


In [4]:
plt.figure()
ax = df_num_groups.plot(title='Number of Groups Analysis')
plt.xlabel('Frame nº')
plt.ylabel('Number of Groups')
plt.show()


<matplotlib.figure.Figure at 0x207bda6c588>

Number of elements on each group for frame

Collected data about the number persons for each group through time. The average of the number of people for group was 2.528361, minimum of 1 and maximum of 7.


In [5]:
df_group_elements = pd.DataFrame(data={'Min. Group Elements': d['min_group_elements'], 'Avg. Group Elements': d['avg_group_elements'], 'Max. Group Elements': d['max_group_elements']})
df_group_elements


Out[5]:
Avg. Group Elements Max. Group Elements Min. Group Elements
0 2.222222 5 1
1 2.163743 5 1
2 2.144250 5 1
3 2.163743 5 1
4 2.152047 5 1
5 2.163743 5 1
6 2.187970 5 1
7 2.223297 5 1
8 2.250774 5 1
9 2.288197 5 1
10 2.318815 5 1
11 2.344330 5 1
12 2.379382 6 1
13 2.409426 6 1
14 2.453560 6 1
15 2.492176 6 1
16 2.526250 6 1
17 2.556538 6 1
18 2.563431 7 1
19 2.578592 7 1
20 2.589136 7 1
21 2.611058 7 1
22 2.622171 7 1
23 2.632359 7 1
24 2.641731 7 1
25 2.650382 7 1
26 2.658393 7 1
27 2.665831 7 1
28 2.665860 7 1
29 2.672236 7 1
... ... ... ...
69 2.581099 7 1
70 2.578714 7 1
71 2.576396 7 1
72 2.572529 7 1
73 2.568766 7 1
74 2.565349 7 1
75 2.562023 7 1
76 2.559918 7 1
77 2.557868 7 1
78 2.555870 7 1
79 2.553921 7 1
80 2.552021 7 1
81 2.552258 7 1
82 2.552489 7 1
83 2.552714 7 1
84 2.549153 7 1
85 2.545674 7 1
86 2.544000 7 1
87 2.542364 7 1
88 2.540764 7 1
89 2.537533 7 1
90 2.536022 7 1
91 2.532913 7 1
92 2.531484 7 1
93 2.529819 7 1
94 2.529154 7 1
95 2.528503 7 1
96 2.528946 7 1
97 2.529379 7 1
98 2.528361 7 1

99 rows × 3 columns


In [6]:
plt.figure()
ax = df_group_elements.plot(title='Number of Group Elements')
plt.xlabel('Frame nº')
plt.ylabel('Number of Group Elements')
plt.show()


<matplotlib.figure.Figure at 0x207c06fae80>

In [ ]: