[ Launch: reddit base ] 32ef99795364a77840b75bf742e3842e by evaristoc[ Launch: reddit base ] 6633418 by enjalot[ Launch: simple histogram ] 6631652 by enjalot
Functions are a way to organize code into reusable blocks. As a reminder, functions in Python are "first class objects."
Several built-in functions have been discussed and used previous examples. Just as important is the ability for users to define their own functions.
https://docs.python.org/3/reference/compound_stmts.html#function-definitions
{"links": [{"target": "32_VUTN", "source": "31_MtD", "value": 3}, {"target": "27_M", "source": "26_Dilih", "value": 1}, {"target": "7_CtE", "source": "6_RLNiA", "value": 82}, {"target": "19_SaD", "source": "18_STC", "value": 1}, {"target": "31_EBT", "source": "30_BA", "value": 1}, {"target": "24_SCM", "source": "23_SAP", "value": 12}, {"target": "20_CHE", "source": "19_SU", "value": 3}, {"target": "3_FaN", "source": "2_CfP", "value": 1}, {"target": "26_SCM", "source": "25_SAP", "value": 24}, {"target": "4_FtLWiaS", "source": "3_FaN", "value": 1}, {"target": "28_BA", "source": "27_S", "value": 6}, {"target": "0_MB", "source": "_", "value": 267}, {"target": "16_Wat", "source": "15_FB", "value": 1}, {"target": "10_CtE", "source": "9_SAP", "value": 2}, {"target": "34_EBT", "source": "33_Nrp", "value": 1}, {"target": "36_SD", "source": "35_P", "value": 1}, {"target": "22_M", "source": "21_STC", "value": 2}, {"target": "25_CHE", "source": "24_SU", "value": 1}, {"target": "18_DTA", "source": "17_SANiaR", "value": 35 |
country | ISO3136 | contrcamsit | contrses | internetusers | engprof | engsep | engint1 | engint2 | |
---|---|---|---|---|---|---|---|---|---|
Kazakhstan | KZ | 0.413758185 | 0.935519875 | 9577924 | 47 | 1 | 1 | 0 | |
Bangladesh | BD | 0.413758185 | 1.853657363 | 10637566 | 40 | 1 | 1 | 0 | |
Nepal | NP | 0.674810535 | 1.367781217 | 10690000 | 35 | 1 | 1 | 0 | |
Uzbekistan | UZ | 0.26105235 | 0.281855838 | 10948745 | 30 | 1 | 1 | 0 | |
Venezuela | VE | 0.5221047 | 1.527202441 | 15624038 | 46 | 1 | 1 | 0 | |
Saudi Arabia | SA | 0.5221047 | 1.206181693 | 16298448 | 40 | 1 | 1 | 0 | |
Morocco | MA | 0.413758185 | 1.017622359 | 18283513 | 47 | 1 | 1 | 0 | |
Thailand | TH | 0.413758185 | 1.446168863 | 19533675 | 45 | 1 | 1 | 0 | |
Colombia | CO | 0.827516371 | 1.776714746 | 23650570 | 47 | 1 | 1 | 0 |
country | sessions | int pop (DES) | ses/intpop | ses/(48%*pop) | connectivity | rankingcampersite | finalscore | |
---|---|---|---|---|---|---|---|---|
Afghanistan | 10 | 30 | 16 | 6 | 6 | 2 | 29.5 | |
Albania | 28 | 29 | 48 | 63 | 77 | 2 | 35.33333333 | |
Algeria | 51 | 67 | 28 | 17 | 12 | 4 | 45.66666667 | |
Argentina | 86 | 98 | 47 | 60 | 72 | 5 | 57.16666667 | |
Armenia | 31 | 20 | 64 | 64 | 51 | 2 | 41.5 | |
Australia | 113 | 89 | 107 | 110 | 94 | 11 | 75.83333333 | |
Austria | 68 | 69 | 75 | 81 | 93 | 2 | 53.5 | |
Azerbaijan | 33 | 63 | 11 | 30 | 71 | 2 | 31.16666667 | |
Bahrain | 2 | 17 | 21 | 55 | 109 | 1 | 17.66666667 |
This is a version of Mike Bostock’s parallel coordinates example, modified to include reorderable axes.
This parallel coordinates visualization of cars from the ‘70s and ‘80s demonstrates one of D3 2.5.0’s new interactive features: the brush component. By clicking and dragging along any axis, you can specify a filter for that dimension. The brush component is also used in the updated scatterplot matrix example.