-
Notifications
You must be signed in to change notification settings - Fork 8
Different formats for Tabular Data
flyingzumwalt edited this page Feb 25, 2016
·
5 revisions
If we put the data in a table, like a spreadsheet or an HTML table, it looks like this:
| Type of Experience | Little or No Experience | Some Experience | Very Familiar |
|---|---|---|---|
| Writing software in any programming language | 1 | 5 | 4 |
| Frontend Web Development | 4 | 3 | 3 |
| Server-side (“backend”) Web Development | 4 | 4 | 2 |
| Using Git to track changes and share code (add, commit, push, pull) | 2 | 5 | 3 |
If we represent the data as CSV (comma separated values), it will look like this:
Type of Experience,Little/No Experience,Some Experience,Very Familiar
Writing software in any programming language,1,5,4
Frontend Web Development,4,3,3
Server-side (“backend”) Web Development,4,4,2
"Using Git to track changes and share code (add, commit, push, pull)",2,5,3
Note that in order to accommodate commas within the values of the "Type of Experience" column, we put those values in quotes.
JSON gives us a bit more structure. A JSON object is a set of properties and values. Properties and values in a JSON object is an example of the more general pattern of key/value pairs. This concept of keys and values is an important concept when you're creating, manipulating, or exchanging data.
JSON (one object per row):
{"Type of Experience":"Using Git to track changes and share code (add, commit, push, pull)","Little/No Experience":2,"Some Experience":5,"Very Familiar":3}JSON (with line breaks for readability):
{
"Type of Experience":"Using Git to track changes and share code (add, commit, push, pull)",
"Little/No Experience":2,
"Some Experience":5,
"Very Familiar":3
}JSON with column numbers instead of Values from Header Row:
{
"col1":"Using Git to track changes and share code (add, commit, push, pull)",
"col2":2,
"col3":5,
"col4":3
}