Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • hub-courses/scientific_python
1 result
Show changes
Commits on Source (40)
Showing
with 19596 additions and 7846 deletions
image: python:3.9-slim-buster
stages:
- build
- deploy
before_script:
- pip install jupyter nbconvert
build_notebooks:
stage: build
script:
- mkdir -p public
- jupyter nbconvert --to html notebooks/*.ipynb --output-dir=public
artifacts:
paths:
- public
pages:
stage: deploy
script:
- echo "Deploying Pages"
artifacts:
paths:
- public
only:
- master
# Scientific Python Course (2022) # Scientific Python Course (2024)
1. Jupyter 1. Jupyter
2. Numpy 2. Numpy
......
# generated with fooo software version 12bis
# 2021/02/31
cond1 cond2 cond3 control
14.644417316782045 2.9453091400880465 24.81171864537413 5.114340165446571
12.071043262601615 4.406424332565544 21.574601309211538 2.5071180945299716
8.22746914709182 3.1852515050248806 20.651622951732826 4.449592659096083
8.980799267050571 9.233559928496131 24.859737015171184 4.127918884772492
9.080358618317588 5.6291920085265135 18.443503656148863 4.268572385815164
7.694230104854875 6.503020711301696 18.642541613874208 3.5498483909671847
7.599781675347266 0.7177137140372931 18.03202862910317 3.1828829793978084
11.698701634107119 5.233623279246819 23.233583470920532 4.551872236377363
12.85118587601311 4.164908508298177 16.777059698760876 4.012697826284397
10.222007465214453 3.8530606053667746 18.405248139687373 4.903494599422023
9.035341050392997 9.868423421164657 10.61345524543305 3.117720428019477
11.834986953457499 4.963792795860263 19.390888914271695 5.255737684774923
16.631862710777938 5.160719789626399 22.031801649843125 3.458114946454981
7.022382345586635 5.477115208396248 20.53377003464508 3.891374022263035
11.985764144031462 3.361795864423141 23.416100873409878 3.828626778977407
10.59188104130614 3.77317240684574 23.904882625215564 3.1120633325977027
15.35918866611064 4.036201248179169 17.908928899888497 3.939218000053589
7.7070476362557825 7.2307829291524195 20.88685879579244 3.021976077990768
13.369820519999111 1.265825280316033 17.216926090913454 3.3039869741919916
17.400218295628783 7.277575910141663 13.258902467740844 4.05865692313663
AK1BA_HUMAN sp|O60218|AK1BA_HUMAN 100.00 316 0 0 1 316 1 316 0.0 654
AK1BA_HUMAN sp|C9JRZ8|AK1BF_HUMAN 91.16 294 26 0 23 316 51 344 0.0 559
AK1BA_HUMAN sp|O08782|ALD2_CRIGR 83.23 316 53 0 1 316 1 316 0.0 537
AK1BA_HUMAN sp|P45377|ALD2_MOUSE 82.28 316 56 0 1 316 1 316 0.0 527
AK1BA_HUMAN sp|P21300|ALD1_MOUSE 79.75 316 64 0 1 316 1 316 0.0 515
AK1BA_HUMAN sp|Q5RJP0|ALD1_RAT 78.16 316 69 0 1 316 1 316 2e-177 501
AK1BA_HUMAN sp|P15122|ALDR_RABIT 72.15 316 88 0 1 316 1 316 1e-162 462
AK1BA_HUMAN sp|P07943|ALDR_RAT 71.11 315 91 0 1 315 1 315 3e-161 459
AK1BA_HUMAN sp|P15121|ALDR_HUMAN 70.57 316 93 0 1 316 1 316 1e-160 458
AK1BA_HUMAN sp|P45376|ALDR_MOUSE 70.48 315 93 0 1 315 1 315 2e-160 457
AK1BA_HUMAN sp|P16116|ALDR_BOVIN 72.12 312 87 0 5 316 4 315 4e-159 454
AK1BA_HUMAN sp|P80276|ALDR_PIG 71.52 316 90 0 1 316 1 316 7e-158 451
AK1BA_HUMAN sp|P82125|AKCL2_PIG 60.00 305 116 1 12 316 3 301 7e-131 382
AK1BA_HUMAN sp|Q4R802|AKCL2_MACFA 54.46 325 123 2 11 316 2 320 2e-119 353
AK1BA_HUMAN sp|Q96JD6|AKCL2_HUMAN 54.46 325 123 3 11 316 2 320 2e-117 348
AK1BA_HUMAN sp|Q9DCT1|AKCL2_MOUSE 56.91 304 125 1 13 316 4 301 4e-117 347
AK1BA_HUMAN sp|Q6AZW2|A1A1A_DANRE 56.04 298 128 2 1 297 1 296 1e-116 346
AK1BA_HUMAN sp|Q5U1Y4|AKCL2_RAT 56.39 305 127 1 12 316 3 301 3e-116 344
AK1BA_HUMAN sp|Q8VCX1|AK1D1_MOUSE 51.90 316 148 2 5 316 10 325 5e-111 332
AK1BA_HUMAN sp|P51857|AK1D1_HUMAN 50.79 317 151 2 5 316 10 326 8e-111 331
AK1BA_HUMAN sp|Q9TV64|AK1D1_RABIT 50.79 317 151 2 5 316 10 326 3e-110 330
AK1BA_HUMAN sp|Q9JII6|AK1A1_MOUSE 50.15 325 150 3 2 316 3 325 1e-108 326
AK1BA_HUMAN sp|P31210|AK1D1_RAT 51.74 317 148 3 5 316 10 326 1e-108 326
AK1BA_HUMAN sp|P51635|AK1A1_RAT 50.15 325 150 3 2 316 3 325 1e-108 325
AK1BA_HUMAN sp|Q5R5D5|AK1A1_PONAB 48.92 325 154 3 2 316 3 325 3e-106 320
AK1BA_HUMAN sp|P14550|AK1A1_HUMAN 48.92 325 154 3 2 316 3 325 4e-106 319
AK1BA_HUMAN sp|P80508|PE2R_RABIT 50.63 316 152 2 5 316 8 323 6e-106 319
AK1BA_HUMAN sp|P50578|AK1A1_PIG 49.54 325 152 3 2 316 3 325 3e-105 317
AK1BA_HUMAN sp|Q5ZK84|AK1A1_CHICK 52.01 323 143 3 4 316 7 327 6e-105 317
AK1BA_HUMAN sp|Q6GMC7|AK1A1_XENLA 51.37 329 145 4 1 316 1 327 3e-104 315
AK1BA_HUMAN sp|Q28FD1|AK1A1_XENTR 51.37 329 145 4 1 316 1 327 3e-103 312
AK1BA_HUMAN sp|P52895|AK1C2_HUMAN 48.73 316 158 2 5 316 8 323 9e-103 311
AK1BA_HUMAN sp|Q3ZCJ2|AK1A1_BOVIN 48.31 325 156 3 2 316 3 325 1e-102 310
AK1BA_HUMAN sp|P52898|DDBX_BOVIN 49.05 316 157 2 5 316 8 323 5e-102 309
AK1BA_HUMAN sp|Q5REQ0|AK1C1_PONAB 48.10 316 160 2 5 316 8 323 6e-102 308
AK1BA_HUMAN sp|P17516|AK1C4_HUMAN 48.10 316 160 2 5 316 8 323 1e-101 308
AK1BA_HUMAN sp|Q04828|AK1C1_HUMAN 48.10 316 160 2 5 316 8 323 1e-101 308
AK1BA_HUMAN sp|Q5R7C9|AK1C3_PONAB 48.42 316 159 2 5 316 8 323 1e-101 308
AK1BA_HUMAN sp|Q1XAA8|AK1CN_HORSE 47.94 315 161 1 5 316 8 322 1e-100 305
AK1BA_HUMAN sp|Q6W8P9|AK1CO_HORSE 48.70 308 154 2 13 316 16 323 1e-100 305
AK1BA_HUMAN sp|P70694|DHB5_MOUSE 48.10 316 160 2 5 316 8 323 3e-100 304
AK1BA_HUMAN sp|Q95JH5|AK1C4_MACFA 47.47 316 162 2 5 316 8 323 3e-100 304
AK1BA_HUMAN sp|P52897|PGFS2_BOVIN 48.38 308 155 2 13 316 16 323 4e-100 304
AK1BA_HUMAN sp|Q95JH4|AK1C4_MACFU 47.15 316 163 2 5 316 8 323 8e-100 303
AK1BA_HUMAN sp|P05980|PGFS1_BOVIN 47.47 316 162 2 5 316 8 323 9e-100 303
AK1BA_HUMAN sp|P42330|AK1C3_HUMAN 47.47 316 162 2 5 316 8 323 9e-100 303
AK1BA_HUMAN sp|Q95JH6|AK1C1_MACFU 47.78 316 161 2 5 316 8 323 1e-99 303
AK1BA_HUMAN sp|Q568L5|A1A1B_DANRE 49.08 326 154 3 1 316 1 324 2e-99 302
AK1BA_HUMAN sp|Q95JH7|AK1C1_MACFA 47.47 316 162 2 5 316 8 323 3e-99 301
AK1BA_HUMAN sp|P17264|CRO_LITCT 47.17 318 164 2 3 316 7 324 2e-98 300
AK1BA_HUMAN sp|P02532|CRO_RANTE 46.54 318 166 2 3 316 7 324 2e-98 299
AK1BA_HUMAN sp|Q8VC28|AK1CD_MOUSE 47.34 319 158 4 5 316 8 323 2e-97 297
AK1BA_HUMAN sp|P51652|AKC1H_RAT 44.65 318 168 4 5 316 8 323 3e-96 294
AK1BA_HUMAN sp|P23457|DIDH_RAT 46.03 315 166 2 5 315 8 322 1e-94 290
AK1BA_HUMAN sp|Q8K023|AKC1H_MOUSE 44.62 316 171 2 5 316 8 323 4e-94 288
AK1BA_HUMAN sp|Q91WR5|AK1CL_MOUSE 44.48 308 167 2 13 316 16 323 4e-90 278
AK1BA_HUMAN sp|P82809|AK1CD_MESAU 43.32 307 170 2 13 315 16 322 2e-85 266
AK1BA_HUMAN sp|Q6AYQ2|AK1CL_RAT 43.71 318 166 5 5 316 8 318 2e-84 263
AK1BA_HUMAN sp|Q54NZ7|ALRB_DICDI 47.10 293 139 5 13 299 17 299 1e-82 259
AK1BA_HUMAN sp|Q6IMN8|ALRA_DICDI 44.11 297 148 5 6 300 6 286 5e-79 249
AK1BA_HUMAN sp|O70473|AK1A1_CRIGR 51.74 230 108 2 15 243 1 228 3e-78 244
AK1BA_HUMAN sp|Q0PGJ6|AKRC9_ARATH 44.33 291 140 4 3 287 6 280 5e-75 239
AK1BA_HUMAN sp|P49378|XYL1_KLULA 42.68 314 159 7 1 297 4 313 2e-70 228
AK1BA_HUMAN sp|Q55FL3|ALRC_DICDI 41.67 300 159 4 6 299 18 307 9e-70 226
AK1BA_HUMAN sp|H9JTG9|AK2E4_BOMMO 39.56 316 169 5 2 311 5 304 2e-69 224
AK1BA_HUMAN sp|Q84TF0|AKRCA_ARATH 41.03 290 149 4 4 287 7 280 5e-69 224
AK1BA_HUMAN sp|P27800|ALDX_SPOSA 43.79 306 156 6 1 301 1 295 2e-68 222
AK1BA_HUMAN sp|Q6Y0Z3|XYL1_CANPA 40.81 321 156 7 5 301 10 320 3e-68 222
AK1BA_HUMAN sp|O80944|AKRC8_ARATH 41.91 303 161 6 4 306 7 294 7e-68 221
AK1BA_HUMAN sp|P22045|PGFS_LEIMA 42.91 296 140 6 3 297 7 274 9e-68 219
AK1BA_HUMAN sp|Q5BGA7|XYL1_EMENI 42.38 302 163 5 5 297 6 305 2e-67 219
AK1BA_HUMAN sp|P14065|GCY1_YEAST 41.89 296 150 6 4 291 11 292 6e-67 218
AK1BA_HUMAN sp|Q10494|YDG7_SCHPO 43.06 288 153 5 7 292 18 296 3e-66 217
AK1BA_HUMAN sp|Q9GV41|PGFS_TRYBB 41.84 294 134 5 5 297 7 264 3e-66 215
AK1BA_HUMAN sp|O13283|XYL1_CANTR 40.75 319 159 7 5 301 10 320 4e-66 216
AK1BA_HUMAN sp|P87039|XYL2_CANTR 40.75 319 159 7 5 301 10 320 5e-66 216
AK1BA_HUMAN sp|Q4DJ07|PGFS_TRYCC 40.20 296 139 7 5 297 8 268 1e-65 214
AK1BA_HUMAN sp|O94735|XYL1_PICGU 40.89 313 157 7 5 296 3 308 5e-65 213
AK1BA_HUMAN sp|P38715|GRE3_YEAST 40.38 317 163 7 1 297 1 311 2e-64 212
AK1BA_HUMAN sp|A1D4E3|XYL1_NEOFI 40.62 320 171 6 5 311 6 319 3e-64 212
AK1BA_HUMAN sp|P78736|XYL1_PACTA 41.75 309 156 7 4 297 5 304 3e-64 211
AK1BA_HUMAN sp|Q12458|YPR1_YEAST 41.95 298 149 8 5 294 12 293 5e-64 211
AK1BA_HUMAN sp|A0QV10|Y2408_MYCS2 40.07 297 144 5 1 297 1 263 1e-63 209
AK1BA_HUMAN sp|Q9M338|AKRCB_ARATH 41.46 287 146 4 4 284 7 277 1e-63 209
AK1BA_HUMAN sp|P28475|S6PD_MALDO 37.70 313 164 6 1 298 1 297 3e-63 209
AK1BA_HUMAN sp|Q9P430|XYL1_SCHSH 40.38 312 168 5 6 301 10 319 5e-62 206
AK1BA_HUMAN sp|A1CRI1|XYL1_ASPCL 40.52 306 163 4 5 297 6 305 8e-62 206
AK1BA_HUMAN sp|Q4WJT9|XYL1_ASPFU 40.20 306 164 6 5 297 6 305 1e-61 205
AK1BA_HUMAN sp|B0XNR0|XYL1_ASPFC 40.20 306 164 6 5 297 6 305 1e-61 205
AK1BA_HUMAN sp|Q3ZFI7|GAR1_HYPJE 39.80 299 160 9 1 295 2 284 2e-61 204
AK1BA_HUMAN sp|Q9P8R5|XYL1_ASPNG 39.40 302 172 4 5 297 6 305 2e-61 204
AK1BA_HUMAN sp|A2Q8B5|XYL1_ASPNC 39.40 302 172 4 5 297 6 305 2e-61 204
AK1BA_HUMAN sp|Q2UKD0|XYL1_ASPOR 40.20 306 164 4 5 297 6 305 4e-61 203
AK1BA_HUMAN sp|B8N195|XYL1_ASPFN 40.20 306 164 4 5 297 6 305 4e-61 203
AK1BA_HUMAN sp|C5FFQ7|XYL1_ARTOC 39.94 308 174 3 2 300 10 315 9e-61 202
AK1BA_HUMAN sp|O74237|XYL1_CANTE 39.62 313 171 5 5 301 8 318 1e-60 202
AK1BA_HUMAN sp|P31867|XYL1_PICST 40.26 308 162 6 5 297 4 304 2e-60 202
AK1BA_HUMAN sp|Q01213|DTDH_MUCMU 39.93 298 168 4 9 297 11 306 2e-60 201
AK1BA_HUMAN sp|Q8X195|XYL1_CANBO 39.87 311 165 7 4 296 5 311 2e-59 199
AK1BA_HUMAN sp|Q0GYU4|GLD2_HYPJE 39.31 290 163 7 7 289 8 291 2e-59 199
AK1BA_HUMAN sp|P23901|ALDR_HORVU 40.00 290 151 7 7 292 18 288 2e-59 199
AK1BA_HUMAN sp|Q876L8|XYL1_HYPJE 39.34 305 170 6 5 297 6 307 6e-59 198
AK1BA_HUMAN sp|O42888|YBN4_SCHPO 38.89 288 165 5 4 289 14 292 3e-58 196
AK1BA_HUMAN sp|Q0CUL0|XYL1_ASPTN 39.16 309 173 6 1 297 1 306 5e-58 195
AK1BA_HUMAN sp|Q46857|DKGA_ECOLI 35.93 295 155 6 3 297 5 265 7e-58 193
AK1BA_HUMAN sp|G4N708|XYL1_MAGO7 39.34 305 170 6 5 297 6 307 2e-57 194
AK1BA_HUMAN sp|O34678|YTBE_BACSU 41.10 292 139 5 7 297 11 270 4e-57 192
AK1BA_HUMAN sp|Q8XBT6|DKGA_ECO57 35.59 295 156 6 3 297 5 265 4e-57 191
AK1BA_HUMAN sp|Q8ZI40|DKGA_YERPE 35.84 293 154 6 1 293 3 261 2e-56 190
AK1BA_HUMAN sp|Q8SSK6|ALDR_ENCCU 37.88 293 170 5 6 297 7 288 2e-56 191
AK1BA_HUMAN sp|P38115|ARA1_YEAST 36.81 307 166 8 4 296 24 316 2e-56 192
AK1BA_HUMAN sp|G4MZI3|PRD1_MAGO7 37.05 305 171 6 3 289 4 305 3e-56 191
AK1BA_HUMAN sp|P26690|6DCS_SOYBN 38.28 303 160 5 3 295 11 296 3e-56 190
AK1BA_HUMAN sp|O32210|GR_BACSU 40.82 294 137 5 5 297 9 266 5e-56 189
AK1BA_HUMAN sp|Q9SQ64|COR2_PAPSO 38.05 297 156 6 5 289 9 289 6e-56 190
AK1BA_HUMAN sp|A1UEC6|Y1985_MYCSK 37.50 296 151 4 2 297 3 264 5e-55 186
AK1BA_HUMAN sp|A3PXT0|Y1919_MYCSJ 37.80 291 147 4 2 292 3 259 6e-55 186
AK1BA_HUMAN sp|O14088|YER5_SCHPO 33.66 303 164 5 1 299 2 271 1e-54 185
AK1BA_HUMAN sp|O49133|GALUR_FRAAN 37.77 278 161 6 13 286 19 288 2e-54 186
AK1BA_HUMAN sp|Q9SQ67|COR14_PAPSO 36.91 298 160 7 4 289 8 289 3e-53 182
AK1BA_HUMAN sp|Q9SQ69|COR12_PAPSO 37.46 299 157 7 4 289 8 289 5e-53 182
AK1BA_HUMAN sp|Q8ZM06|DKGA_SALTY 37.63 295 150 6 3 297 5 265 6e-52 178
AK1BA_HUMAN sp|P58744|DKGA_SALTI 37.63 295 150 6 3 297 5 265 8e-52 177
AK1BA_HUMAN sp|Q0GYU5|GLD1_HYPJE 40.14 294 157 7 5 289 7 290 9e-52 179
AK1BA_HUMAN sp|P47137|YJ66_YEAST 34.97 286 155 4 4 286 5 262 3e-51 176
AK1BA_HUMAN sp|Q02198|MORA_PSEPU 36.33 289 157 6 4 289 7 271 1e-50 175
AK1BA_HUMAN sp|A1T726|Y2161_MYCVP 34.35 294 157 5 5 297 10 268 6e-50 173
AK1BA_HUMAN sp|Q7G765|NADO2_ORYSJ 34.35 294 175 7 1 285 3 287 1e-48 171
AK1BA_HUMAN sp|Q7G764|NADO1_ORYSJ 33.89 298 179 7 1 289 1 289 1e-48 171
AK1BA_HUMAN sp|A4TE41|Y4205_MYCGI 33.45 293 161 4 5 297 10 268 4e-48 168
AK1BA_HUMAN sp|A1UEC5|Y1984_MYCSK 32.42 293 164 5 5 297 14 272 8e-48 167
AK1BA_HUMAN sp|Q1BAN7|Y1938_MYCSS 32.42 293 164 5 5 297 14 272 8e-48 167
AK1BA_HUMAN sp|A3PXS9|Y1918_MYCSJ 32.42 293 164 5 5 297 14 272 8e-48 167
AK1BA_HUMAN sp|Q9C1X5|YKW2_SCHPO 34.11 299 162 7 2 298 8 273 8e-47 165
AK1BA_HUMAN sp|A0QV09|Y2407_MYCS2 31.97 294 164 5 5 297 14 272 2e-45 161
AK1BA_HUMAN sp|Q9SQ68|COR13_PAPSO 36.58 298 161 7 4 289 8 289 1e-44 160
AK1BA_HUMAN sp|Q9SQ70|COR11_PAPSO 36.54 301 157 8 4 289 8 289 9e-44 158
AK1BA_HUMAN sp|Q09632|YOF5_CAEEL 35.67 314 166 10 7 314 7 290 1e-43 158
AK1BA_HUMAN sp|E7C196|MER_ERYCB 37.67 300 152 6 5 285 8 291 1e-43 158
AK1BA_HUMAN sp|B9VRJ2|COR15_PAPSO 36.75 302 155 8 4 289 8 289 2e-43 157
AK1BA_HUMAN sp|A5U6Y1|Y2999_MYCTA 33.78 296 156 8 5 297 13 271 4e-43 155
AK1BA_HUMAN sp|P9WQA5|Y2971_MYCTU 33.78 296 156 8 5 297 13 271 4e-43 155
AK1BA_HUMAN sp|P9WQA4|Y2971_MYCTO 33.78 296 156 8 5 297 13 271 4e-43 155
AK1BA_HUMAN sp|Q7TXI6|Y2996_MYCBO 33.78 296 156 8 5 297 13 271 4e-43 155
AK1BA_HUMAN sp|A1KMW6|Y2993_MYCBP 33.78 296 156 8 5 297 13 271 4e-43 155
AK1BA_HUMAN sp|P06632|DKGA_CORSC 32.40 287 162 5 7 293 8 262 3e-42 153
AK1BA_HUMAN sp|A0QL30|Y4483_MYCA1 34.47 293 158 5 5 297 17 275 4e-39 144
AK1BA_HUMAN sp|Q76L36|CPRC2_CANPA 32.89 301 165 10 3 289 10 287 2e-38 143
AK1BA_HUMAN sp|Q73SC5|Y4149_MYCPA 33.79 293 160 5 5 297 17 275 3e-37 140
AK1BA_HUMAN sp|Q8ZH36|DKGB_YERPE 31.14 289 161 7 12 297 2 255 5e-37 138
AK1BA_HUMAN sp|Q73VK6|Y3007_MYCPA 30.27 294 169 6 5 297 12 270 3e-36 137
AK1BA_HUMAN sp|A0QJ99|Y3816_MYCA1 30.27 294 169 6 5 297 15 273 4e-36 137
AK1BA_HUMAN sp|A0PQ11|Y1987_MYCUA 29.25 294 172 6 5 297 13 271 5e-36 136
AK1BA_HUMAN sp|B2HIJ9|Y1744_MYCMM 29.25 294 172 6 5 297 12 270 5e-36 136
AK1BA_HUMAN sp|P15339|DKGB_CORSS 32.26 279 156 5 17 295 19 264 3e-34 131
AK1BA_HUMAN sp|Q8X7Z7|DKGB_ECO57 30.88 285 165 6 13 297 3 255 5e-34 130
AK1BA_HUMAN sp|Q8ZRM7|DKGB_SALTY 30.53 285 166 6 13 297 3 255 6e-34 130
AK1BA_HUMAN sp|Q8Z988|DKGB_SALTI 30.18 285 167 6 13 297 3 255 1e-33 129
AK1BA_HUMAN sp|P30863|DKGB_ECOLI 30.18 285 167 6 13 297 3 255 3e-33 128
AK1BA_HUMAN sp|O69462|Y1669_MYCLE 28.27 283 167 6 5 286 13 260 2e-30 121
AK1BA_HUMAN sp|B8ZS00|Y1669_MYCLB 28.27 283 167 6 5 286 13 260 2e-30 121
AK1BA_HUMAN sp|Q5T2L2|AKCL1_HUMAN 49.57 117 56 1 5 118 11 127 3e-30 116
AK1BA_HUMAN sp|O13848|I3ACR_SCHPO 31.60 288 159 9 7 286 6 263 2e-29 118
AK1BA_HUMAN sp|P76234|YEAE_ECOLI 30.30 297 163 8 4 289 5 268 3e-29 117
AK1BA_HUMAN sp|Q76L37|CPRC1_CANPA 27.18 309 167 9 6 289 9 284 1e-28 116
AK1BA_HUMAN sp|Q07551|KAR_YEAST 29.04 303 173 10 4 289 7 284 1e-25 108
AK1BA_HUMAN sp|Q9USV2|YHH5_SCHPO 30.20 255 142 8 35 286 33 254 2e-23 101
AK1BA_HUMAN sp|P46905|YCCK_BACSU 25.08 299 154 10 29 289 39 305 1e-17 85.1
AK1BA_HUMAN sp|Q94A68|Y1669_ARATH 24.08 299 176 9 25 292 84 362 7e-15 77.8
AK1BA_HUMAN sp|P82810|MORA_RABIT 31.18 170 45 5 117 286 27 124 9e-13 68.2
AK1BA_HUMAN sp|P46336|IOLS_BACSU 25.42 295 159 10 29 289 38 305 3e-12 69.7
AK1BA_HUMAN sp|P80874|GS69_BACSU 29.36 218 107 9 16 213 16 206 3e-11 67.0
AK1BA_HUMAN sp|Q56Y42|PLR1_ARATH 23.00 313 178 10 16 285 50 342 6e-09 60.1
AK1BA_HUMAN sp|P25906|YDBC_ECOLI 23.75 299 181 11 11 294 19 285 6e-09 59.7
AK1BA_HUMAN sp|C6TBN2|AKR1_SOYBN 25.32 316 178 13 9 290 19 310 6e-08 57.0
AK1BA_HUMAN sp|P49261|CROB_LEPLU 45.90 61 20 1 95 155 15 62 1e-06 50.1
Source diff could not be displayed: it is too large. Options to address this: view the blob.
City Year Tmp std
0 Barcelona 1995 62.01917808219179 9.569756297123327
1 Barcelona 1996 61.12595628415301 9.420764506001397
2 Barcelona 1997 62.61232876712331 9.827234879971101
3 Barcelona 1998 60.2739726027397 19.75012607691891
4 Barcelona 1999 61.20465753424656 13.904525518554435
5 Barcelona 2000 60.069398907103846 9.099817440252128
6 Barcelona 2001 59.27945205479454 10.523427017015313
7 Barcelona 2002 58.044109589041135 18.929773327478483
8 Barcelona 2003 63.13945205479458 15.153889346840758
9 Barcelona 2004 62.87513661202182 11.071518902264671
10 Barcelona 2005 62.041917808219225 12.211059284082598
11 Barcelona 2006 61.9854794520548 10.383211438819417
12 Barcelona 2007 60.556164383561644 13.128345584082622
13 Barcelona 2008 59.65191256830599 15.614665889880865
14 Barcelona 2009 61.552054794520586 13.90370839128742
15 Barcelona 2010 60.66794520547943 11.479319072602506
16 Barcelona 2011 62.83479452054788 10.102326479631735
17 Barcelona 2012 63.03224043715851 11.292237552376044
18 Barcelona 2013 62.24657534246573 10.973485554623132
19 Barcelona 2014 62.43726027397264 13.027373258325785
20 Barcelona 2015 61.795081967213115 16.233531266810775
21 Barcelona 2016 60.80081967213118 19.506541913124646
22 Barcelona 2017 62.51479452054798 11.352460171672947
23 Barcelona 2018 61.391506849315086 18.513200196464584
24 Barcelona 2019 59.71917808219182 23.21768377728357
25 Barcelona 2020 55.43731343283583 5.669011817215402
26 Bilbao 1995 58.94547945205482 9.152938194122601
27 Bilbao 1996 57.40928961748634 8.299521097803076
28 Bilbao 1997 59.65315068493152 8.59646759755442
29 Bilbao 1998 56.50794520547946 18.5087198753874
30 Bilbao 1999 57.86356164383562 13.254929144303365
31 Bilbao 2000 58.17704918032782 9.61060590126113
32 Bilbao 2001 59.258082191780844 10.785430834692193
33 Bilbao 2002 59.06191780821921 18.311794423082254
34 Bilbao 2003 61.98136986301364 11.109533738036083
35 Bilbao 2004 60.1620218579235 10.887947603849794
36 Bilbao 2005 60.47123287671232 12.180590300525083
37 Bilbao 2006 60.931506849315106 10.959762529415924
38 Bilbao 2007 57.378630136986295 12.556410441414583
39 Bilbao 2008 57.65546448087436 14.55881450004361
40 Bilbao 2009 58.33150684931509 12.957812746937886
41 Bilbao 2010 57.31945205479447 10.92548335370651
42 Bilbao 2011 60.064931506849376 9.37413895288166
43 Bilbao 2012 58.18196721311478 10.896172632501663
44 Bilbao 2013 58.078630136986355 10.692211568623678
45 Bilbao 2014 60.67041095890412 12.315738661838056
46 Bilbao 2015 59.06010928961746 14.845431712407324
47 Bilbao 2016 57.561748633879795 18.627752493559164
48 Bilbao 2017 58.831780821917825 9.579137034485704
49 Bilbao 2018 58.11095890410959 17.318878742319427
50 Bilbao 2019 57.03232876712337 20.566454771536044
51 Bilbao 2020 55.114925373134334 7.012797190171634
52 Bordeaux 1995 57.370136986301354 11.044040769557341
53 Bordeaux 1996 55.93497267759563 10.784892064762007
54 Bordeaux 1997 58.16931506849312 11.011332365506272
55 Bordeaux 1998 54.70493150684932 19.598395813702982
56 Bordeaux 1999 56.77917808219176 13.852986125645279
57 Bordeaux 2000 57.19071038251365 10.422852712768039
58 Bordeaux 2001 56.48027397260274 11.773260583198585
59 Bordeaux 2002 55.39232876712332 18.522743557653765
60 Bordeaux 2003 58.219452054794544 12.897343185222015
61 Bordeaux 2004 56.27841530054645 11.751133956460096
62 Bordeaux 2005 56.29835616438355 13.255407253879639
63 Bordeaux 2006 57.610410958904126 12.919541851158483
64 Bordeaux 2007 55.84027397260273 13.31117414308708
65 Bordeaux 2008 55.45765027322398 12.808973051265317
66 Bordeaux 2009 56.567671232876755 14.223581499075609
67 Bordeaux 2010 55.150136986301355 12.747677281767228
68 Bordeaux 2011 58.351506849315086 10.258827834959664
69 Bordeaux 2012 56.359016393442666 12.014168034051115
70 Bordeaux 2013 55.9295890410959 11.872014423803591
71 Bordeaux 2014 56.46931506849318 12.483597626262037
72 Bordeaux 2015 56.23169398907107 15.68360389372104
73 Bordeaux 2016 55.93715846994539 15.626511950502655
74 Bordeaux 2017 56.857260273972656 11.833635389820595
75 Bordeaux 2018 57.26931506849317 14.359770607228285
76 Bordeaux 2019 55.98712328767125 19.774109604678415
77 Bordeaux 2020 52.31268656716417 6.887914900422134
78 Madrid 1995 60.57424657534247 12.999120629367042
79 Madrid 1996 58.82896174863385 12.834437087673026
80 Madrid 1997 60.21095890410956 12.277039698083023
81 Madrid 1998 56.99123287671236 21.365555361221524
82 Madrid 1999 57.7158904109589 16.28990685923228
83 Madrid 2000 57.804371584699425 13.537680848457656
84 Madrid 2001 57.30356164383564 14.361118272929666
85 Madrid 2002 56.16986301369865 20.734617527028856
86 Madrid 2003 58.95178082191778 14.6895054246955
87 Madrid 2004 57.572677595628384 14.328101211175488
88 Madrid 2005 58.578630136986256 15.897967362219234
89 Madrid 2006 59.54575342465752 14.645098748612648
90 Madrid 2007 56.18767123287673 15.54338968721232
91 Madrid 2008 56.802459016393456 17.454694998719265
92 Madrid 2009 59.486849315068476 16.846571444704047
93 Madrid 2010 58.35260273972605 14.880927577599886
94 Madrid 2011 60.0972602739726 14.08172547926141
95 Madrid 2012 59.22103825136618 15.704333928077313
96 Madrid 2013 58.5898630136986 15.061813341527952
97 Madrid 2014 60.00684931506852 15.530396717043965
98 Madrid 2015 59.7360655737705 19.216008162034054
99 Madrid 2016 58.30437158469944 22.135516183890996
100 Madrid 2017 60.827123287671206 15.335287673221936
101 Madrid 2018 57.8893150684931 20.697793342645358
102 Madrid 2019 58.01808219178085 23.572917074236493
103 Madrid 2020 50.94477611940298 8.01996162933257
104 Milan 1995 51.81013698630133 17.66463472693756
105 Milan 1996 52.536338797814224 13.116517527084948
106 Milan 1997 54.71835616438357 13.622209061233912
107 Milan 1998 52.61287671232878 21.59552695083426
108 Milan 1999 54.47424657534245 16.44477420566477
109 Milan 2000 55.345355191256836 13.650382814023335
110 Milan 2001 54.585479452054756 14.728662443197207
111 Milan 2002 52.71205479452063 20.805079615305182
112 Milan 2003 55.6578082191781 16.522557860689197
113 Milan 2004 53.69234972677599 14.1368864235138
114 Milan 2005 53.44958904109592 15.527562558446604
115 Milan 2006 54.07835616438361 15.096444437450113
116 Milan 2007 54.0361643835616 15.97246623271815
117 Milan 2008 53.66912568306015 18.110549496608105
118 Milan 2009 54.2654794520548 17.799552797282026
119 Milan 2010 53.26958904109586 15.442853928856914
120 Milan 2011 55.66027397260276 14.933169251059093
121 Milan 2012 55.05191256830602 16.075172183078543
122 Milan 2013 54.34520547945205 14.6871237720894
123 Milan 2014 55.45205479452057 14.366357503176557
124 Milan 2015 55.02267759562845 18.553332365155743
125 Milan 2016 54.121584699453535 21.339925888669406
126 Milan 2017 56.38410958904112 15.184990043635842
127 Milan 2018 55.711780821917834 22.21152305528249
128 Milan 2019 54.58164383561645 24.353680984815433
129 Milan 2020 47.80373134328358 9.138676025892822
130 Paris 1995 53.742191780821955 20.406326470437165
131 Paris 1996 52.293169398907125 15.207324562142714
132 Paris 1997 55.57999999999997 12.745184826582006
133 Paris 1998 50.31753424657538 27.794294802597282
134 Paris 1999 54.565753424657565 13.99020869517814
135 Paris 2000 54.33770491803271 10.34568531230199
136 Paris 2001 53.94493150684927 12.074808387359592
137 Paris 2002 52.743013698630136 18.72207478617854
138 Paris 2003 54.56219178082192 13.721165395048772
139 Paris 2004 53.58524590163939 11.761756034192336
140 Paris 2005 53.40767123287677 14.98337160011056
141 Paris 2006 54.19972602739725 13.030265906537082
142 Paris 2007 53.57205479452048 12.96249396864273
143 Paris 2008 52.38169398907109 15.655254039470176
144 Paris 2009 53.061095890410954 14.640168245899794
145 Paris 2010 51.64821917808218 13.601742307439258
146 Paris 2011 55.00191780821926 10.339225513741106
147 Paris 2012 53.256557377049155 11.453752063627668
148 Paris 2013 52.08849315068489 14.922240911540998
149 Paris 2014 53.65041095890415 11.968850647395499
150 Paris 2015 53.43497267759561 15.680118495299984
151 Paris 2016 51.122950819672184 21.198085156034864
152 Paris 2017 54.36794520547941 11.949198207377224
153 Paris 2018 45.7731506849315 36.811172339412884
154 Paris 2019 52.20821917808223 22.72281465588924
155 Paris 2020 49.32014925373133 7.458857376369018
156 Rome 1995 59.67780821917805 10.85141534377517
157 Rome 1996 59.125956284152984 10.481723613267679
158 Rome 1997 60.45260273972603 10.581853899170923
159 Rome 1998 58.78575342465755 20.341707676662004
160 Rome 1999 60.2827397260274 14.662355669944747
161 Rome 2000 60.301366120218574 13.68558578952963
162 Rome 2001 60.5652054794521 10.709699325458592
163 Rome 2002 58.55150684931504 19.576252129773003
164 Rome 2003 61.05999999999997 12.978538497784012
165 Rome 2004 59.942896174863485 11.47532391640649
166 Rome 2005 59.00958904109588 12.478535024958282
167 Rome 2006 60.395890410958906 11.92679638779288
168 Rome 2007 60.57671232876712 13.676997217875977
169 Rome 2008 60.20819672131149 16.17226743532121
170 Rome 2009 61.091506849315024 14.458681531324565
171 Rome 2010 60.28109589041099 11.563938305153439
172 Rome 2011 60.90219178082182 11.206865812382413
173 Rome 2012 61.075136612021915 12.547324524416043
174 Rome 2013 61.049315068493144 11.625454301505501
175 Rome 2014 61.882465753424654 12.959953934766476
176 Rome 2015 60.57213114754101 16.531134240619526
177 Rome 2016 61.185245901639334 15.914192883864587
178 Rome 2017 61.3778082191781 11.916595484036199
179 Rome 2018 60.82136986301364 20.327931936122738
180 Rome 2019 59.215068493150675 23.514064479810376
181 Rome 2020 52.67611940298508 6.224293650229102
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -28,7 +28,7 @@ def illustration_confidence_interval(m=46, s=1, alpha=0.05): ...@@ -28,7 +28,7 @@ def illustration_confidence_interval(m=46, s=1, alpha=0.05):
plt.axhline(0, color='k', linestyle=':', linewidth=1) plt.axhline(0, color='k', linestyle=':', linewidth=1)
plt.xlabel('population mean') plt.xlabel('population mean')
plt.ylabel('probability density') plt.ylabel('probability density')
plt.axvline(m, color='k', linestyle=':', linewidth=1, label='sample mean') plt.axvline(m, color='g', linestyle=':', linewidth=1, label='sample mean')
u = stats.norm().isf(alpha / 2) u = stats.norm().isf(alpha / 2)
ci_low = m - u * s ci_low = m - u * s
...@@ -40,14 +40,14 @@ def illustration_confidence_interval(m=46, s=1, alpha=0.05): ...@@ -40,14 +40,14 @@ def illustration_confidence_interval(m=46, s=1, alpha=0.05):
ml = (grid[0]+4*ci_low)/5 ml = (grid[0]+4*ci_low)/5
pl = (2*pdf(ci_low)+pdf(m))/3 pl = (2*pdf(ci_low)+pdf(m))/3
plt.annotate(f'${alpha/2*100}\%$', plt.annotate(f'${alpha/2*100}\\%$',
[ml, .1*pdf(ml)], [ml, pl], [ml, .1*pdf(ml)], [ml, pl],
arrowprops=dict(arrowstyle="->"), arrowprops=dict(arrowstyle="->"),
horizontalalignment='center') horizontalalignment='center')
ml1 = (4*m+ci_high)/5 ml1 = (4*m+ci_high)/5
ml2 = (m+ci_high)/2 ml2 = (m+ci_high)/2
plt.annotate(f'${(1-alpha)*100:.0f}\%$ prob. mass', plt.annotate(f'${(1-alpha)*100:.0f}\\%$ prob. mass',
[ml1, pl], [ml2, (pdf(ml2)+pdf(m))/2], [ml1, pl], [ml2, (pdf(ml2)+pdf(m))/2],
arrowprops=dict(arrowstyle="->")) arrowprops=dict(arrowstyle="->"))
...@@ -56,7 +56,7 @@ def illustration_confidence_interval(m=46, s=1, alpha=0.05): ...@@ -56,7 +56,7 @@ def illustration_confidence_interval(m=46, s=1, alpha=0.05):
width=line_width, head_length=head_length, linestyle='none') width=line_width, head_length=head_length, linestyle='none')
t = plt.arrow(ci_high-head_length, height, ci_low-ci_high+2*head_length, 0, t = plt.arrow(ci_high-head_length, height, ci_low-ci_high+2*head_length, 0,
width=line_width, head_length=head_length, linestyle='none') width=line_width, head_length=head_length, linestyle='none')
plt.text(m, height+line_width, f'${(1-alpha)*100:.0f}\%$ confidence interval', plt.text(m, height+line_width, f'${(1-alpha)*100:.0f}\\%$ confidence interval',
ha='center') ha='center')
plt.legend(loc='upper left') plt.legend(loc='upper left')
...@@ -76,7 +76,7 @@ def illustration_onesided_probabilitymass(z, N = stats.norm(0, 1), onesided_pval ...@@ -76,7 +76,7 @@ def illustration_onesided_probabilitymass(z, N = stats.norm(0, 1), onesided_pval
plt.xlim(grid[[0,-1]]) plt.xlim(grid[[0,-1]])
plt.xlabel('$X$') plt.xlabel('$X$')
plt.ylabel('probability density') plt.ylabel('probability density')
plt.legend([pdf_curve, z_line], ['$\mathcal{N}(0,1)$', '$z$']) plt.legend([pdf_curve, z_line], [r'$\mathcal{N}(0,1)$', '$z$'])
plt.annotate(f'$\\approx {onesided_pvalue:.2f}$', (1.8, .03), xytext=(2, .13), arrowprops=dict(arrowstyle="->")) plt.annotate(f'$\\approx {onesided_pvalue:.2f}$', (1.8, .03), xytext=(2, .13), arrowprops=dict(arrowstyle="->"))
def illustration_t_pdfs(): def illustration_t_pdfs():
...@@ -121,7 +121,7 @@ def illustration_skewness_kurtosis(): ...@@ -121,7 +121,7 @@ def illustration_skewness_kurtosis():
ax = axes[0] ax = axes[0]
for sigma, color in zip((.25, .5, 1), colors): for sigma, color in zip((.25, .5, 1), colors):
ax.plot(grid, skewed_dist(sigma, grid), '-', color=color, label=f'$\sigma={sigma:.2f}$') ax.plot(grid, skewed_dist(sigma, grid), '-', color=color, label=f'$\\sigma={sigma:.2f}$')
ax.axhline(0, linestyle='--', color='grey', linewidth=1) ax.axhline(0, linestyle='--', color='grey', linewidth=1)
ax.set_xlim(grid[[0,-1]]) ax.set_xlim(grid[[0,-1]])
...@@ -159,7 +159,7 @@ def illustration_chi2(): ...@@ -159,7 +159,7 @@ def illustration_chi2():
ax.axhline(0, linestyle='--', color='grey', linewidth=1) ax.axhline(0, linestyle='--', color='grey', linewidth=1)
ax.set_xlim(grid[0],grid[-1]) ax.set_xlim(grid[0],grid[-1])
ax.set_xlabel('$\chi^2$') ax.set_xlabel(r'$\chi^2$')
ax.set_ylabel('probability density') ax.set_ylabel('probability density')
ax.legend([ f'$df={df}$' for df in dfs ]) ax.legend([ f'$df={df}$' for df in dfs ])
...@@ -169,7 +169,7 @@ def illustration_chi2(): ...@@ -169,7 +169,7 @@ def illustration_chi2():
ax.plot(grid, chi2, '-', color=color) ax.plot(grid, chi2, '-', color=color)
ax.axhline(0, linestyle='--', color='grey', linewidth=1) ax.axhline(0, linestyle='--', color='grey', linewidth=1)
ax.set_xlim(grid[0],grid[-1]) ax.set_xlim(grid[0],grid[-1])
ax.set_xlabel('$\chi^2$') ax.set_xlabel(r'$\chi^2$')
ax.set_ylabel('probability density'); ax.set_ylabel('probability density');
A = [85, 86, 88, 75, 78, 94, 98, 79, 71, 80] A = [85, 86, 88, 75, 78, 94, 98, 79, 71, 80]
......
%% Cell type:markdown id:vocal-argument tags:
# <center><b>Course</b></center>
<div style="text-align:center">
<img src="../images/seaborn.png" width="600px">
<div>
Bertrand Néron, François Laurent, Etienne Kornobis
<br />
<a src=" https://research.pasteur.fr/en/team/bioinformatics-and-biostatistics-hub/">Bioinformatics and Biostatistiqucs HUB</a>
<br />
© Institut Pasteur, 2021
</div>
</div>
%% Cell type:markdown id:minute-stylus tags:
# A glimpse at Seaborn
%% Cell type:markdown id:monthly-royalty tags:
Seaborn is a Python data visualization library based on **Matplotlib**. It provides a high-level interface for drawing attractive and informative statistical graphics while still being able to use matplotlib features.
It is organized depending on the type of data you want to represent:
%% Cell type:markdown id:suffering-attendance tags:
<img src="../images/seaborn_plots.png" width="600px">
%% Cell type:markdown id:legislative-currency tags:
You can use the `relplot`, `displot`, `catplot` group functions or directly call the function corresponding to a specific plot.
%% Cell type:code id:apparent-logan tags:
``` python
import pandas as pd
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
```
%% Cell type:code id:3c569d0b-7cdc-4d33-b42b-67fd34bdf4ca tags:
``` python
import warnings
warnings.simplefilter(action='ignore', category=FutureWarning, lineno=1498)
warnings.simplefilter(action='ignore', category=UserWarning, lineno=118)
```
%% Cell type:markdown id:99f2823d-fbc0-44ff-958e-9ef35297307d tags:
## Simple plot with 2 variables (relplot)
%% Cell type:code id:96dbb85d-f996-4c73-9d51-da2699539ca0 tags:
``` python
temp = pd.read_csv("../data/fr_sp_it_temp.tsv", sep="\t", header=0, index_col=0)
temp.head()
```
%% Cell type:code id:a199f0f2-4f6d-4a1d-bbc7-bd47e826d3d2 tags:
``` python
paris = temp[temp.City == 'Paris']
paris.head()
```
%% Cell type:code id:e3985842-23f3-4ce8-ab5e-5cbd1d9ec2ee tags:
``` python
sns.relplot(data=paris, x="Year", y="Tmp")
```
%% Cell type:code id:7ec21722-b094-4052-bb99-0f9306684f8a tags:
``` python
sns.lineplot(data=paris, x="Year", y="Tmp")
```
%% Cell type:code id:885b9d4b-5543-40fb-a878-c171f68c60c9 tags:
``` python
sns.lineplot(data=paris, x="Year", y="Tmp", marker="o")
```
%% Cell type:code id:49c86b68-18d9-48ef-9812-fa114a54dafb tags:
``` python
sns.lineplot(data=paris, x="Year", y="Tmp", marker="o", linestyle="--", color="green")
```
%% Cell type:markdown id:d7039e35-0b13-4af8-b290-4533e4011d45 tags:
Seaborn is using matplotlib under the hood, so all available linestyles, markers and colors are described in https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.plot.html
%% Cell type:markdown id:b6c2f491-83b6-47d1-a01a-0c95551a0abd tags:
## Several plots
%% Cell type:code id:9ba40313-00ec-4af5-835f-53e8e8c8a3dd tags:
``` python
sns.lineplot(data=temp, x="Year", y="Tmp", hue="City")
```
%% Cell type:markdown id:8b1a4d48-39fe-4808-8d27-6fba456ada0f tags:
## Formatting
%% Cell type:markdown id:510057ce-aa3a-4ab2-9d60-fe1e4e901c4c tags:
### Annotations
%% Cell type:markdown id:5049f6ef-aff4-495e-9660-966ee4a96e13 tags:
In order to pretty format our graph, we can use matplotlib.pyplot (here `plt`) functionalities to control the legend, add title and x and y labels:
%% Cell type:code id:fd32ce6a-0d94-4e62-a09f-defb568cf00c tags:
``` python
sns.lineplot(data=temp, x="Year", y="Tmp", hue="City")
plt.legend(ncol=2)
plt.xlabel("Year")
plt.ylabel("Tp in °F")
plt.title("Average Temperature")
```
%% Cell type:markdown id:2691f293-228f-4670-b92b-81e0e1ac92e4 tags:
### xlim, ylim
%% Cell type:code id:b5a7a48d-fed8-4cac-86b3-7299ade9b3ac tags:
``` python
sns.lineplot(data=temp, x="Year", y="Tmp", hue="City")
plt.legend(ncol=2)
plt.xlabel("Year")
plt.ylabel("Tp in °F")
plt.title("Average Temperature")
plt.xlim([2000,2010])
plt.ylim([50,70])
```
%% Cell type:markdown id:bd7a6c33-6d57-4d92-a03b-a81b66ce6f4a tags:
### axvline, axhline
%% Cell type:code id:c35ab008-cb2b-4faa-b86a-b136fc349d5b tags:
``` python
sns.lineplot(data=temp, x="Year", y="Tmp", hue="City")
plt.legend(ncol=2)
plt.xlabel("Year")
plt.ylabel("Tp in °F")
plt.title("Average Temperature")
# Adding horizontal and vertical lines with an alpha parameter
plt.axvline(2008, color="grey", linestyle="--", alpha=0.5)
plt.axhline(55, color="grey", linestyle="-.", alpha=0.5)
```
%% Cell type:markdown id:ecological-memphis tags:
## Distribution plots
### Histograms and KDE plots
A histogram is displaying a frequency distribution of a **continuous** dataset using bars.
%% Cell type:code id:smooth-persian tags:
``` python
df = pd.read_csv("../data/titanic.csv")
```
%% Cell type:code id:brazilian-greene tags:
``` python
sns.displot(data=df, x="Age")
```
%% Cell type:markdown id:0e500391-b081-4e3f-a87b-014abd847f68 tags:
To overplot different distributions segregated by a categorical variable, you can use the `hue` parameter:
%% Cell type:code id:5cd0ce9b-288a-45c8-9b9e-769e75e1bd63 tags:
``` python
sns.displot(data=df, x="Age", hue="Survived")
```
%% Cell type:markdown id:3289632b-63f9-4e0a-841a-b17a7c42c506 tags:
#### Influence of bins
%% Cell type:code id:vietnamese-proceeding tags:
``` python
sns.displot(data=df, x="Age", hue="Survived", bins=50)
```
%% Cell type:code id:dd5a9532-82ee-4d71-bd0a-c3a24c0ec444 tags:
``` python
sns.displot(data=df, x="Age", hue="Survived", bins=10)
```
%% Cell type:markdown id:f23420fc-d840-4bd9-9763-74ef506b1c65 tags:
#### KDE curve
%% Cell type:markdown id:unknown-yacht tags:
Here is the corresponding continuous probability density curve (kde):
%% Cell type:code id:active-stephen tags:
``` python
sns.displot(data=df, x="Age", hue="Survived", kind="kde")
```
%% Cell type:code id:narrative-illinois tags:
``` python
sns.displot(data=df, x="Age", hue="Survived", kde=True)
```
%% Cell type:markdown id:floral-supervisor tags:
## Categorical plots
### Barplot
A barplot is a way of displaying for example counts, frequencies or averages for different categories.
%% Cell type:code id:about-participant tags:
``` python
sns.catplot(data=df, x="Sex", y="Age", kind="bar")
```
%% Cell type:markdown id:designing-deviation tags:
### Swarmplot
%% Cell type:code id:laughing-contributor tags:
``` python
sns.catplot(data=df, x="Pclass", y="Fare", kind="swarm")
```
%% Cell type:markdown id:polished-developer tags:
### Boxplot
Box plots visually show the distribution of numerical data and skewness through displaying the data quartiles (or percentiles) and averages.
Box plots show the five-number summary of a set of data: including the minimum score, first (lower) quartile, median, third (upper) quartile, and maximum score.
<div>
<img src="../images/boxplot_explanation.png" />
</div>
for more explanation visit
https://www.simplypsychology.org/boxplots.html
%% Cell type:code id:demographic-original tags:
``` python
sns.catplot(data=df, x="Pclass", y="Fare", kind="box")
```
%% Cell type:markdown id:27290d30-3c5d-4161-8cf8-0b0cb9f22654 tags:
### Violinplot
Sometimes the median and mean aren't enough to understand a dataset. Are most of the values clustered around the median? Or are they clustered around the minimum and the maximum with nothing in the middle? When you have questions like these, distribution plots are your friends.
The box plot is an old standby for visualizing basic distributions. It's convenient for comparing summary statistics (such as range and quartiles), but it doesn't let you see variations in the data. For multimodal distributions (those with multiple peaks) this can be particularly limiting.
But fret not—this is where the violin plot comes in. A violin plot is a hybrid of a box plot and a kernel density plot, which shows peaks in the data.
formore explanation visit: https://mode.com/blog/violin-plot-examples/
%% Cell type:code id:359478ff-ec41-43b4-87fe-227e93e2d41f tags:
``` python
sns.catplot(data=df, x="Pclass", y="Fare", kind="violin")
```
%% Cell type:markdown id:facial-spell tags:
## Scatterplot
A scatter plot (aka scatter chart, scatter graph) uses dots to represent values for two different numeric variables. The position of each dot on the horizontal and vertical axis indicates values for an individual data point. Scatter plots are used to observe relationships between variables.
https://chartio.com/learn/charts/what-is-a-scatter-plot/
%% Cell type:code id:academic-kazakhstan tags:
``` python
sns.scatterplot(data=df, x="Age", y="Fare", hue="Sex", size="Pclass", alpha=0.5)
```
%% Cell type:markdown id:differential-sauce tags:
## Heatmap
%% Cell type:code id:mighty-barrier tags:
``` python
uniform_data = np.random.rand(5, 5)
sns.heatmap(uniform_data, vmin=0, vmax=1)
```
%% Cell type:code id:0f988aac-b37a-4163-917c-03597e74b8b4 tags:
``` python
sns.heatmap(uniform_data, vmin=0, vmax=1, annot=True)
```
%% Cell type:markdown id:8fc43d40-d07b-4052-9579-fc0e93d621d1 tags:
## How to make subplots (Matplotlib)
We can pack several plots in a figure.
There is several way to do that, here we describe the *pyplot.subplots* function
> https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.subplots.html
When using seaborn plotting function the high level catplot, displot and relplot methods will not work with subplots. You should be specific and use the lower level methods such as histplot, boxplot etc...
%% Cell type:code id:f57d267f-bcc4-4ed2-8aa1-557fe666ccce tags:
``` python
fig, axs = plt.subplots(2,2, figsize=(9,7)) # 2 rows, 2 columns
sns.histplot(data=df, x="Age", hue="Survived", kde=True, ax=axs[0,0], palette=["grey", "black"])
sns.boxplot(data=df, x="Pclass", y="Fare", ax=axs[0,1], palette=["lightgreen", "green", "darkgreen"])
sns.barplot(data=df, x="Sex", y="Age", ax=axs[1,0])
sns.scatterplot(data=df, x="Age", y="Fare", hue="Sex", size="Pclass", alpha=0.5, ax=axs[1,1])
```
%% Cell type:code id:bf1edc04-10a3-4c3c-8c6c-072594953bf6 tags:
``` python
# More complex visualisations can be incorporated in a function
def titanic_graph():
fig, axs = plt.subplots(2,2, figsize=(9,7)) # 2 rows, 2 columns
sns.histplot(data=df, x="Age", hue="Survived", kde=True, ax=axs[0,0], palette=["grey", "black"])
sns.boxplot(data=df, x="Pclass", y="Fare", ax=axs[0,1], palette=["lightgreen", "green", "darkgreen"])
sns.barplot(data=df, x="Sex", y="Age", ax=axs[1,0])
sns.scatterplot(data=df, x="Age", y="Fare", hue="Sex", size="Pclass", alpha=0.5, ax=axs[1,1])
```
%% Cell type:code id:05bdefdd-8474-4241-a9a3-be576adbc941 tags:
``` python
titanic_graph()
```
%% Cell type:markdown id:07f3defa-f36d-4bf2-a7ae-5c05e4190412 tags:
## Saving figures (Matplotlib)
%% Cell type:code id:1c0c03bc-f3f4-4a62-ae30-fedd26e5ec46 tags:
``` python
titanic_graph()
plt.savefig("titanic_visualization.pdf")
```