Last active
December 10, 2015 00:49
-
-
Save smailq/4354456 to your computer and use it in GitHub Desktop.
Create a summary (Name, High Concept, Company URL, Angellist URL) from results
of Angel.co's Startup API.
This file contains hidden or 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
""" | |
Create a summary (Name, High Concept, Company URL, Angellist URL) from results | |
of Angel.co's Startup API. | |
Reads all `*.json` from current directory and produces `summary.tsv` in the same directory. | |
Raw data is fetched from : https://api.angel.co/1/tags/1702/startups?page=1&per_page=50 | |
Tag 1702 : Toronto | |
""" | |
import json, os | |
of = open('summary.tsv','wb') | |
for dirname, dirnames, filenames in os.walk('.'): | |
for filename in filenames: | |
if not filename.endswith('.json'): | |
continue | |
f = open(filename, 'r') | |
content = f.read() | |
parsed_content = json.loads(content) | |
startup_list = parsed_content['startups'] | |
for startup in startup_list: | |
if startup['hidden']: | |
continue | |
of.write((u"{0}\t{1}\t{2}\t{3}\n".format(startup.get('name'),startup.get('high_concept'),startup.get('company_url'),startup.get('angellist_url'))).encode("UTF-8")) | |
f.close() | |
of.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment