Day 4 of Dashboard Week was a great data set from the US Energy Information Administration, with a wealth of information available. I decided to make an exploratory dashboard that showed trends in global energy consumption, production, reserves, imports and exports. Here’s my (almost finished) viz and some things I learned along the way:
1. Be Aware Of The ‘Field Length’ Option When Inputting Data In Alteryx
Our downloaded data file was a .txt file in the following format:
We then tried to read the data as a delimited text file with no delimiter (thereby parsing out each row of the file) like so:
This however didn’t work quite correctly, as all the rows were truncated. We weren’t sure at first how to resolve this, but Ollie found this sneaky little property of the input: ‘Field Length’
We then just increased this massively, to accommodate for the characters that were truncated.
2. Split Up Your Alteryx Workflow
If the files are huge and taking ages to run, split up your workflow!
As you can see in the image below, after several tools, I output the data in Container 118 as a .yxdb file and then re-input that data in Container 130. I could then disable Container 118 and Alteryx would now only need to run from Container 130 onward. This meant I was much more productive, not having to wait each time for my workflow to run.
3. The Data Cleanse Tool Is Really Slow
Part of the reason I chunked up my workflow in this way was because of the time it was taking to run the data cleanse tool.
It is an extremely useful tool, and very easy to use, but if you can use another tool to do the job, I would recommend that. The Data Cleanse tool is a macro with many tools in it, so it will be faster to select the one or two tools you need, and use those instead. For example, you could use a single trim function in a formula tool to remove the leading and trailing white space.