Wednesday, December 26, 2018

Christmas trees sold in the US

So it's Christmas season and I just got this very small data set in my inbox, so I decided, why not go ahead and make some few visualisations using the available data.

First question that comes to my mind is what is the trend of total sales.



My expectation was that it would be steadily increasing, however not much of an increase apart from the boom in 2007, 2013 and 2016.

The second question in my mind would be the trend of sales of fake trees and real trees separately.



As per my expectation, the fake are increasing as the years goes by.

Now finally just to see the trend in percent of fake trees of total in graphical view. From the above graph, I can assume that it should be increasing.


As seen from the above graph, there is some up and down in the trend and not a steady increase.

Happy Christmas and a new year!

Monday, December 24, 2018

Super Heroes - Marvel Vs DC:Working with non-numeric data and the COUNTROWS function

Continuing with the previous data set of super heroes, the first thing I notice is that the data is just text. Only the height and weight columns are numeric. It wouldn't be that easy a data set to work with, especially since I am mainly used to working with numeric data sets. Anyways, I will just move forward and see what best I can do.

So the first thing that comes to my mind, as the title suggest, is the count of Marvel and DC super heroes. The first thing I will do is write a measure to calculate the number of rows. I will use a COUNTROWS function to do this:

Rows_count = COUNTROWS(heroes_information)

Now I will just just select the table format and tick on the Rows_count measure I just created and notice that I have 734 rows in the data. I will then add Publisher to the data and re-arrange the levels to get this:


Out of this, I only want the Marvel and DC superheroes, so I will go ahead and filter this:

This is the resulting table I get:


The two publishers contribute to 82.15% of the superheroes in the data set.