Skip to content

Latest commit

 

History

History
29 lines (18 loc) · 962 Bytes

01.75-quick-n-dirty-conversions.md

File metadata and controls

29 lines (18 loc) · 962 Bytes

Data 1.75: Quick n' Dirty Conversions

CSV to JSON

Sample CSV from FiveThirtyEight article on Alcohol Consumption:

wget https://raw.githubusercontent.com/fivethirtyeight/data/master/alcohol-consumption/drinks.csv

Much easier than JSON to CSV, lots of tools to do that. Lets explore why...

https://www.google.com/search?q=csv+to+json

JSON to CSV

More difficult than going the other way around.

https://www.google.com/search?q=json+to+csv

Lots of default tools to help you do this conversion, many of them work differently so if one doesn't work, try another.

Also, before you drop data into a converter tool, you may have to remove junk/metadata and simplify the JSON.

Other ways to convert

  • Online Converters
  • Sublime Text (multiline cursor)
  • Regular Expressions / find and replace
  • Command Line Tools (next lesson)