Created
November 26, 2014 21:20
-
-
Save geobabbler/da8c144bf49d0a0b0209 to your computer and use it in GitHub Desktop.
Import JSON from StackExchange tags API to CSV
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 requests | |
from pprint import pprint | |
r = requests.get('https://api.stackexchange.com/2.2/tags?page=1&pagesize=100&order=desc&sort=popular&site=gis') | |
data = r.json() | |
print "tag,count" | |
for tag in data["items"]: | |
print tag["name"] + "," + str(tag["count"]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment