1

音楽ジャンルの人気度を計算したい。この配列を出力するコードを書きました:

Array
(
[Contemporary R&B|R&B] => Array
(
[0] => 1
[1] => 3
[2] => 6
[3] => 25
[4] => 44
[5] => 58
[6] => 69
[7] => 81
[8] => 89
[9] => 92
)

[dance-pop] => Array
(
[0] => 1
[1] => 88
)

[Disco music|disco] => Array
(
[0] => 1
)

[Pop music|Pop] => Array
(
[0] => 3
)

[Dance music|dance] => Array
(
[0] => 3
)

[Alternative hip hop] => Array
(
[0] => 6
)

[Conscious hip hop] => Array
(
[0] => 14
)

[Country music|Country] => Array
(
[0] => 22
[1] => 26
[2] => 28
[3] => 34
[4] => 39
[5] => 46
[6] => 47
[7] => 56
[8] => 57
[9] => 71
[10] => 78
[11] => 79
[12] => 95
)

[country rap] => Array
(
[0] => 22
)

[Hip hop music|Hip hop] => Array
(
[0] => 27
[1] => 37
[2] => 58
[3] => 67
[4] => 74
[5] => 86
[6] => 89
)

[Soul music|Soul] => Array
(
[0] => 29
)

[Pop music|pop] => Array
(
[0] => 29
)

[Rock and roll|Rock] => Array
(
[0] => 33
)

[Indie folk] => Array
(
[0] => 36
[1] => 73
)

[Dance-pop] => Array
(
[0] => 42
)

[hip house] => Array
(
[0] => 42
)

[electro house] => Array
(
[0] => 42
)

[Electropop] => Array
(
[0] => 49
)

[pop music|Pop] => Array
(
[0] => 50
)

[Hard rock] => Array
(
[0] => 52
[1] => 77
)

[Country rock] => Array
(
[0] => 53
)

[Alternative rock] => Array
(
[0] => 54
[1] => 96
)

[Progressive house music|Progressive house] => Array
(
[0] => 68
)

[alternative dance] => Array
(
[0] => 68
)

[folktronica] => Array
(
[0] => 68
)

[Folk music|folk] => Array
(
[0] => 68
)

[pop rock] => Array
(
[0] => 73
)

[soul music|soul] => Array
(
[0] => 73
)

[comedy hip hop] => Array
(
[0] => 74
)

[Electro house] => Array
(
[0] => 88
)

[Electronic music|electronic] => Array
(
[0] => 88
)

[Industrial hip hop] => Array
(
[0] => 97
)

"Contemporary R&B|R&B" 内の値 (たとえば) は、トップ ソング リスト内の位置を表します。

数えることしかできないことはわかっていますが、100曲リスト内のジャンルの位置を考慮したいと思います. (例: 2 位と 3 位の「コンテンポラリー R&B|R&B」 = 1 位の「ダンス ポップ」。)

解決策を教えてもらえますか?

4

0 に答える 0