An example with data in both CSV and JSON It turns out, for example, that there’s a lot of extra data in the JSON which isn’t in the visualisations, including the percentage of total turnout and the number of non-voters in each category. Once you’ve got the data, you can do what you want with it. One tool I find very useful for this is Open Refine - and indeed some years back I wrote a tutorial on how to convert JSON (or XML) into a spreadsheet using Open Refine. Results include this one (you’ll need to copy and paste the JSON), this one (save the webpage with a. Thankfully, there are lots of converters online: just search for ‘JSON to CSV converter’ or something similar. To get it into Excel or a similar tool, you’ll need to convert it. Turning the JSON into something you can work with If you want to know more about how JSON is organised, read my post on Data for journalists: JSON for beginners. Now at least you can see the different types of data and the way it has been organised. With that installed, it will look more like this: To make it a bit easier to understand, install the JSONView add-on for Firefox, or for Chrome, or JsonViewer for Opera. It’s not easy to understand, but there is data in there, trust me. If it is using the JSON format (which is most likely), then it will probably look a bit like this: This will open the file in your browser (if you want to see it for yourself, here’s the link). To check that this is the data we are looking for, right-click on the name and select Open in new tab. In this case there is only one file that is shown in the XHR tab. This actually stands for XML HTTP Request, but that doesn’t matter. Img refers to images, Font to fonts and so on.Ī good one to check for any data sources is XHR. JS, for example, means JavaScript files that end in. Just above the results and a bunch of coloured lines (these indicate load times for each file) you should see these options:Įach of these refers to a different type of file. This is quite a lot to pick through – but thankfully the Network tab has some extra tabs itself. When refreshed, you should see a list of all the files loaded when the webpage is accessed But most webpages you see now involve all sorts of external scripts, cookies, images, media files - and data. Once upon a time a HTML page might have been only that: one HTML file, and nothing more. What the Network view is showing you is a list of every file that is loaded by your browser when the page is being accessed. If you refresh the page, then, you should see the Network view in the inspector start to fill up with information. Refresh the page and see what’s being loaded This is because the Network view only starts recording information while it is open. Click on that ‘tab’ to switch to that view. If there’s data being loaded into this page, a good place to look is the Network. You might not see all of these: in this case a > button after the last visible one should allow you to see the ones that have been cut off. Note that the inspector has a number of sections: first Elements, then Console Sources Network Timeline Profiles Application Security and finally Audits. This is what it looks like across the bottom: In most cases it will open up across the bottom, but sometimes it opens up along the right hand edge, or even as a pop up window. The inspector will take up part of your screen. Then you can select Developer > Developer Tools. In Opera you need to make the developer menu visible first by selecting View > Show Developer Menu. If for any reason you cannot do that, you can also open the inspector by going to View > Developer > Developer Tools (in Chrome) or Tools > Developer > Inspector (in Firefox). Once you have the page open in those browsers, the quickest way to open the inspector is to right-click somewhere on the page and select Inspect (on Chrome) or Inspect Element (Firefox and Opera). To do this you really need to be using a browser like Chrome, Firefox, or Opera. The first step to identifying the data behind these charts is to open up the ‘ inspector‘.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |