# How to create a Histogram in Excel?

Standard

Histogram is a powerful data analysis technique — it let’s you quickly see the distribution of the data you have. So in this post, I am going to list the steps to create histogram in Excel.

It’s a two-step process.

1. Install “Data Analysis Tool Pak” (free Excel add-in)
2. Format the data and build the histogram

### Step 1: Install Data Analysis Tool Pak.

One of the most useful data analysis add-in in excel is not available by default! It’s called “Analysis ToolPak”

To activate it. Go to File > Excel options > Addins > For the manage field, select Excel add-ins

Make sure that ToolPak is activated and click OK.

(Also, Solver is a great add-in as well! It’s not in the scope of this article to discuss that add-in but it’s a powerful add-in as well. For instance, it let’s you work on optimization problems)

### Step 2: Format Data and build the Histogram

So now let’s format the data.

You need two things to create a Histogram. 1) Data 2) Range

Here’s an example: (I have about 3000 numbers and need to see the distribution)

You could have other fields on the sheet as well but you need at least the data field. Range is optional but I recommend that you specify the Range so that your histogram would have the bins that you specified — otherwise you could have just used a bar chart!

Note that both of them are numerical.

Now go to Menu Bar > Data > Data Analysis

Out of the options available, click on Histogram and select the Input Range and Bin Range > after you’re done, click OK.

You should see a new worksheet with raw data (ready for charting!). Now, create a Bar chart using the raw data and you have your histogram:

### Conclusion:

In this post I listed the steps you can take to create a Histogram in Excel. Note that there are other options as well — like R (hist function) that let’s you build histogram as well so you do have choice of tools but if you want to stick with excel and it’s good enough then you now know how. Cheers!

# What data are data scientists at startups actually analyzing? How is it collected?

Standard

### Part 1: What are startups analyzing?

It depends on the Business Model and the Stage that they are at.

Business Models: Marketplace, Ecom, SaaS, Media, etc.

Stage: Early, Mid, Late

So let’s say you have a SaaS model and you’re in Mid-stage (post product-market fit stage) then you would tend to be focused on things like: Engagement, Churn, etc…and ideally they should be focused on measuring what aligns best with the strategy (instead of capturing everything!)

Let’s take another example. Let’s say you are a Marketplace in late-stage. So you would tend to be focused more on the “money” and so you can measure things like: transactions, commissions, etc…

I recommend reading “lean analytics” book as it goes much deeper and it’s a great starting point for anyone to understand how analytics could help a startup.

### Part 2: How is it collected?

Now this also depends on your product. Assuming you’re a tech startup, you would have Web App and/or Desktop app and/or Mobile app. And now depending on your delivery approach plus your measurement needs, the “how” part will be determined. It would invariably be a combination of your transactions data source, web/mobile events stack (like Google analytics/other-Vendor or Custom), finance data source among others.

This post points to 10 other blogs which lists their “data” stack: The Data Infrastructure Meta-Analysis: How Top Engineering Organizations Built Their Big Data Stacks – The Data Point

# Building data driven companies — 3 P’s framework.

Standard

Data Driven Companies — 3 P’s framework

### People:

To build data-driven organization, you need decision makers to use data instead of anything else. So you need to help built a culture where data-driven decision-making thrives — usually this is most efficient if you have executive buy-in. Example: A CEO who is a stats-junkie! Of course, not every company would have this. It could be that you find yourself in an organization where the CEO is known to make huge bets just using “gut” — in cases like this, an organization could have some of the best platform and processes but unfortunately, it won’t do any good.

Now just having people who make data driven decisions is not enough — you (as a data professional) need to deliver “data” to them. To do that you need 1) Processes 2) Platform. So let’s talk about them:

### Platform:

A platform in this context is the data and analytics platform used by the organization to get the data they need, when they need it. If the organization is small (e.g. less than 15 or so) then the platform could be excel and engineers/analyst writing ad-hoc queries but as you grow (= team size expands) then you need better platform to serve the data needs of the organization. Some tools are better than others and you would usually wind up using multiple vendors in your analytics stack — but remember that jut having a great analytics platform is not enough. You need the “people” and the “processes” to go with that. So, with that let’s talk about process:

### Process:

Process is everything between Platform and People. Let me expand on this. Here are few things where having a defined process is key for building data-driven organizations.

1. How to prioritize the analytics request? It will be great to have a process where you/team will work on projects that closely align with the strategic objective of the company
2. What does the analytics org-structure look like? Do you have analyst embedded in each team or do you have a centralized team or do you go for a hybrid approach?
3. What is the process to justify investment in analytics?
4. Which is the “right” metric definition? (There needs to be a process that keeps the metric definition standardized in an organization)
5. What is the process to clean data? (Maintaining data integrity is key. You could put this on “Platform” bucket as well)
6. How do users get “help”? (Is there a ticketing system that they should use? Is it just another “IT” ticket? Who responds to tickets? What’s the SLA around analytics queue tickets? etc)
7. Who owns “analytics”? There needs to be someone on the team owns analytics like analytics manager, VP of analytics and he/she should be reporting to someone on management team (CIO, CFO, COO, Chief of Staff, CEO) who is held responsible as well.

The list goes on…but I hope you get the point. Having a well-defined processes in an organization is important — usually, this stuff gets less attention and org’s/teams tend to focus just on “platform” which might not be the best thing to do.

Having shared the 3 P’s, let me share few tips on

### How to go about implementing the framework:

Three tips:

1. Identify the “P” that has the best ROI
2. It’s an iterative process!
3. Refine as needed

