Random Examples
In [1]:
Copied!
%load_ext autoreload
%matplotlib inline
import matplotlib.pyplot as plt
import pandas as pd
import circumplex
data = pd.read_excel(
"/Users/mitch/Library/CloudStorage/OneDrive-UniversityCollegeLondon/_Fellowship/Papers - Drafts/J2308_APA_SATP-Main/data/SATP Dataset v1.4.xlsx"
)
%load_ext autoreload
%matplotlib inline
import matplotlib.pyplot as plt
import pandas as pd
import circumplex
data = pd.read_excel(
"/Users/mitch/Library/CloudStorage/OneDrive-UniversityCollegeLondon/_Fellowship/Papers - Drafts/J2308_APA_SATP-Main/data/SATP Dataset v1.4.xlsx"
)
In [2]:
Copied!
%autoreload
plt.style.use("ggplot")
scales = ["PAQ1", "PAQ2", "PAQ3", "PAQ4", "PAQ5", "PAQ6", "PAQ7", "PAQ8"]
ssm_res = circumplex.ssm_analyse(data, scales, ["loud"], ["Language"])
ssm_res.plot()
%autoreload
plt.style.use("ggplot")
scales = ["PAQ1", "PAQ2", "PAQ3", "PAQ4", "PAQ5", "PAQ6", "PAQ7", "PAQ8"]
ssm_res = circumplex.ssm_analyse(data, scales, ["loud"], ["Language"])
ssm_res.plot()
Error: array must not contain infs or NaNs | in Language = arb Error: array must not contain infs or NaNs | in Language = cmn Error: array must not contain infs or NaNs | in Language = ell Error: array must not contain infs or NaNs | in Language = fra Error: array must not contain infs or NaNs | in Language = ind Error: array must not contain infs or NaNs | in Language = jpn Error: array must not contain infs or NaNs | in Language = kor Error: array must not contain infs or NaNs | in Language = nld Error: array must not contain infs or NaNs | in Language = spa Error: array must not contain infs or NaNs | in Language = vie Error: array must not contain infs or NaNs | in Language = zsm
Out[2]:
(<Figure size 640x480 with 1 Axes>, <PolarAxes: >)
In [3]:
Copied!
ssm_res.results[0]
ssm_res.results[0]
Out[3]:
SSMParams(deu_loud, scores=PAQ1 -0.735505 PAQ2 -0.094355 PAQ3 0.344259 PAQ4 0.656572 PAQ5 0.753815 PAQ6 0.021532 PAQ7 -0.394931 PAQ8 -0.795127 dtype: float64, angles=(0, 45, 90, 135, 180, 225, 270, 315))
In [4]:
Copied!
test = circumplex.ssm_analyse_grouped_corrs(data, scales, ["loud"], ["Language"])
test = circumplex.ssm_analyse_grouped_corrs(data, scales, ["loud"], ["Language"])
Error: array must not contain infs or NaNs | in Language = arb Error: array must not contain infs or NaNs | in Language = cmn Error: array must not contain infs or NaNs | in Language = ell Error: array must not contain infs or NaNs | in Language = fra Error: array must not contain infs or NaNs | in Language = ind Error: array must not contain infs or NaNs | in Language = jpn Error: array must not contain infs or NaNs | in Language = kor Error: array must not contain infs or NaNs | in Language = nld Error: array must not contain infs or NaNs | in Language = spa Error: array must not contain infs or NaNs | in Language = vie Error: array must not contain infs or NaNs | in Language = zsm
In [5]:
Copied!
test.results
test.results
Out[5]:
[SSMParams(deu_loud, scores=PAQ1 -0.735505 PAQ2 -0.094355 PAQ3 0.344259 PAQ4 0.656572 PAQ5 0.753815 PAQ6 0.021532 PAQ7 -0.394931 PAQ8 -0.795127 dtype: float64, angles=(0, 45, 90, 135, 180, 225, 270, 315)), SSMParams(eng_loud, scores=PAQ1 -0.606997 PAQ2 -0.027397 PAQ3 0.324510 PAQ4 0.608231 PAQ5 0.644103 PAQ6 0.117573 PAQ7 -0.314404 PAQ8 -0.730986 dtype: float64, angles=(0, 45, 90, 135, 180, 225, 270, 315)), SSMParams(hrv_loud, scores=PAQ1 -0.621366 PAQ2 0.328738 PAQ3 0.364106 PAQ4 0.700794 PAQ5 0.669574 PAQ6 0.011157 PAQ7 -0.321482 PAQ8 -0.633544 dtype: float64, angles=(0, 45, 90, 135, 180, 225, 270, 315)), SSMParams(ita_loud, scores=PAQ1 -0.516713 PAQ2 0.126906 PAQ3 0.249130 PAQ4 0.617427 PAQ5 0.690386 PAQ6 -0.058512 PAQ7 -0.191610 PAQ8 -0.651333 dtype: float64, angles=(0, 45, 90, 135, 180, 225, 270, 315)), SSMParams(por_loud, scores=PAQ1 -0.489250 PAQ2 0.375296 PAQ3 0.695722 PAQ4 0.639984 PAQ5 0.607933 PAQ6 -0.223063 PAQ7 -0.328263 PAQ8 -0.621765 dtype: float64, angles=(0, 45, 90, 135, 180, 225, 270, 315)), SSMParams(swe_loud, scores=PAQ1 -0.661008 PAQ2 0.014031 PAQ3 0.232966 PAQ4 0.725853 PAQ5 0.787736 PAQ6 0.066319 PAQ7 -0.298978 PAQ8 -0.737212 dtype: float64, angles=(0, 45, 90, 135, 180, 225, 270, 315)), SSMParams(tur_loud, scores=PAQ1 -0.502171 PAQ2 0.087115 PAQ3 0.580815 PAQ4 0.562785 PAQ5 0.758338 PAQ6 -0.187736 PAQ7 -0.584758 PAQ8 -0.723721 dtype: float64, angles=(0, 45, 90, 135, 180, 225, 270, 315))]
In [6]:
Copied!
fig, axes = plt.subplots(4, 2, figsize=(12, 16), sharey=True)
ssm_res.profile_plots(axes=axes)
plt.show()
fig, axes = plt.subplots(4, 2, figsize=(12, 16), sharey=True)
ssm_res.profile_plots(axes=axes)
plt.show()
In [7]:
Copied!
ssm_res.table
ssm_res.table
Out[7]:
| label | group | measure | elevation | xval | yval | amplitude | displacement | r2 | PAQ1 | PAQ2 | PAQ3 | PAQ4 | PAQ5 | PAQ6 | PAQ7 | PAQ8 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| deu_loud | deu_loud | deu | loud | -0.030467 | -0.649443 | 0.420938 | 0.773928 | 147.050614 | 0.978323 | 0 | 45 | 90 | 135 | 180 | 225 | 270 | 315 |
| eng_loud | eng_loud | eng | loud | 0.001829 | -0.575145 | 0.370843 | 0.684336 | 147.186772 | 0.982669 | 0 | 45 | 90 | 135 | 180 | 225 | 270 | 315 |
| hrv_loud | hrv_loud | hrv | loud | 0.062247 | -0.502474 | 0.463418 | 0.683547 | 137.315498 | 0.916134 | 0 | 45 | 90 | 135 | 180 | 225 | 270 | 315 |
| ita_loud | ita_loud | ita | loud | 0.033210 | -0.493285 | 0.367250 | 0.614981 | 143.332361 | 0.912120 | 0 | 45 | 90 | 135 | 180 | 225 | 270 | 315 |
| por_loud | por_loud | por | loud | 0.082074 | -0.391568 | 0.584820 | 0.703804 | 123.804373 | 0.928637 | 0 | 45 | 90 | 135 | 180 | 225 | 270 | 315 |
| swe_loud | swe_loud | swe | loud | 0.016213 | -0.630065 | 0.382379 | 0.737018 | 148.746958 | 0.955507 | 0 | 45 | 90 | 135 | 180 | 225 | 270 | 315 |
| tur_loud | tur_loud | tur | loud | -0.001167 | -0.493964 | 0.567405 | 0.752296 | 131.041796 | 0.947249 | 0 | 45 | 90 | 135 | 180 | 225 | 270 | 315 |
In [8]:
Copied!
lang_angles = {
'arb': (0, 65, 97, 131, 182, 255, 281, 335),
'cmn': (0, 65, 97, 131, 182, 255, 281, 335),
'deu': (0, 65, 97, 131, 182, 255, 281, 335),
'ell': (0, 65, 97, 131, 182, 255, 281, 335),
'eng': (0, 46, 93, 138, 182, 228, 272, 340),
'fra': (0, 65, 97, 131, 182, 255, 281, 335),
'hrv': (0, 65, 97, 131, 182, 255, 281, 335),
'ind': (0, 65, 97, 131, 182, 255, 281, 335),
'ita': (0, 65, 97, 131, 182, 255, 281, 335),
'jpn': (0, 65, 97, 131, 182, 255, 281, 335),
'kor': (0, 65, 97, 131, 182, 255, 281, 335),
'nld': (0, 65, 97, 131, 182, 255, 281, 335),
'por': (0, 65, 97, 131, 182, 255, 281, 335),
'spa': (0, 65, 97, 131, 182, 255, 281, 335),
'swe': (0, 65, 97, 131, 182, 255, 281, 335),
'tur': (0, 65, 97, 131, 182, 255, 281, 335),
'vie': (0, 65, 97, 131, 182, 255, 281, 335),
'zsm': (0, 65, 97, 131, 182, 255, 281, 335),
}
corr_res = circumplex.ssm_analyse(data, scales, ["loud"], ["Language"], grouped_angles = lang_angles)
corr_res.plot()
lang_angles = {
'arb': (0, 65, 97, 131, 182, 255, 281, 335),
'cmn': (0, 65, 97, 131, 182, 255, 281, 335),
'deu': (0, 65, 97, 131, 182, 255, 281, 335),
'ell': (0, 65, 97, 131, 182, 255, 281, 335),
'eng': (0, 46, 93, 138, 182, 228, 272, 340),
'fra': (0, 65, 97, 131, 182, 255, 281, 335),
'hrv': (0, 65, 97, 131, 182, 255, 281, 335),
'ind': (0, 65, 97, 131, 182, 255, 281, 335),
'ita': (0, 65, 97, 131, 182, 255, 281, 335),
'jpn': (0, 65, 97, 131, 182, 255, 281, 335),
'kor': (0, 65, 97, 131, 182, 255, 281, 335),
'nld': (0, 65, 97, 131, 182, 255, 281, 335),
'por': (0, 65, 97, 131, 182, 255, 281, 335),
'spa': (0, 65, 97, 131, 182, 255, 281, 335),
'swe': (0, 65, 97, 131, 182, 255, 281, 335),
'tur': (0, 65, 97, 131, 182, 255, 281, 335),
'vie': (0, 65, 97, 131, 182, 255, 281, 335),
'zsm': (0, 65, 97, 131, 182, 255, 281, 335),
}
corr_res = circumplex.ssm_analyse(data, scales, ["loud"], ["Language"], grouped_angles = lang_angles)
corr_res.plot()
Error: array must not contain infs or NaNs | in Language = arb Error: array must not contain infs or NaNs | in Language = cmn Error: array must not contain infs or NaNs | in Language = ell Error: array must not contain infs or NaNs | in Language = fra Error: array must not contain infs or NaNs | in Language = ind Error: array must not contain infs or NaNs | in Language = jpn Error: array must not contain infs or NaNs | in Language = kor Error: array must not contain infs or NaNs | in Language = nld Error: array must not contain infs or NaNs | in Language = spa Error: array must not contain infs or NaNs | in Language = vie Error: array must not contain infs or NaNs | in Language = zsm
Out[8]:
(<Figure size 640x480 with 1 Axes>, <PolarAxes: >)
In [9]:
Copied!
corr_res.profile_plots();
corr_res.profile_plots();
In [10]:
Copied!
corr_res.table
corr_res.table
Out[10]:
| label | group | measure | elevation | xval | yval | amplitude | displacement | r2 | PAQ1 | PAQ2 | PAQ3 | PAQ4 | PAQ5 | PAQ6 | PAQ7 | PAQ8 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| deu_loud | deu_loud | deu | loud | 0.008102 | -0.757320 | 0.232137 | 0.792100 | 162.958416 | 0.998362 | 0 | 65 | 97 | 131 | 182 | 255 | 281 | 335 |
| eng_loud | eng_loud | eng | loud | 0.005455 | -0.585892 | 0.340915 | 0.677859 | 149.805988 | 0.981556 | 0 | 46 | 93 | 138 | 182 | 228 | 272 | 340 |
| hrv_loud | hrv_loud | hrv | loud | 0.089558 | -0.613045 | 0.313814 | 0.688697 | 152.892397 | 0.963337 | 0 | 65 | 97 | 131 | 182 | 255 | 281 | 335 |
| ita_loud | ita_loud | ita | loud | 0.062258 | -0.595895 | 0.224498 | 0.636781 | 159.356518 | 0.974369 | 0 | 65 | 97 | 131 | 182 | 255 | 281 | 335 |
| por_loud | por_loud | por | loud | 0.099232 | -0.514793 | 0.449479 | 0.683405 | 138.874937 | 0.973591 | 0 | 65 | 97 | 131 | 182 | 255 | 281 | 335 |
| swe_loud | swe_loud | swe | loud | 0.054330 | -0.735613 | 0.204448 | 0.763495 | 164.467842 | 0.989495 | 0 | 65 | 97 | 131 | 182 | 255 | 281 | 335 |
| tur_loud | tur_loud | tur | loud | 0.023584 | -0.615972 | 0.401942 | 0.735513 | 146.874258 | 0.969585 | 0 | 65 | 97 | 131 | 182 | 255 | 281 | 335 |
In [11]:
Copied!
lang_data = data[data["Language"] == "deu"]
rec_data = data[data["Recording"] == "CG01"]
angles = [0, 65, 97, 131, 182, 255, 281, 335]
# angles = [360 - a for a in angles]
# angles[0] = 0
new_ang_results = circumplex.SSMParams(rec_data[scales].mean(), scales, angles)
lang_data = data[data["Language"] == "deu"]
rec_data = data[data["Recording"] == "CG01"]
angles = [0, 65, 97, 131, 182, 255, 281, 335]
# angles = [360 - a for a in angles]
# angles[0] = 0
new_ang_results = circumplex.SSMParams(rec_data[scales].mean(), scales, angles)
In [12]:
Copied!
new_ang_results.angles
new_ang_results.angles
Out[12]:
[0, 65, 97, 131, 182, 255, 281, 335]
In [13]:
Copied!
new_ang_results.profile_plot()
new_ang_results.profile_plot()
Out[13]:
(<Figure size 800x400 with 1 Axes>,
<Axes: title={'center': 'SSM Profile'}, xlabel='Angle [deg]', ylabel='Score'>)
In [14]:
Copied!
new_ang_results.displacement
new_ang_results.displacement
Out[14]:
34.87191446710762
In [15]:
Copied!
new_ang_results.elevation
new_ang_results.elevation
Out[15]:
42.91989829477362
In [16]:
Copied!
import soundscapy as sspy
ss_data = sspy.isd.load()
import soundscapy as sspy
ss_data = sspy.isd.load()
In [17]:
Copied!
ss_data.query("LocationID == 'MonumentoGaribaldi'")
ss_data.query("LocationID == 'MonumentoGaribaldi'")
Out[17]:
| LocationID | SessionID | GroupID | RecordID | Language | Lockdown | start_time | end_time | latitude | longitude | ... | FS_Avg,arith(vacil) | I_HM_Avg,arith(iu) | Ton_HM_Avg,arith(tuHMS) | LZeq_L(dB(SPL)) | LAeq_L(A)(dB(SPL)) | LA10_LA90(dB(SPL)) | LCeq_LAeq(dB(SPL)) | LC10_LC90(dB(SPL)) | RA_2D_cp(cPa) | PA(Zwicker) | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 441 | MonumentoGaribaldi | MonumentoGaribaldi1 | MG101 | 2.0 | Italian | 0 | 03/03/2019 11:18 | 03/03/2019 11:22 | 45.431837 | 12.354908 | ... | 0.0283 | 0.410 | 0.2390 | 60.95 | 53.66 | 8.08 | 6.73 | 4.82 | 9.86 | 10.758803 |
| 442 | MonumentoGaribaldi | MonumentoGaribaldi1 | MG101 | 1.0 | Italian | 0 | 03/03/2019 11:18 | 03/03/2019 11:22 | 45.431837 | 12.354908 | ... | 0.0283 | 0.410 | 0.2390 | 60.95 | 53.66 | 8.08 | 6.73 | 4.82 | 9.86 | 10.758803 |
| 443 | MonumentoGaribaldi | MonumentoGaribaldi1 | MG102 | 206.0 | English | 0 | 03/03/2019 11:18 | 03/03/2019 11:28 | 45.431837 | 12.354908 | ... | 0.0312 | 0.529 | 0.2490 | 62.36 | 54.93 | 9.13 | 7.01 | 4.89 | 10.40 | 11.670954 |
| 444 | MonumentoGaribaldi | MonumentoGaribaldi1 | MG103 | 3.0 | English | 0 | 03/03/2019 11:23 | 03/03/2019 11:29 | 45.431837 | 12.354908 | ... | 0.0111 | 0.480 | 0.1140 | 59.74 | 50.01 | 4.61 | 9.15 | 3.65 | 9.10 | 9.744015 |
| 445 | MonumentoGaribaldi | MonumentoGaribaldi1 | MG104 | 4.0 | English | 0 | 03/03/2019 11:22 | 03/03/2019 11:33 | 45.431837 | 12.354908 | ... | 0.0156 | 0.771 | 0.0851 | 56.51 | 50.68 | 5.14 | 4.99 | 3.37 | 9.81 | 8.246837 |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 521 | MonumentoGaribaldi | MonumentoGaribaldi3 | MG330 | NaN | NaN | 1 | NaN | NaN | NaN | NaN | ... | 0.0594 | 0.383 | 0.4750 | 62.07 | 57.41 | 12.76 | 1.18 | 8.60 | 9.53 | 12.503792 |
| 522 | MonumentoGaribaldi | MonumentoGaribaldi3 | MG331 | NaN | NaN | 1 | NaN | NaN | NaN | NaN | ... | 0.0435 | 0.381 | 0.3810 | 58.19 | 52.56 | 10.78 | 1.56 | 6.77 | 8.60 | 7.972545 |
| 523 | MonumentoGaribaldi | MonumentoGaribaldi3 | MG332 | NaN | NaN | 1 | NaN | NaN | NaN | NaN | ... | 0.0576 | 0.407 | 0.4150 | 57.02 | 53.97 | 13.76 | 0.41 | 8.33 | 9.03 | 8.887960 |
| 524 | MonumentoGaribaldi | MonumentoGaribaldi3 | MG333 | NaN | NaN | 1 | NaN | NaN | NaN | NaN | ... | 0.0303 | 0.453 | 0.2990 | 57.23 | 53.72 | 16.18 | 1.40 | 8.44 | 8.41 | 8.912749 |
| 525 | MonumentoGaribaldi | MonumentoGaribaldi3 | MG334 | NaN | NaN | 1 | NaN | NaN | NaN | NaN | ... | 0.0496 | 0.422 | 0.3530 | 60.17 | 57.01 | 16.93 | 1.32 | 8.87 | 9.65 | 12.126460 |
85 rows × 78 columns
In [18]:
Copied!
ss_data, excl_data = sspy.isd.validate(ss_data)
ss_data, excl_data = sspy.isd.validate(ss_data)
Renaming PAQ columns. Checking PAQ data quality. Identified 627 samples to remove. [95, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 152, 168, 171, 190, 198, 204, 222, 230, 247, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 302, 308, 337, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 557, 580, 583, 607, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 818, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 860, 861, 862, 863, 864, 870, 876, 885, 889, 905, 930, 958, 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 990, 991, 992, 993, 994, 995, 996, 997, 1000, 1009, 1023, 1028, 1041, 1063, 1149, 1150, 1151, 1152, 1153, 1154, 1155, 1156, 1157, 1158, 1159, 1160, 1161, 1162, 1163, 1164, 1165, 1166, 1167, 1168, 1169, 1170, 1171, 1172, 1173, 1174, 1175, 1176, 1177, 1178, 1179, 1180, 1181, 1182, 1183, 1184, 1185, 1186, 1187, 1188, 1213, 1220, 1251, 1271, 1288, 1289, 1290, 1291, 1292, 1293, 1294, 1295, 1296, 1297, 1298, 1299, 1300, 1301, 1302, 1303, 1304, 1305, 1306, 1307, 1308, 1309, 1310, 1311, 1312, 1313, 1314, 1315, 1316, 1317, 1318, 1319, 1320, 1321, 1322, 1323, 1324, 1325, 1326, 1327, 1394, 1395, 1396, 1397, 1398, 1399, 1400, 1401, 1402, 1403, 1404, 1405, 1406, 1407, 1408, 1409, 1410, 1411, 1412, 1413, 1414, 1415, 1416, 1417, 1418, 1419, 1420, 1433, 1448, 1468, 1496, 1497, 1498, 1499, 1500, 1501, 1502, 1503, 1504, 1505, 1506, 1507, 1508, 1509, 1510, 1511, 1512, 1513, 1514, 1515, 1516, 1517, 1518, 1519, 1520, 1521, 1522, 1523, 1524, 1525, 1526, 1527, 1528, 1529, 1530, 1531, 1532, 1533, 1534, 1535, 1536, 1537, 1538, 1539, 1540, 1541, 1542, 1543, 1544, 1545, 1553, 1586, 1700, 1701, 1702, 1703, 1704, 1705, 1706, 1707, 1708, 1709, 1710, 1711, 1712, 1713, 1714, 1715, 1716, 1717, 1718, 1719, 1720, 1721, 1722, 1723, 1724, 1725, 1726, 1727, 1728, 1729, 1730, 1731, 1732, 1733, 1734, 1735, 1736, 1737, 1738, 1739, 1740, 1744, 1747, 1752, 1753, 1755, 1759, 1765, 1785, 1798, 1799, 1830, 1846, 1851, 1865, 1868, 1869, 1870, 1871, 1872, 1873, 1874, 1875, 1876, 1877, 1878, 1879, 1880, 1881, 1882, 1883, 1884, 1885, 1886, 1887, 1888, 1889, 1890, 1891, 1892, 1893, 1894, 1895, 1896, 1897, 1898, 1899, 1900, 1901, 1902, 1903, 1904, 1905, 1906, 1907, 1908]
In [19]:
Copied!
excl_data
excl_data
Out[19]:
| LocationID | SessionID | GroupID | RecordID | Language | Lockdown | start_time | end_time | latitude | longitude | ... | FS_Avg,arith(vacil) | I_HM_Avg,arith(iu) | Ton_HM_Avg,arith(tuHMS) | LZeq_L(dB(SPL)) | LAeq_L(A)(dB(SPL)) | LA10_LA90(dB(SPL)) | LCeq_LAeq(dB(SPL)) | LC10_LC90(dB(SPL)) | RA_2D_cp(cPa) | PA(Zwicker) | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 95 | CamdenTown | CamdenTown4 | CT411 | NaN | NaN | 0 | NaN | NaN | NaN | NaN | ... | 0.04410 | 0.369 | 0.608 | 85.82 | 75.37 | 4.79 | 10.00 | 6.34 | 18.80 | 54.379887 |
| 106 | CamdenTown | CamdenTown5 | CT501 | NaN | NaN | 1 | NaN | NaN | NaN | NaN | ... | 0.00700 | 0.361 | 0.175 | 74.52 | 59.44 | 12.32 | 9.35 | 8.93 | 11.70 | 18.410488 |
| 107 | CamdenTown | CamdenTown5 | CT502 | NaN | NaN | 1 | NaN | NaN | NaN | NaN | ... | 0.00656 | 0.339 | 0.287 | 78.27 | 69.67 | 15.15 | 7.19 | 11.39 | 12.90 | 37.721660 |
| 108 | CamdenTown | CamdenTown5 | CT503 | NaN | NaN | 1 | NaN | NaN | NaN | NaN | ... | 0.01390 | 0.370 | 0.181 | 84.71 | 72.93 | 21.23 | 6.32 | 9.70 | 15.50 | 40.301608 |
| 109 | CamdenTown | CamdenTown5 | CT504 | NaN | NaN | 1 | NaN | NaN | NaN | NaN | ... | 0.01820 | 0.462 | 0.177 | 73.67 | 62.28 | 8.99 | 7.76 | 5.27 | 12.80 | 20.047791 |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 1904 | TorringtonSq | TorringtonSq5 | TS537 | NaN | NaN | 1 | NaN | NaN | NaN | NaN | ... | 0.00550 | 0.399 | 0.203 | 71.77 | 52.90 | 5.61 | 12.97 | 8.31 | 10.80 | 9.987229 |
| 1905 | TorringtonSq | TorringtonSq5 | TS538 | NaN | NaN | 1 | NaN | NaN | NaN | NaN | ... | 0.00916 | 0.359 | 0.230 | 68.85 | 56.30 | 10.09 | 9.27 | 8.16 | 9.99 | 14.359218 |
| 1906 | TorringtonSq | TorringtonSq5 | TS539 | NaN | NaN | 1 | NaN | NaN | NaN | NaN | ... | 0.00967 | 0.363 | 0.481 | 79.33 | 64.32 | 14.80 | 13.95 | 20.39 | 10.90 | 30.033977 |
| 1907 | TorringtonSq | TorringtonSq5 | TS540 | NaN | NaN | 1 | NaN | NaN | NaN | NaN | ... | 0.00902 | 0.445 | 0.257 | 67.57 | 49.33 | 2.64 | 12.12 | 5.04 | 9.62 | 7.882057 |
| 1908 | TorringtonSq | TorringtonSq5 | TS541 | NaN | NaN | 1 | NaN | NaN | NaN | NaN | ... | 0.00930 | 0.404 | 0.246 | 78.01 | 59.17 | 16.54 | 14.17 | 17.02 | 11.10 | 20.284137 |
627 rows × 78 columns
In [20]:
Copied!
ss_data.dropna(subset=["Appropriate"], inplace=True)
ss_data.dropna(subset=["LocationID"], inplace=True)
ss_data.dropna(subset=["Appropriate"], inplace=True)
ss_data.dropna(subset=["LocationID"], inplace=True)
In [21]:
Copied!
%autoreload
ss_res = circumplex.ssm_analyse(ss_data, scales, measures=["Appropriate"], grouping=["LocationID"])
ss_res.plot()
%autoreload
ss_res = circumplex.ssm_analyse(ss_data, scales, measures=["Appropriate"], grouping=["LocationID"])
ss_res.plot()
Out[21]:
(<Figure size 640x480 with 1 Axes>, <PolarAxes: >)
In [22]:
Copied!
ss_res.table
ss_res.table
Out[22]:
| label | group | measure | elevation | xval | yval | amplitude | displacement | r2 | PAQ1 | PAQ2 | PAQ3 | PAQ4 | PAQ5 | PAQ6 | PAQ7 | PAQ8 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| CamdenTown_Appropriate | CamdenTown_Appropriate | CamdenTown | Appropriate | -0.012624 | 0.009983 | 0.198888 | 0.199139 | 87.126609 | 0.748778 | 0 | 45 | 90 | 135 | 180 | 225 | 270 | 315 |
| EustonTap_Appropriate | EustonTap_Appropriate | EustonTap | Appropriate | -0.053329 | 0.088189 | 0.076755 | 0.116913 | 41.034683 | 0.318162 | 0 | 45 | 90 | 135 | 180 | 225 | 270 | 315 |
| MarchmontGarden_Appropriate | MarchmontGarden_Appropriate | MarchmontGarden | Appropriate | 0.035732 | 0.247035 | -0.167318 | 0.298364 | 325.890005 | 0.965836 | 0 | 45 | 90 | 135 | 180 | 225 | 270 | 315 |
| MonumentoGaribaldi_Appropriate | MonumentoGaribaldi_Appropriate | MonumentoGaribaldi | Appropriate | 0.033375 | 0.165411 | 0.157678 | 0.228524 | 43.628852 | 0.474805 | 0 | 45 | 90 | 135 | 180 | 225 | 270 | 315 |
| PancrasLock_Appropriate | PancrasLock_Appropriate | PancrasLock | Appropriate | -0.015507 | 0.350502 | -0.049884 | 0.354034 | 351.899919 | 0.909881 | 0 | 45 | 90 | 135 | 180 | 225 | 270 | 315 |
| RegentsParkFields_Appropriate | RegentsParkFields_Appropriate | RegentsParkFields | Appropriate | 0.008437 | 0.412197 | -0.098031 | 0.423694 | 346.622152 | 0.920718 | 0 | 45 | 90 | 135 | 180 | 225 | 270 | 315 |
| RegentsParkJapan_Appropriate | RegentsParkJapan_Appropriate | RegentsParkJapan | Appropriate | -0.017871 | 0.222595 | -0.099201 | 0.243699 | 335.979462 | 0.822661 | 0 | 45 | 90 | 135 | 180 | 225 | 270 | 315 |
| RussellSq_Appropriate | RussellSq_Appropriate | RussellSq | Appropriate | -0.037783 | 0.416207 | 0.070529 | 0.422140 | 9.617804 | 0.943055 | 0 | 45 | 90 | 135 | 180 | 225 | 270 | 315 |
| SanMarco_Appropriate | SanMarco_Appropriate | SanMarco | Appropriate | 0.043938 | 0.155632 | 0.227018 | 0.275243 | 55.567422 | 0.940069 | 0 | 45 | 90 | 135 | 180 | 225 | 270 | 315 |
| StPaulsCross_Appropriate | StPaulsCross_Appropriate | StPaulsCross | Appropriate | 0.064805 | 0.312216 | -0.055789 | 0.317161 | 349.868872 | 0.891766 | 0 | 45 | 90 | 135 | 180 | 225 | 270 | 315 |
| StPaulsRow_Appropriate | StPaulsRow_Appropriate | StPaulsRow | Appropriate | -0.077965 | 0.382289 | -0.014567 | 0.382566 | 357.817845 | 0.954414 | 0 | 45 | 90 | 135 | 180 | 225 | 270 | 315 |
| TateModern_Appropriate | TateModern_Appropriate | TateModern | Appropriate | -0.023393 | 0.326791 | 0.097733 | 0.341092 | 16.650245 | 0.956939 | 0 | 45 | 90 | 135 | 180 | 225 | 270 | 315 |
| TorringtonSq_Appropriate | TorringtonSq_Appropriate | TorringtonSq | Appropriate | -0.024703 | 0.219167 | 0.135520 | 0.257681 | 31.730213 | 0.945766 | 0 | 45 | 90 | 135 | 180 | 225 | 270 | 315 |
In [23]:
Copied!
ss_res.profile_plots();
ss_res.profile_plots();
In [24]:
Copied!
circumplex.profile_plot(
0.22,
332.3,
0,
0.777,
ss_res.query_label('RegentsParkJapan_Appropriate').angles,
ss_res.query_label('RegentsParkJapan_Appropriate').scores,
"Appropriate",
)
plt.show()
circumplex.profile_plot(
0.22,
332.3,
0,
0.777,
ss_res.query_label('RegentsParkJapan_Appropriate').angles,
ss_res.query_label('RegentsParkJapan_Appropriate').scores,
"Appropriate",
)
plt.show()
In [25]:
Copied!
sspy.plotting.scatter(ss_res.table, x='xval', y='yval')
sspy.plotting.scatter(ss_res.table, x='xval', y='yval')
Out[25]:
<Axes: title={'center': 'Soundscape Scatter Plot'}, xlabel='xval', ylabel='yval'>
Instruments¶
In [26]:
Copied!
from circumplex.datasets import SATP_ENG
satp_eng = SATP_ENG
satp_eng.summary()
from circumplex.datasets import SATP_ENG
satp_eng = SATP_ENG
satp_eng.summary()
SATP-eng: Soundscape Attributes Translation Project - English Translation 8 Items, 8 Scales Aletta, Mitchell, et.al. (2024) <> The SATP-eng contains 8 circumplex scales. PAQ1: pleasant (0°) PAQ2: vibrant (46°) PAQ3: eventful (93°) PAQ4: chaotic (138°) PAQ5: annoying (178°) PAQ6: monotonous (228°) PAQ7: uneventful (272°) PAQ8: calm (340°) The SATP-eng is rated using the following 5-point scale. 0. Strongly disagree 25. Somewhat disagree 50. Neither agree nor disagree 75. Somewhat agree 100. Strongly agree The SATP-eng contains 8 items (open-access). None
In [27]:
Copied!
satp_eng.demo_plot()
satp_eng.demo_plot()
In [28]:
Copied!
satp_eng_res = satp_eng.ssm_analyse(measures=['loud'])
print(satp_eng_res)
satp_eng_res = satp_eng.ssm_analyse(measures=['loud'])
print(satp_eng_res)
====================================
Measure: loud
Group: None
Scales: ['PAQ1', 'PAQ2', 'PAQ3', 'PAQ4', 'PAQ5', 'PAQ6', 'PAQ7', 'PAQ8']
Scale Angles: (0, 46, 93, 138, 178, 228, 272, 340)
Profile [All]:
Estimate
Elevation: 0.002
X-Value: -0.58
Y-Value: 0.342
Amplitude: 0.674
Displacement: 149.477
R2: 0.983
In [6]:
Copied!
satp_eng_res.plot()
satp_eng_res.plot()
Out[6]:
(<Figure size 640x480 with 1 Axes>, <PolarAxes: >)
In [10]:
Copied!
satp_eng_res.results[0].profile_plot();
satp_eng_res.results[0].profile_plot();
In [10]:
Copied!
In [ ]:
Copied!