Skip to content

Instantly share code, notes, and snippets.

@jplitza jplitza/channelsurvey.json
Last active Aug 29, 2015

Embed
What would you like to do?
Transform and plot channel survey data. See http://bremen.freifunk.net/blog/2014/09/21/Auswertung-Kanalanalyse.html for explanation
[{"2412": ["6511A5AF+", "9CA6B13E+", "C7A646CE", "238742BA"], "2472": ["1A2B3912-"], "2462": ["80DFA95A", "0543E2A4", "C7A6A76E", "96D72006"], "2437": ["0F6EB6A4", "2506C763", "1D19D85E", "1DD19B4A", "4FB59AB4"], "2452": ["83BF6A82", "24FE03AD-"], "2442": ["2308AD52-"]}, {"2412": ["03557B22", "2308015E+", "2DB38AD9+"], "2472": ["1C284EB1"], "2462": ["8DF730F1-"], "2422": ["317035E5", "C63C55C8"], "2437": ["040E2C9D", "2E9E3916", "1A4F01E2", "BDB99066", "80DF7CD7"], "2457": ["1C2812C7"]}, {"2412": ["23087FE1", "2308E857", "31C4156A+", "31C43F2E", "23085221", "C63C3FB3"], "2422": ["040ED55D", "1D199CD5"], "2447": ["96D7A2DE", "A8E4F368", "C7A6F2A2-"], "2472": ["651172E5", "31C40A3D"], "2462": ["1F33777C", "16E36874", "1C4A0129-", "6D8FCEB6-"], "2437": ["1E58849F", "26F24594+", "7EE53D88", "1E580919", "1CF08464", "040E5692", "264D08B0-", "264D0C81", "265AAFBB", "150C8C77"], "2417": ["96D7A280+", "1A2ACAD0", "C63C266C+"], "2442": ["66B3EE61-"], "2432": ["8DF7790B+", "C63CB6E1"], "2457": ["1401CE1D", "7EE50084-", "1C28A96C-"]}, {"2412": ["96D7EF2A", "353B86FE+"], "2452": ["C1C03EF9"], "2462": ["96D7DE4D-", "24FECA86-"], "2417": ["05437CEA+"], "2437": ["C63C92E8", "7D687662-", "D9981E9B-", "90A90BE5", "122A063C"], "2427": ["1F3F1971", "4FB54681", "C63C4B26"]}, {"2412": ["265A44DB+", "A096F15B", "23088B2E+", "0355DBBC"], "2472": ["252C6B34", "94F6D464"], "2462": ["252CCA43-", "1C289D4C", "21222B7E-"], "2437": ["D9981EC1-", "250692CB", "252C34EA-", "BDB92B3E-", "0A5BDAC3", "353BBBA9+"], "2452": ["C63C77B4-", "96D77CCA"], "2442": ["3170BAD7", "1C286A65", "D1113A59-"], "2432": ["C63C496C-"], "2422": ["2506936F"]}, {"2412": ["9D67EA27", "C7A6AD4E+", "2506515B+", "C7A681D1"], "2447": ["0B6B2390"], "2462": ["1A4F99EF", "3170CE37", "24FEAA84-", "16E3D4B4"], "2437": ["C06FDA63", "353BB576+", "F2AFDFCC", "53D4BE49", "80DF11B4+", "230808ED", "0543E43D", "7E5D744D", "2506A5B1"], "2467": ["140116E2"], "2422": ["25065D56"], "2442": ["227525F7-"], "2427": ["473D25B4+"], "2457": ["0355D59F", "80DF25E7"]}, {"2412": ["C7A66873"], "2447": ["4A0062B4-"], "2462": ["7D5E2B91"], "2417": ["252CCF5F"], "2437": ["C63C58DF-", "0804C032-", "264D8357-", "040EE4DF"], "2432": ["252CDF7C"], "2457": ["0543F4D7-", "0543AC23-"]}, {"2412": ["C7A6F624"], "2472": ["1F3F1E24-"], "2462": ["E87B11DA", "96D71307"], "2437": [], "2432": ["96D71F2C"], "2422": ["EA3ABF4E+"]}, {"2412": ["250676A0", "6511E8E1", "25066DC4+", "6511BF48"], "2472": ["0543118C"], "2447": ["227540FA"], "2462": ["24FE42B3"], "5220": [], "2437": ["264D3E48-", "1C4AC1BC"], "2432": ["1A67055F+"]}, {"2412": ["31C419CB", "31C45E8B", "3DFF4A87", "2506A07E+", "264D4CD5"], "2452": ["140148F8"], "2472": ["1A591B0C-"], "2462": ["350AB22F", "1B5ED333-"], "2442": ["1A4F8D35"], "2417": ["C63C3012-"], "2437": ["252CE025-", "353BEFCB+", "4FB5D7E0", "252CB72D-", "9A74984A"], "2432": ["7E5D5BEE", "7D5E2F51", "96D7082F-"], "2457": ["80DFAC2F-", "1A8C0F26"]}, {"2412": ["0E8E3A9F"], "2422": ["94F64B3B+", "94F66D10+"], "2452": ["24012CF5"], "2447": ["4A00F986-"], "2462": ["1F025BED-", "0CF66C93", "D1C3AFCD", "259CA203", "5AB69814"], "5220": [], "2417": ["FEED7D95+"], "2437": ["24148BF8", "1F3F168B", "1310153D"], "2457": ["1A67907F-"]}, {"2412": ["96D78889"], "2437": ["4FB554D7+", "CF92A0ED"]}, {"2412": ["66B3E812+", "6F3F38E9", "A15125E8", "02A8C9D3"], "2422": ["FEEDF528+", "863BD89A+", "3A3500BE+", "94F65193+"], "2447": ["4A000596-"], "2472": ["054316FB-", "E52A5D3B", "1C10F6BB"], "2462": ["4476CA53-", "0CF6B0E1-"], "2442": ["94F65227-"], "2467": ["F3C1548D-"], "2417": ["94F6907F+", "4A00844D+"], "2437": ["FEEDA002-", "F4C6DFF7", "12D94A2A", "179A6FDD", "A1511017", "A15132EC", "763FFD92", "24238085", "3A35591E-", "67FBD276-", "1A2AD232", "0804BCD0", "D1114368", "0CC843F3"], "2432": ["1A591AFF+"], "2457": ["12438A81"]}, {"2412": ["3A3555DC", "96D71BFD", "96D74B3E", "96D75BB2"], "2447": ["473D26FA"], "2462": ["6511D8A0-", "18E7FD7E-", "0355A269-", "96D7AA3B-", "EA3ABE22"], "2437": ["80DF61BE", "040E2DDF", "035512A6", "252CF07B-", "252C2BC2-", "264DA9F9"], "2432": ["C7A632E8"], "2422": ["1D199CC0"]}, {"2412": ["2275C705+", "6511E293+"], "2472": ["230830B3-", "1401DCFA"], "2447": ["02B405A7"], "2462": ["90D0E737", "B6FCBC78", "8DF77582"], "2452": ["252CFBC5"], "2437": ["150C0445", "C63CBC15", "D111334A-", "31703B71", "7D688D60-", "7D6854C2-", "0804B8B7", "904B171A"], "2432": ["2506A4E7-"], "2422": ["96D7EF1B", "7E5D3AD6"]}, {"2462": ["14016403", "96D7D3D7"], "2412": ["25066C24+"], "2467": ["31C442A0", "6511BA98"], "2437": ["252C1ED8-"]}, {"2412": ["9CA697E0", "24FE91C8+", "C7A61CD2", "264DA326", "2308F187+", "C7A6DE6F+"], "2472": ["265B9955", "150C9FF4", "96D7D1A9-"], "2447": ["252CD248", "02B405A3"], "2462": ["12BF7900", "6511E399", "1401157D"], "2442": ["1401B89F", "7E5D6EDD", "C63C29A3"], "2467": ["080425CA"], "2452": ["1D19B92A", "255E1C64", "A8E4F60C"], "2437": ["4A0038EF+", "150C91B7", "2308E935-", "24FE3013", "DE2B325D-", "08043492-", "317003FF", "353BAF2B+", "9CA6D22A", "1E58B9C1", "18E7DCBA", "1E58C60B"], "2427": ["83BF0FBD", "C63C7DD1"]}, {"2412": ["C7A6F396+", "65116B9A+"], "2447": ["1A4F8FB4"], "2452": ["A8E4D3D0"], "2437": ["240121F6", "353B9426+", "150C66ED", "BDB9272F-"], "2427": ["4FB5353C"], "2422": ["9CA64910"]}, {"2412": ["9CA6F139+", "0543EAB2+", "0543AA4C"], "2432": ["7E5DA85E"], "2452": ["80DFAE3A"], "2447": ["D3A307B4"], "2472": ["6511A601"], "2462": ["7E5DACB2"], "2437": ["1C4AA11B", "150C53AD", "7002FBE1-", "1DD19B56", "252C865B-", "9CA6D4AE", "1A4F8D09"], "2422": ["9CA63DA6", "252C74F2"], "2442": ["C06FD925", "83BF0D21", "317005B8-"], "2427": ["D11145F5+"], "2457": ["D3A30746"]}, {"5220": [], "2437": [], "2412": ["F3C13721+", "250608D6"]}, {"2412": ["C7A6E23B"], "2467": ["05431431-", "25066023"], "2437": ["167E32FC", "4FB5F4B5", "1C4AD576", "C7A6A1AB-"], "2427": ["1C4A491E"]}, {"5180": ["C7A6F19C+"], "2412": ["96D772AD", "2722F104", "EAA74E47", "9CA6A814+", "3170E947+", "3170BF2D+", "C7A6F19C+"], "5200": ["3170E947-"], "2462": ["69A52705", "C7A6AB34"], "5220": [], "2437": ["4FB5E1FC", "22C20035", "507F55F8"]}, {"2462": ["69A52705", "C7A6AB34", "CDA7181E"], "2412": ["3170BF2D+", "2722F104", "C7A60FF8+", "3170E947+", "EAA74E47", "96D772AD"], "2437": ["22C20035", "4FB5E1FC", "507F55F8"]}, {"2412": ["94FC58BB", "0E8FF1BA+", "C7A661A8+", "2308A185+", "7E5DAD8C", "81C407DF"], "2437": ["D998E1CF", "1CF0D2E8", "8DF72F73", "05438587", "BDB92B13-"], "2447": ["1C2865E6", "A8E4E2C5"], "2472": ["96D742C3-"]}, {"2462": ["AA4B1211", "7E5D71C1", "0543E543"], "2412": ["C7A6539D+", "0543A802+", "24FEA2B6"], "2417": ["863B54FC"], "2437": ["040EECE3", "1B119CEB", "150C6172"], "2472": ["25062C22-"]}, {"2462": ["16E33E62", "90D0E737"], "2412": ["0543BB23+", "C7A652A5+"], "2437": ["0804B8B7"], "2472": ["230830B3-", "1401DCFA"], "2457": ["AC2764C0"]}, {"2412": ["31C43607", "054391B8+"], "2437": ["040E6534", "2506A8A9"], "2457": ["116BC30F-"]}, {"2412": ["054310C7+", "24FEB85C", "31C43F47", "0543EAB2+", "31C44AEE", "4FB581BD"], "2452": ["1D193003", "255ED763"], "2462": ["7E5DA3CD", "7E5D9CC2"], "2417": ["9CA6CE32+"], "2437": ["A8E4D28D", "264D7A10-", "23088441", "220BD2F2", "353BF145+", "1C4A0813"], "2427": ["25062E0E+"]}, {"2412": ["6511E2F1", "259CE664", "6511502D+", "054344E2", "C7A60D75", "2506321F+", "9947BB50"], "2452": ["2308CA4C+"], "2447": ["18F8383B"], "2472": ["2401E9B5"], "2462": ["12BF48EC", "C7A67F66-", "31C44C3B"], "2437": ["2401C0AD-", "23084D7C", "1C4AC246", "3170E786-", "1A4F229E", "040ED296", "C63C400D", "4FB5BD92-", "91F50AD7-", "24FE7C3D", "96D7B2A5-", "1F0292E3-"], "2417": ["150C8588"], "2442": ["12BF79DA"], "2432": ["1B11F411", "A8E4DF8D"], "2422": ["C63C7D5C", "24FE5688", "1A4FD9B2"]}, {"2462": ["31C41859"], "2412": ["252CF18D"], "2437": []}, {"2412": ["C7A66229+", "24FEAC3B", "05438DE9+", "BF484A2E"], "2462": ["1C28A78F"], "2452": ["7CF95A59+"], "2437": ["31706B37", "AFF7A37A-", "2401279B", "264D7F6A-", "4A007A14-"], "2432": ["7D681470"], "2457": ["9CA69FDA"]}, {"2412": ["1349F3FC", "24FE08E5+", "353BC23D+"], "2437": []}, {"2412": ["0543BB23+", "C7A652A5+"], "2472": ["1401DCFA"], "2462": ["16E33E62", "994792A9", "90D0E737"], "2452": ["252CFBC5"], "2437": ["0804B8B7"], "2457": ["AC2764C0"]}, {"2462": ["1CF05A17"], "5220": [], "2437": ["18F8FA06", "D36DB505", "0449500E"], "2447": ["1A2B45F6-", "06E6A906"], "2412": ["0E8E3A9F", "3DC78A14"]}, {"2412": ["3170DD05", "31C415B1+", "C7A66748", "C7A612D7", "230885A4"], "2452": ["C7A68BBA", "1B119C4B", "1F02E5EC-"], "2432": ["C63C0A9D+"], "2472": ["14014829-"], "2462": ["B6FC88BD", "184D8633"], "2467": ["96D72043"], "2417": ["C63C6001"], "2437": ["1F02F00F", "150C5B78", "1E58C167", "1B11A417", "1A4F9BE5", "559CA3D3", "2127FF1B"], "2427": ["31706826"], "2422": ["3170B4BA"]}, {"2412": ["31C426FE+", "0543C52A", "4FB5CACB", "C7A6D25E", "96D713EF+"], "2452": ["2506446E-", "0355ED9E"], "2432": ["4FB56113-", "25061397"], "2447": ["25064D26"], "2462": ["03550B32", "0543E2A4", "96D76275", "1B5E4F9D"], "2437": ["1D19D85E", "150CB854", "0355EDAF-", "4FB56672", "4FB59AB4"], "2417": ["0355CD08"], "2442": ["6BD342B6"], "2427": ["7E5DA3BC", "9CA67857+", "9CA6A6C2+"], "2457": ["80DF14EB", "80DF7B52"]}, {"2412": ["23080FEB", "31C414FD", "C7A602C8", "6511E8C5", "C7A6BFAA", "6511E207"], "2422": ["4FB5B737"], "2452": ["265BA094", "1D19CFB0"], "2472": ["1401DAA2"], "2462": ["96D72333", "1C286E63"], "2437": ["353BF0CF+", "BDB92B3C-", "7E5D31AB+", "731ED5A4-", "03552463"], "2417": ["317030A7", "C63C9813", "1D19F110"], "2442": ["44527703-", "C7A6460F", "2308ADBD-", "473D1BEC-"], "2432": ["80DFA243", "C7A679E0+", "7E5D8759+"], "2457": ["80DF84CC-", "1C286EFA-"]}, {"2412": ["1FF30271"], "2472": ["C9B2C3CB"], "2447": ["50E6CBD4-", "3F499238"], "2462": ["8DF730F1-", "25068B98-", "252C96A8-"], "2437": ["2E9E3916", "150CC2FB", "D05AF5CC", "252C964C-", "040E2C9D", "BDB99066", "80DF7CD7+"], "2427": ["25068636+"], "2422": ["317035E5"]}, {"2462": ["C7A64D64-"], "2412": ["96D73757", "265B97E9+", "7BBC230D", "C7A6D2BE", "473D18D3+"], "2467": ["03550AD6", "96D70899"], "2437": ["C63C8FCE"], "2422": ["31704821+"]}, {"2412": ["1C4AD123", "65115B60+"], "2422": ["1884294B"], "2462": ["E6FC9870"], "2452": ["6511D5A1-"], "2437": ["2401D5BD", "14BF3BFD"], "2457": ["1F3F1EF8-", "4FB5B3EF"]}, {"5180": ["31C462C0+"], "2412": ["31C462C0", "C7A6B53F+"], "2432": ["1401DD39+", "80DF2933"], "2447": ["6EC57157-"], "2462": ["1A4F3F21"], "5220": [], "2437": ["264D21C6", "D9981E29-", "9CA6057E", "1CF08661"], "2427": ["96D7209E+"], "2472": ["31C4329A"]}, {"2412": ["7A4C4A4B", "A38651DE"], "5500": ["7A4C4A4B+"], "2462": ["18E78CFF"], "5220": [], "2437": ["05431CD8", "A8E4CF6A", "7E5D62FC"], "2432": ["1F3FA15F-", "C7A640DB"]}, {"2412": ["C7A66AAC+", "252CF75F", "96D7BAF0", "C7A6B58B", "054387EF", "16B64F42", "25063D44", "252C8598", "25067B5D+"], "2452": ["1D1958CE"], "2472": ["3F498DD6", "265BAFBF"], "2462": ["EA96EC71", "1C4A4690", "A44CA0B5"], "5220": ["A44CA0B5+"], "2422": ["054350A9", "252C882B"], "2437": ["150CD150", "264D4B02-", "1B119CC3", "A8E4DE88", "24FE07BA", "1DD19B56", "2506A98E", "C9B2C419", "9F2700B1", "0543E71B", "1DD19B52"], "2427": ["9CA6E5BD+"], "2457": ["B6FCD7BF"]}, {"2462": ["31C41859"], "2412": ["252CF18D"], "2437": []}, {"2412": ["353BAF48+", "4FB56EFA", "96D77FCA"], "2447": ["02B49EB0"], "2472": ["24012CED"], "2462": ["1F3F99ED-"], "2437": ["1C4A9FCD", "252CBEE5-", "353BCDD9+", "1349F3DC", "7D688D55-"], "2417": ["9CA63037+", "252C22C5"], "2442": ["1C287127", "96D70FB4"], "2457": ["83BF213B-", "1CF0F43C"]}, {"2412": ["83BF2195", "31C43F47", "0543EAB2+", "9CA6F139+", "31C437E1"], "2432": ["7E5DA85E"], "2472": ["6511A601"], "2447": ["D3A307B4"], "2462": ["7E5DACB2", "041518D9-", "99477B68", "65116F44"], "2437": ["1C4AA11B", "150C53AD", "9CA6D4AE", "7002FBE1-", "150C95A0", "1DD19B56", "252C865B-", "1C4A0813", "1A4F8D09"], "2452": ["9CA6E5C3-"], "2442": ["C06FD925", "83BF0D21"], "2427": ["D11145F5+"], "2422": ["252C74F2"]}, {"2412": ["83BF2195", "0543EAB2+", "31C44AEE", "31C43F47"], "2432": ["7E5DA85E"], "2472": ["6511A601", "9CA66590-"], "2462": ["0543F0C6", "7E5DACB2"], "2437": ["1A4F8D09", "9CA6D4AE", "252C865B-", "150C53AD"], "2467": ["0543B489"], "2452": ["80DFAE3A", "9CA6E5C3-"], "2442": ["C06FD925", "83BF0D21"], "2427": ["D11145F5+"], "2422": ["252C74F2"]}, {"2412": ["068D097F", "B00C016C+", "C7A680B0"], "2452": ["252C59DE", "1D19CFB0"], "2432": ["3170E190-"], "2462": ["0543A99C", "69A5AFEC"], "2417": ["9CA62548+"], "2437": ["C63C63DA+", "FD52B39D", "731ED5A4-", "31705437+", "1C4AEE19", "F2AFDFE7"], "2427": ["9CA602D9"], "2457": ["2308B09E"]}, {"2462": ["7D5E2B91"], "2412": ["317011F1-"], "2437": ["C63C58DF-", "264D8357-", "0804C032-"], "2457": ["0543AC23-"]}, {"2462": ["1B9ECAFD", "1A4F97CA", "16E33E67", "2506BE12-"], "2442": ["7E5D9DD1"], "2437": ["2BC14F5C", "150C26D5", "4CA99585", "2308B695"], "2447": ["C63C7150+"], "2412": ["96D792F1", "040ED80A"]}, {"2412": ["96D73757", "C7A6D2BE"], "2467": ["03550AD6"], "2452": ["1C287850"], "2437": ["C63C8FCE"], "2422": ["31704821+"]}, {"2412": ["C7A62EDF"], "2462": ["9CA6FFAB"], "2467": ["C7A6334C"], "2417": ["66B3EE62+"], "2437": ["0804BEF6-", "1C4AA165"], "2432": ["2506A4E7-"], "2422": ["1A2A72A4"]}, {"2412": ["3170C5F3+", "C61F84A5+"], "2447": ["150CB478"], "2457": ["140197ED"], "2417": ["31705DBD"], "2437": ["D998E1DE", "D05A718E", "12BFCA49"], "2427": ["1A2A171E"], "2422": ["1F1F65BC"]}, {"2462": ["1A4F9B53", "651131E9-"], "2412": ["353BD48B+", "96D70AC1+", "14018A33"], "2437": ["1C2635B1", "C68E3B22", "259C34ED", "B6FC2C2F+"], "2457": ["2401FD05-"]}, {"2462": ["72401F40", "1A6715BE-", "94F67870-", "E6FCAF36"], "2412": ["94F684D5+"], "2437": ["F3C18869-", "DE27C02A+", "1A6743FC+", "156D63C9"], "2472": ["C9B2D585"]}, {"2412": ["C7A67D6E+", "264DD542+", "0543EB69+", "2308DFF9+"], "2432": ["C7A6B060-"], "2447": ["65113757-"], "2462": ["1C28A82E", "C7A6A255", "C9D02505", "2506CACC"], "2437": ["C0A8D580", "C63C32E8", "1A4F01F9", "4FB5F8EC", "9CA62D27", "3170FAFE"], "2417": ["750E4052", "1D19870D"], "2442": ["252CD619"], "2427": ["353BF6D3+", "C7A680E1+"], "2457": ["9CA6DBB8-", "1F3FD235-"]}, {"2462": ["7D5E2B91"], "2412": ["6511E301"], "2437": []}, {"2412": ["2506D639+", "252C4539+", "B6FC5477+", "C7A62EDF"], "2447": ["02B405A7"], "2462": ["90A9ADB7"], "2467": ["C7A6334C"], "2417": ["1A2A4CF5"], "2437": ["C06FD824", "0804BEF6-", "1C4AA165", "B6FC3454-", "2308C21C-", "7D6854C2-", "A8E4EE2A"]}, {"2412": ["1C4A4762", "69A59DEB", "353BC598+", "05432BE9", "4A00C59E+", "22B027E2", "7E5D7148"], "2447": ["02B49EB4"], "2462": ["223FC7F3", "226BF248", "C7A64704", "14013EB9", "264D64A7-"], "2437": ["264DDE03-", "353B7C97+"], "2457": ["0355CDC1"], "2442": ["6511D59C"], "2432": ["863B6D21"], "2422": ["0355FD1B"]}, {"2462": ["1C4A4C2E"], "2412": ["24FE0549+", "96D77C4A", "750E8462"], "2437": ["146C4541", "6F812261", "24FE6229"], "2447": ["6511EFF8-"], "2472": ["11240E7E"]}, {"2412": ["31C426FE+", "24FE785A", "4FB5CACB", "23085EA7+"], "2432": ["25061397"], "2452": ["0355ED9E"], "2447": ["25064D26"], "2472": ["1A2B3912-"], "2462": ["6511B03A", "03550B32"], "2417": ["C63C1FC7+", "03556E2A"], "2437": ["1D19D85E", "150CB854", "4FB59AB4"], "2427": ["7E5DA3BC"]}, {"2412": ["7E5D895B+", "2506CB1A", "317060D4", "25061938+"], "2472": ["96D7505D", "F68547F1"], "2462": ["16E37C00", "31C46390", "81C402D5", "96D72A2C"], "5220": [], "2457": ["24FEAD79-"], "2437": ["1A4F9118", "1349F3FB", "1A4F9417", "1C4AA222", "F3C13CBE-"], "2427": ["1401C364+", "80DFD8B8+"], "2422": ["9CA6A2B7+"]}, {"2412": ["C7A627D6+", "0355DCC7", "31C458EA", "2506A04E+", "BD43FD63", "81C401C1"], "2452": ["487ACA41-"], "2472": ["095BDA2C"], "2462": ["0355D4F1", "040ED230", "24FEA44E"], "2437": ["265BF0E3", "150C367C", "353BCCA7+", "8EF27E28+", "7E5D81F2", "2122125A+", "473D1885", "9CA6D51B", "1C4AA0D2", "1C4AD430"], "2467": ["1401D253"], "2417": ["80DF0532", "7E5D571D"], "2442": ["473D227C-"], "2427": ["31707A1A"], "2457": ["C9B2C359"]}, {"2462": ["1E2A013A", "25061866"], "2412": ["F2AF9D1E", "23081359+"], "2437": ["4FB5CE64", "37DC3890", "1C4A4096", "18E7DCC6", "C06FD2AE", "96D71EA9", "651191B0", "040EF5AF"], "2422": ["24012868"]}, {"2412": ["96D725B3", "31C41DCF", "C7A68D63", "1C4A9361"], "2447": ["16B63945"], "2462": ["F3C16450-", "96D7253B"], "2417": ["3170D6D0"], "2437": ["150C0F1A", "7E5D4F67", "264D7A23-"], "2427": ["7E5D5AA3"]}, {"2412": ["65116604+", "7E5D82C4", "7A4C649D", "C7A66CF3", "05432CE2"], "2462": ["C7A61752-", "0E8F1C5E-", "24FE0346-", "1A8C28D8"], "2467": ["7E5D52AE-"], "2452": ["94FC8F87", "1D1989E1"], "2437": ["0355BFB3+"], "2427": ["FEEDE7AF+", "0543FC51+"], "2457": ["7E5D4048"]}, {"2412": ["C7A661A8+", "2506A9AD+", "264DF5A1+", "2308A185+", "C7A6B80A+", "7E5DAD8C"], "2472": ["96D742C3-"], "2447": ["A8E4E2C5", "1C2865E6"], "2462": ["264D46AD-", "255ED74B", "2122207E-", "69A57566", "81C41052"], "2467": ["C7A6D9FE"], "2417": ["3170E07B+"], "2437": ["1CF08678", "BDB92B13-", "D998E1CF", "150C1A7B", "05438587", "4FB56535-", "8DF72F73"], "2427": ["D3A3075A"]}, {"2412": ["068D097F", "31C414FD", "6511E207", "C7A680B0"], "2452": ["252C59DE", "1D19CFB0"], "2427": ["9CA602D9"], "2462": ["96D72333", "69A5AFEC"], "2417": ["1D19F110"], "2437": ["353BF0CF+", "C63C63DA+", "7E5D31AB+", "731ED5A4-", "03552463", "31705437+", "F2AFDFE7"], "2432": ["C7A679E0+"]}, {"2412": ["6511E207", "C7A680B0"], "2452": ["1D19CFB0"], "2417": ["1D19F110"], "2437": ["353BF0CF+", "FD52B39D", "F2AFDFE7", "731ED5A4-"], "2427": ["9CA602D9"], "2457": ["2308B09E"]}, {"2412": ["265A2CA9+", "353BB605+", "81C4017F", "B6FC2B34+"], "2447": ["80DFB28D"], "2472": ["66B354BE"], "2462": ["83BF03F8"], "2437": ["4FB500A7-", "D64DC7AA-", "035563F2-", "353BD408+", "265A2CA1-", "265BE198-", "24012CE9", "252CF64A", "700272AD-"], "2422": ["8EF2F97E"], "2442": ["473D1A45-"], "2457": ["8DF71CA0", "B6FCD81D"]}, {"5220": [], "2437": [], "2412": ["C7A61906+"]}, {"2462": ["96D75F94"], "2412": ["C7A6BEB2", "035513AD"], "2437": ["230887E9-", "31C4311A", "CBA82F25", "E87B1758", "F2AFDFA3"], "2447": ["4A00A5FC-"], "2472": ["0B6B2D61", "7D68660E"]}, {"2412": ["040ED1A6", "C63C7191+", "0355DBBC", "4FB58252"], "2452": ["C63C77B4-"], "2472": ["94F6D464"], "2462": ["16E3684C", "1B2F58DE", "24FE9585-", "840DD7C5", "969D6B34"], "2437": ["353BBBA9+", "A8E4EFE1"], "2417": ["C63C4ADE+"], "2442": ["1C286A65"]}, {"2412": ["25065314", "4FB56EFA", "96D77FCA"], "2447": ["C7A614FE"], "2462": ["1F3F99ED-"], "2417": ["9CA63037+", "FEEDAC8D+"], "2437": ["1C4A9FCD", "1F3FD0F9", "4FB5B4D5+", "7D688D55-"], "2432": ["4A0053BD+"], "2457": ["24FE4099-", "1CF0F43C", "25068E14"]}, {"2452": ["21631844"], "2472": ["08549B98"], "2447": ["0355DC81"], "2462": ["1F3FD54D-", "96D712AE-", "9CA68C33", "054313EA-"], "2437": ["040E8E8D", "53D4BE49", "D9981E18", "230808ED", "353BEC42+", "0543E43D", "F2AFDFCC", "C06FDA63", "12BF7D42", "1C4A4216", "7E5D4F67", "252CCD82-", "2506A5B1"], "2417": ["9CA62831"], "2442": ["A8E4EBFD"], "2427": ["0C6DE8EF+", "FEED3731+"], "2422": ["C7A68F9B+", "31C4369B"]}, {"2462": ["250614A5-", "25068B98-"], "2417": ["1E588499"], "2437": ["BDB99066"], "2447": ["50E6CBD4-", "3F499238"], "2427": ["25068636+"]}, {"2412": ["C63C5D46", "265A27E0", "96D7D3DD", "C7A67CD4", "C7A6E03A"], "2472": ["140116D9-", "1C28A1C1"], "2462": ["96D7EDE8-", "1B9E33AE", "7002C7C5-", "250648B8", "31C45F86", "1C4A0595", "31C42F6B", "C7A6EFC0-"], "2417": ["252CFFC3", "9CA62D6B"], "2437": ["D998E1CE-", "A8E4D41F", "1349EE9A", "150CF4D0", "9CA611E1", "F3C1FA00-", "2BC144D4", "150CB4C6", "1A4F9BE5", "2127FF1B", "264D2A69"], "2422": ["23083C32+", "7E5DA434", "252C940E"]}, {"2437": ["4FB554D7+"]}, {"5500": ["0E8F1635+"], "2447": ["7E5D7B79", "96D77197"], "2412": ["94F6721D", "353BC26C+", "264DCDC1", "2308E857", "C63C3FB3", "96D7E3D4", "31C43F2E", "0543F690"], "2462": ["C7A68F5B", "1D19D961-"], "5220": [], "2467": ["14017DD2"], "2417": ["96D7A280+", "4FB58374+"], "2437": ["1E58849F", "2308D109-", "1E580919", "179A6126", "1CF08464", "4FB5D860", "252C4D70-", "265AAFBB", "D9982A56-", "040E5692"], "2432": ["8DF7790B+", "1D1938FF", "9CA662DA+"], "5180": ["651172E5+", "96D77197+"], "2472": ["31C40A3D", "651172E5", "265BAF8B-"], "2452": ["23081DDD"], "2442": ["66B3EE61-"], "2457": ["7EE50084-", "1401CE1D"]}, {"2412": ["31C40FC7", "353B7C9A+", "353BF1AA+", "D9981E31", "D111B72F", "96D725B3", "2308F2D5"], "2452": ["24FE1064-"], "2447": ["1C286BAF"], "2462": ["1F3FD460", "F3C16450-", "9CA68C33", "25064F2D-", "1F3FD54D-", "1A4F9445", "C63C2674-", "96D7253B"], "2417": ["4FB5840A+"], "2437": ["040E53FA", "0804C034-", "040E8E8D", "4FB54E37-", "D9981E18", "252CCD82-", "150C0F1A", "353BEC42+", "252C34AF-", "7E5D4F67"], "2432": ["94F6AAF7+"], "2427": ["4FB593CD", "7E5D5AA3"], "2472": ["2506C915"], "2457": ["80DF3730"], "2442": ["A8E4EBFD", "0543EBB5"], "2422": ["31C4369B"]}, {"2412": ["96D74F15", "65115520+", "252CC339", "31706F49", "31C444CA", "C7A66C70"], "2462": ["C7A6A52D", "6511B18E", "0543ABEF", "1401DC56"], "2442": ["2308763A-"], "2422": ["7E5D5C7A", "0355F913"], "2437": ["EA96F28B", "353B8D95+", "2BC14611", "7D6854C4-"], "2457": ["265AFA44", "9CA6A05D"]}, {"5500": ["69A54625+"], "2447": ["08042635-"], "2412": ["69A54625", "6511607D", "353BCCEA+", "863BB35F+", "9CA6A741+"], "2462": ["0543CD2F-", "1B2F6472"], "5220": [], "2417": ["C714425D", "80DF8160"], "2437": ["C0A8E7A8", "BDB9943D-", "7E5D88E2", "1A4F8D18", "0804C015-", "219133EF", "1E58BB90", "D64DFFB9-", "353B8B13+", "353BE445+"], "2427": ["D64DFFB2"], "2432": ["353BF679+", "8DF7BD2E", "1A67CAF6+"], "2472": ["14017939-"], "2452": ["D11161EC-"], "2442": ["05434FFA", "C63C2FD7-"], "2422": ["863BCC76+"]}, {"2437": ["1D190B80"]}, {"2412": ["150C9826"], "2437": ["040E2EB6", "C7A65F26", "1C4AD1EE"]}, {"2462": ["150C8FF9", "9A749CB0"], "2442": ["94F6A5DB-"], "2437": ["252C4B59-", "F2AF9918", "259C4357", "70028F1F-"], "2447": ["05438DAF"], "2472": ["7002FBE9-", "1F3FD5BE-"]}, {"2412": ["65119B65", "24FE086A+"], "2452": ["D0BD0617"], "2472": ["2506C742-"], "2462": ["05439289", "3170FD19-"], "2417": ["96D7BB0E+"], "2437": ["116B1D2D", "040ED830", "264D48FB-", "226BEC18", "317061D6"]}, {"2412": ["6BD3B9A6"], "2437": ["94E439CC", "80485A35", "44527E3A-", "264D5555"]}, {"2462": ["226B74FB", "1E2A044C"], "2412": ["C7A69E2A+"], "2437": ["7D5E2FC5"]}, {"2427": ["2BC1F20E"], "2447": ["02B40945"], "2462": ["FEEDAC62", "1B5ED333-"], "2437": ["252CE025-", "7E5D1517", "252CCDBF-", "252CD130-", "9A74984A"], "2472": ["24FECC4F-"], "2432": ["96D7082F-", "7E5D5BEE"], "2457": ["80DFAC2F-", "1A8C0F26", "24FEA20F-"]}, {"2412": ["2506A811", "1401DC3D", "19CB4619"], "2447": ["265BB1DF"], "2462": ["473D2662", "252CEBD5-"], "2467": ["23082497-"], "2417": ["E6BABE8F"], "2437": ["147F73E0"], "2432": ["24FE00C7", "0543C728-"], "2457": ["80DF916A"]}, {"2412": ["65117C4F", "473D958C"], "2437": ["1B11F9E5"]}]
#!/usr/bin/env python3
import json
import sys
from itertools import chain
from math import sqrt
import matplotlib.pyplot as plt
def freq_to_chan(freq):
if 2412 <= freq <= 2472:
return int((freq - 2407) / 5)
elif 4900 <= freq < 5000:
return int((freq - 4000) / 5)
elif 5000 < freq < 5900:
return int((freq - 5000) / 5)
else:
raise Exception("Unknown frequency %d MHz" % freq)
def chan_to_freq(chan):
if 1 <= chan <= 13:
return 2407 + chan*5
elif 13 < chan < 180:
return 5000 + chan*5
elif 180 <= chan < 200:
return 4000 + chan*5
else:
raise Exception("Unknown channel %d" % chan)
def all_freqs():
#return chain(range(2412, 2477, 5), range(5180, 5710, 10))
return range(2412, 2477, 5)
def flat_dict_of_lists(d):
return chain.from_iterable(((k, v) for v in values) for k, values in d.items())
def dict_of_lists(l):
ret = {}
for k,v in l:
ret[k] = ret.get(k, []) + [v]
return ret
def pool_duplicates(data):
# pool all nodes seeing the same AP to one big virtual node
cache = {}
for sample in data:
identities = list(flat_dict_of_lists(sample))
n = 0
while n < len(identities):
identity = identities[n]
if identity in cache:
other = cache[identity]
identities.extend(set(other) - set(identities))
cache[identity] = identities
n += 1
# we want to return no duplicates, but dicts are hashable, so we have to
# identify duplicates ourself
ret = []
for sample in cache.values():
if not sample in ret:
ret.append(sample)
return (dict_of_lists(sample) for sample in ret)
def calc_eff_usage(data):
primaries = {freq: 0 for freq in all_freqs()}
secondaries = {freq: 0 for freq in all_freqs()}
effective_usages = {freq: 0 for freq in all_freqs()}
effective_influences = {freq: 0 for freq in all_freqs()}
for primaryfreq, bssids in data.items():
for bssid in bssids:
try:
primaries[primaryfreq] += 1
except KeyError:
print(primaries.keys())
raise
meanfreq = primaryfreq
width = 22 # HT20 channel width (DSSS, not OFDM)
if bssid.endswith('-'):
meanfreq -= 10
width = 40 # HT40 channel width
try:
secondaries[primaryfreq-20] += 1
except KeyError:
print("Strange AP %s reporting HT40- at %i MHz" % (bssid, primaryfreq))
elif bssid.endswith('+'):
meanfreq += 10
width = 40 # HT40 channel width
try:
secondaries[primaryfreq+20] += 1
except KeyError:
print("Strange AP %s reporting HT40+ at %i MHz" % (bssid, primaryfreq))
for countfreq in all_freqs():
if abs(countfreq - meanfreq) <= width / 2:
effective_usages[countfreq] += 1
if abs(countfreq - meanfreq) <= width:
effective_influences[countfreq] += 1
return (primaries, secondaries, effective_usages, effective_influences)
def plot(counts, errs):
keys = tuple(counts[0].keys())
fig = plt.figure()
plot = fig.add_subplot(111)
plot.grid()
plot.bar(tuple(counts[0].keys()), counts[0].values(), align='center', color='red', label='Primärer Kanal')
plot.bar(tuple(counts[1].keys()), counts[1].values(), align='center', color='#ff9999', bottom=counts[0].values(), label='Sekundärer Kanal')
bot = tuple(map(sum, zip(counts[0].values(), counts[1].values())))
plot.bar(keys, tuple(x[0] - x[1] for x in zip(counts[2].values(), bot)), bottom=bot, align='center', label='Effektive Belastung', color='#ffff99')#, yerr=errs[2].values())
plot.bar(keys, tuple(x[0] - x[1] for x in zip(counts[3].values(), counts[2].values())), bottom=tuple(counts[2].values()), align='center', label='Effektive Beeinflussung', color='white', yerr=errs[3].values())
plot.set_xlabel("Kanal/Frequenz")
plot.set_ylabel("Anzahl APs pro Knoten")
plot.set_xticks(keys)
plot.set_xticklabels(list(map(
lambda chan: "%i\n%i" % (chan, chan_to_freq(chan)),
keys)
))
plot.legend()
plt.show()
def std_err(data):
data = tuple(data)
N = len(data)
avg = sum(data)/N
s = sum((v-avg)**2 for v in data) / (N - 1)
return sqrt(s / N)
def main(f):
data = json.load(f)
try:
data = data.values()
except AttributeError:
pass
data = [ { int(k): v for k,v in sample.items() if int(k) < 3000 }
for sample in data ]
print(len(data))
data = pool_duplicates(data)
counts = [calc_eff_usage(sample) for sample in data]
print(len(counts))
avgs = [{freq_to_chan(freq): sum(v[i][freq] for v in counts)/len(counts) for freq in all_freqs()} for i in range(len(counts[0]))]
errors = [{freq_to_chan(freq): std_err(v[i][freq] for v in counts) for freq in all_freqs()} for i in range(len(counts[0]))]
plot(avgs, errors)
if __name__ == '__main__':
main(sys.stdin)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.