Created
March 19, 2016 22:30
-
-
Save busterroni/c5fd68a40626c3639120 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json, collections, plotly.plotly as plotly | |
with open("tagpromatches.json") as f: | |
data=json.load(f) | |
port_counts=collections.Counter(match['port'] for match in data.values()) | |
fig= { | |
'data': [{ | |
'labels': port_counts.keys(), | |
'values': port_counts.values(), | |
'type': 'pie', | |
}], | |
'layout': {'title': 'TagPro Port Distribution'} | |
} | |
plotly.plot(fig) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment