All Posts By:

adam chmielewski

In Uncategorized on
November 3, 2022

Flexbox vs Grid

With web development, there are two main choices to how to layout the display – flexbox or grid. In order to better understand the advantages and use cases of each, this post briefly explores each.

Flexbox

Most of what I’ve read describes the use case of flexbox as 1 dimensional. Really what this means is each flexbox is a row. So, when you want control over each row as the overall box, flexbox is your option.

<div class="flexbox-container>
    <p>Div text goes here</p>
</div>

.flexbox-container {
  display: flex;
}

Grid

Now, if you read about Grid, you’ll find this described as 2 dimensional. This covers both rows and columns. With grid, you’re creating exactly that, a grid layout defining the rows and columns (yes, like a table).

So, which do you use?

Easy answer here, both. Why? Because you can use both together. You can put a flexbox inside of a grid, or a grid inside of a flexbox. Of course, you don’t actually need to do this. You can use one or the other. Point is, you’ve got options and it’s about selecting the right tool for the job – as usual.

In Data Visualization on
January 28, 2018

The Importance of Understanding

This may end up becoming an entire series of posts of The Importance of…

Understanding. What I mean by this is the importance of understanding what’s actually happening. In terms of data, take Tableau. Tableau is a wonderful data visualization tool. One that’s incredibly easy to get started with. But, there comes a point where users can get frustrated because the computer/software “just won’t do what I want it to!”

This is where the lack of understanding of what’s happening really becomes painful. As I myself tackle more of the complex and advanced features of software like Tableau, I’m having a lot of the ah-ha moments. As I work through problems, read blogs, and attempt to recreate what I’m seeing out there in the world – I’m finding a deeper understanding for what the software is actually doing, capable of doing, and where the software can do something – but then knowing that it’s really not designed for that and there may be a better way.

As an example, I recently recreated some of the work @jonathandrummey and @rodyzakovich outlined around the ideas of Filters As Parameters by means of scaffolds of data. The concept is to replicate data so that no matter what you do, there is always something present in the viz. This is a fundamental concept in Tableau. If an item is present in the viz, you can interact with it. However, when you filter something out – it’s no longer there and you can’t use it. Makes sense, right? So the ‘hack’ is to replicate the data so that you can filter something out – and still have it available.

This is the point of understanding. By thinking clearly about the problem and combining with understanding of how something works, you can create a massively powerful solution – one that wouldn’t be available without the knowledge.

In Data on
January 27, 2018

The Importance of Practice

Image result for practice

10,000 hours makes you an expert, so says Malcolm Gladwell. Others say otherwise. Regardless of either side there, practice is important. Whether it comes to Tableau, Python – my favorites – or any other data tool/language, practice is important.

It’s important to schedule time for meaningful practice. Something as small as 10-15 minutes per day can often be enough to keep you sharp. There are many challenges online to give you entertaining challenges that make practicing fun. For example, workout-wednesday.com provides advanced challenges for Tableau users and developers to advance their skills. Read more

In Data on
January 11, 2018

Learning data

Learning data likely has never been easier. With so much interest in this, sorry, courses and experts are popping up – there’s another – constantly.

My favorite right now is Udemy and I’ve been working my way through their offerings. The difficult part of learning is when it comes to the point that you know how to create a variable, indeed through a strong, and even write functions. The offerings being the beginner level drop significantly. This makes sense, people need to get started and it’s easy to create courses that appeal to many. After that, there’s a lot of ways to go with this.

I’m considering creating my own course. Not to as to the nose, and not for profit. I’m interested in really forcing myself to understand further, and the best way to learn, is to teach.

In Data Visualization on
August 19, 2017

Week 33 brought forth the challenge of moving the reference date for a Percent Change calculation based on a parameter. Along the way, VizWizBI put in the usual hidden gems and stumpers. The inspiration came from Curtis Harris.

For me, it’s nice to see when I get to the end result and I’ve achieved the same result as the designer of the challenge via different means/methods. I’m not always as efficient, but it certainly proves I’ve not just copied someone else’s work!

First, I needed to figure out the value at the selected parameter date. Here’s where I fumbled the most to start. Eventually I landed on an LOD that got this for me.

From there, some simple math to get the Percent Change

Reference lines gave me the intersection lines, and I got the dot at that point with this

And here it is!

Cheers!

