Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jackhowa/exercise-three-homework1
https://github.com/jackhowa/exercise-three-homework1
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/jackhowa/exercise-three-homework1
- Owner: JackHowa
- Created: 2016-02-23T21:30:49.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-02-23T21:32:20.000Z (almost 9 years ago)
- Last Synced: 2023-08-18T23:00:54.068Z (over 1 year ago)
- Language: JavaScript
- Size: 19.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
#### Exercise Three: Looping through data to create [a simple bar chart](http://chriscanipe.com/news-apps-class-2016/exercise-three/).
We loaded up our Columbia Public Schools JSON in class Tuesday and iterated through the rows using a "for loop." We touched on three main concepts:
1) Loading data via JQuery's [super simple ajax method, $.getJSON](http://www.w3schools.com/jquery/ajax_getjson.asp):
```
$.getJSON("js/filename.json", function(data) {
doSomething(data);
})
```2) Passed the data between functions. (See [Paramaters and Arguments](http://www.w3schools.com/js/js_function_parameters.asp))
3) We looped through our data, and appended some markup to the page to create a simple bar chart. Some references you might find useful:
* [For loops](http://www.w3schools.com/js/js_loop_for.asp)
* [Variables](http://www.w3schools.com/js/js_variables.asp)
* [Operators](http://www.w3schools.com/js/js_operators.asp)