CoCalc Public Filespdr_data.sagewsOpen with one click!
Authors: Tim Clemans SMC, William A. Stein
Views : 44
Compute Environment: Ubuntu 18.04 (Deprecated)
import requests data = requests.get('https://data.seattle.gov/resource/6qkn-8xvw.json?$limit=50000').json() def get_column(data, column): return [row[column] for row in data] dates = sorted(get_column(data, 'received_date')) bar_chart([dates.count(item) for item in sorted(list(set(dates)))])
sorted([{'date': item, 'count': dates.count(item)} for item in sorted(list(set(dates)))], key=lambda x: x['count'], reverse=True)[:10]
[{'date': u'2015-02-05T00:00:00', 'count': 912}, {'date': u'2015-10-29T00:00:00', 'count': 276}, {'date': u'2015-01-26T00:00:00', 'count': 177}, {'date': u'2015-02-09T00:00:00', 'count': 152}, {'date': u'2015-02-02T00:00:00', 'count': 150}, {'date': u'2015-02-06T00:00:00', 'count': 70}, {'date': u'2015-01-30T00:00:00', 'count': 62}, {'date': u'2015-02-04T00:00:00', 'count': 62}, {'date': u'2015-02-10T00:00:00', 'count': 60}, {'date': u'2015-02-03T00:00:00', 'count': 52}]
html.table