In Data Visualization on
August 11, 2017

Workout Wednesday Week 32: Continuous Dates

This week’s #WorkoutWednesday challenge (available here) from @EmmaWhyte involved continuous dates. Per usual I figured this to be an easy solve, one that I nearly wanted to give up on, and then all at once the light bulb goes off and we’re rolling. Here’s my solution and the necessary solves.

The tricky bit with continuous dates is that, by their very nature, they move along a continuous line, but the example workbook has them stacked as discrete date parts would be. First thought here, and Year([Order Date]) to color and we’re off. Good start, next add Month([Order Date]) to Columns, switch to Discrete… and fail. Because I’ve got a Discrete Date part on color, it’s segmenting into 4 parts, not stacking. To the drawing board…

The solve here was to create a custom date whereby we ‘trick’ Tableau into putting all into the same year, and because we have the Year on color, it segments into 4 lines. Here’s my custom date (you could pick any year):

DATE("1900-"+STR(MONTH([Order Date]))+"-"+STR(DAY([Order Date])))

The remaining work was rather straighforward (so I found at least), you’ll have to add back the year for the tooltip in a separate calculation, which I did like this:

DATE(STR(YEAR([Order Date]))+”-“+STR(MONTH([Order Date]))+”-“+STR(DAY([Order Date])))

I may have ‘cheated’ as I put my title into a separate sheet and combined in the dashboard, whereas Emma had the title in the same sheet. I find this to be the beauty of the product and challenges is, as with programming, there isn’t one ‘right’ solution – but there may be better/worse ways of arriving at the end goal.

In Data Visualization on
July 3, 2017

Workout Wednesday Week 26: Small Multiples + Sorting

Week 26’s challenge from Emma was a really fun one, and for me expanded my knowledge in very valuable ways. The premise for the week’s challenge was to visualise (British English just in time for the fourth ;)). The overall goal was to create a Trellis chart for each of the Constituencies in each region, and to show the change in overall share by party from 2015 to 2017. Where the challenge really had me thinking I’d get stumped was on the sorting. I’d never implemented a parameter to sort Trellis charts based on the selection, but was ready for the challenge. Here’s the final outcome. Keep reading for how I solved some of the challenges. If you’re new to small multiples/Trellis charts, there’s plenty of resources out there, including the post Andy Cotgreave wrote in 2011.

Read more

In Data Visualization on
June 1, 2017

Workout Wednesday Week 22: Wine Tasting

After a few weeks of Andy Kriebel rocking my attempts to easily conquer #WorkoutWednesday, I’m back this week and sucessfully took on Emma’s Week 22 challenge of recreating this viz she found in the Economist.

The trickiest bit here for me was the aliasing of ‘Correct’, ‘Partially Correct’ and ‘Incorrect’. I solved this by adding an extra whitespace to the end of each alias value, but this could have been accomplished as Emma did (as I found out by downloading her workbook) by creating two different calculations. Easy night, I’m satisfied!

Here’s the embedded Tablet View, and the full version can be found on Tableau Public.

In Data Science on
May 5, 2017

Sentiment Analysis

One of the very first data science items I’ve attempted was sentiment analysis, using a combination of Python and Tableau. This was a stretch assignment for myself when Tableau 10.2 was released in beta, and there was built-in Python integration! I just had to do this. I work with volumes of unstructured text, and now there was a way to allow users to not only see the sentiment, but to interact with this analysis (using Tableau).

Rather than share (read: rather than me type all of it out) how I implemented this, check out this post on the Tableau Blog.

 

In Data Visualization on
May 5, 2017

Tableau Workout Wednesday Week 17 via Microsoft Power BI

Last night I completed the #WorkoutWednesday challenge for Week 17 using Tableau. Having started to experiment with Microsoft Power BI, and joining up with some user groups, I thought I’d see how my skills were progressing in the newest tool.

Quickly I found I still needed a bit to learn, and the requisite Google (perhaps I should have used Bing) of how to do Level of Detail calculations in Power BI didn’t turn up useful answer. Power BI uses DAX (data analysis expressions) to calculate measures and columns. Initially I just knew there had to be a way, there were way too many functions available to not be able to achieve this. In fact, I knew this was going to be easy, and again shock me at how great a product Power BI is, and had been right there all along, just waiting for me to pick it up and try my hand at it.

Read more