-
Notifications
You must be signed in to change notification settings - Fork 18
Week 5 Notes
Read:
See the code examples
Don't forget to check out the new code in the repo this week.
Creating a JSON file
Part of the assignment this week is to publish some JSON data. You don't necessarily have to write the JSON from scratch. If you have data in a spreadsheet, you can convert it to JSON. In your spreadsheet program, export the file as CSV, open the CSV file in Sublime or other text editor, copy the contents, and paste it into this online CSV-to-JSON converter. Then click "Download" or just copy and paste the resulting JSON into a new file and save it with the file extension .json
.
If you prefer, you can write JSON in a text editor, or use the online JSON editing tool, JSON Editor Online.
Refer to the notes on JSON as a formatting guide.
Publishing JSON
Publish your JSON to gist by forking my example JSON gist and replacing my code with your own. Make sure to validate your JSON using JSON Editor Online.
#####JSON Tools
- Chrome extension for viewing JSON files in the browser: https://chrome.google.com/webstore/detail/jsonview/chklaanhfefbnpoihckbnefhakgolnmc?hl=en
Try out some of these APIs or find others on your own:
- OpenWeatherMap | Example
- Sunlight Foundation | Example
- NY Times | Example
- Instagram | Example
- Foursquare
- YouTube | jsfiddle example (uses jQuery)
- Google Maps | jsfiddle example
Also see NYC Open Data, where you can get NYC-related datasets, some downloadable and others available as URLs.