- [Instructor] One of the other most frequent tasks you're going to have to do is, you're going to have to convert data from one format to another. And so for example, what you can see here is JSON, Java Script Object Notation, and this example looks pretty crazy, this is actually the GDP data that we've been looking at, and Java Script Object Notation, JSON essentially has these curly braces on either end of a data value. Sometimes is has straight braces, straight brackets also, which I'm not going to get into why that is.
It has field names, and then a colon, and then that fields' value, and each individual value is separated by a comma or each individual field rather, so I have an ID, SL, and I have a value Sierra Leone in this case. And so, long story short, it's just organized this way, it's a just a text file. There are other types of text-based data storage formats, CSV files where every value in every field is separated by a comma, TSVs every value is separated by tabs, et cetera, et cetera.
You have XML, so many different data formats, and often times you get data in a format that isn't the format you need to work in. Now, luckily there are all kinds of tools to make changes that you need to make in order to look at your data. So for instance, if I were to Google CSV to JSON, 'cause maybe I got a CSV file, but I need to work in JSON 'cause JavaScript likes JSON format, I can actually copy and paste in CSV data, like this example data here, comma delimited fields and values, and if I hit convert, it's going to convert it into a JSON format.
Languages, most modern languages also have built into them, the ability to work in different formats. So like PHP as an example, doesn't read JSON natively, but using json_decode, I can take a JSON file and work with it in PHP. It'll turn into an array, and then I can use json_encode to save out a JSON file back to a web browser for usage with JavaScript, or some other code. Long story short, this is just part of what you have to do very very frequently as part of your data transformation process, and so you can expect to run into this quite a bit.
So that was essentially five different ways you may have to convert and transform your data. The five most frequent that I find myself running into, long story short, learn to embrace it, learn to accept it, because it is nearly inevitable that you'll have to make transformations of your data before you can work with it. So, learn the tools and techniques, and more than I've shown you here really will be helpful for you, but this is a good start.
Released
12/20/2018- Describe the process by which individuals’ interests are incorporated into data visualizations.
- Differentiate the use of the Ws in data visualization.
- Explain techniques involved in defining your narrative when visualizing data.
- Identify the factors that make data visualizations relatable to an audience’s interests and needs.
- Review the appropriate use of charts in data visualizations.
- Define the process involved in applying interactivity to data visualizations.
Share this video
Embed this video
Video: Convert your data: Data formats