On #1. To help you identify the “P” that has the best ROI, your first step could be to create a matrix to help you evaluate where your organizations falls. I have shown an example below:

If you want to build analytics from scratch then you would love working at early stage startups (bottom-right) but if you like advanced stuff (data-science) then Top-right corner is great! Also, For org’s in Top Left where you have the platform and processes but lack data-driven people — it would be wise to crank up your efforts to drive adoption. (since you already have the right platform and process than any additional investment here would yield little to no ROI).

On #2. Understand that it’s an iterative process. You are never done optimizing any of these P’s! It’s a journey and not a destination.

On #3: Just like with other frameworks, you’ll need to refine and adjust this based on your needs. You may have noticed that I focused on “Org-wide” framework but you could be heading up an analytics function for a department and in that case, not all of the things here would help. “People”, “Process” and “Platform” would still apply on a high level but it might just be that you don’t have “control” over the platform. So, you may need to refine/adjust this as needed.

I hope the framework is a great tool for you to think about building data driven companies!

Best,
Paras Doshi

Standard

# Titanic Data

Standard

Here’s a link to download the Titanic data — http://lib.stat.cmu.edu/S/Harrell/data/descriptions/titanic.html — it’s really useful in analytics and data science projects. You can:

1. Build a predictive model. Example: https://www.kaggle.com/c/titanic
2. I also use this data set to create interactive dashboards on tools like Qlik and Tableau to understand their features.

Enjoy!

If you liked this, you may also like other data sets that I have here: http://parasdoshi.com/2012/07/31/where-can-we-find-datasets-that-we-can-play-with-for-business-intelligence-data-mining-data-analysis-projects/

# Productivity Tip: Learn to Comment/Uncomment SQL code using shortcuts

Standard

I spend a lot of time writing SQL code — and as a reader of this blog, You might be in the same boat. So any productivity gains that we could get here could go a long way. On that note, here’s a quick productivity tip: Learn to comment/uncomment multiple lines of SQL code using keyboard shortcut.

If you are using SQL Server Management Studio, it’s “CTRL-K followed by CTRL+C” for commenting AND “CTRL+K followed by CTRL+U” for uncommenting.

If you are using some other Data Management Software tool, I am sure you can find it using their HELP section or googling around.

Either ways, these shortcuts go a long way in making you more productive! What is your favorite productivity tip?

# Qlik sense: How to see Data Load Editor scripts for apps developed by your Team members?

Standard

(This post first appeared on the Qlik Community. here)

Problem:

So you just joined a Business Intelligence Team and one of the responsibilities include building apps for your business users. Eventually, you would have a need to see Data Load editor scripts for apps developed by other members in the team. So what permission do you need to be able to do that?

Credits: darkhorse

Qliksense Version: Enterprise Server 2.0

Source: can’t see a peer’s data load editor scripts

Solution:

This a two-step process.

1) Get “content admin” access (or “higher” level access)

Step 1:

The short answer is that you need “Content Admin” permission from your Qlik sense admin…But with this access level, you will have access to other developer’s app via QMC. If you need to do this via HUB as well then you will have to change the content admin role.

Here’s how Serhan ( darkhorse ) explained how to get this done:

QMC–> Security Rules–>Content Admin–> Edit–> Context–> Both in Hub and QMC

Step 2:

Now, once you get the “content” admin access, you might want to double two things:

1) You can get access to data load scripts on published apps — (I was able to do this but there still seems to some open questions around some folks not being able to see the data load scripts for published apps. If this is the case for you, you need to duplicate the app on your “my work” area and see the scripts)

2) You can duplicate apps on your “my Work” area and see scripts — this is also useful if you want to make changes to published apps that are out there.

Conclusion:

I hope this helps you resolve the permission issues and help you collaborate with your team members!

# Data puking and how T-mobile alienated a potential customer:

Standard

I saw this ad on a highway earlier today and my reaction: why would I switch to a network that has just “96%” coverage.

T mobile ad — example of data puking

…instead of converting a potential buyer, this ad actually made me more nervous. You know why? Its a case of what I like to call “data puking” where you throw bunch of numbers/stats/data at someone hoping that they will take action based off of it. So what would have helped in this ad? It would have been great to see it compared against someone else. Something like: we have the largest coverage compared to xyz. My ATT connection is spotty in downtown areas so if it said something like we have 96% coverage compared to ATT’s 80% then I would have been much more likely to make the switch.

Takeaway from this blog: don’t throw data points at your customers. Give them the context and guide them through the actions that you want them to take.

Standard

I like using spark lines data viz when it makes sense! It’s a great way to visualize trends in the data without taking too much space. Now, I knew how to add sparklines in Excel but recently, I wanted to use that on Google sheet and I had to figure it out so here are my notes:

1. Google has an inbuilt function called “SPARKLINE” to do this.

2. Sample usage: =SPARKLINE(B2:G2) — by default you can put line chart in your cells.

3. Then there are other options including changing the chart type. You can find them documented here:  https://support.google.com/docs/answer/3093289

4. One of the best practices that I advocate when you spark-line to “compare” trends is to make sure that you have the consistent axis definition. So the sample usage for that could like this:

=SPARKLINE(B2:G2,{“ymin”,0;“ymax”,110})

(if you want to do this for excel then here’s the post: http://parasdoshi.com/2015/03/10/how-to-assign-same-axis-values-to-a-group-of-spark-lines-in-excel/ )

After you’re done, here’s what a finished version could like on Google sheet: