Tool: Realtimeboard

I stumbled upon this tool while reading an article on TechCrunch. It’s an online collaboration tool with visual diagrams that users can use to generate ideas and present. Boards can be shared between multiple teammates; which I can will be pretty valuable if you love the power of collaboration and white boards as a brainstorming tool. At my company, the C-suite folks all have white boards inside their office to flesh out ideas. Some whiteboards are also placed in the hallways to keep everyone updated on the status of projects. However, physical white boards are physically limited and it can get tricky to engage multiple folks, especially from different offices.

Realtimeboard is your whiteboard without such limitations. The boards are infinitely large and can be zoomed in or out comfortably. The visual components are pretty straightforward and easy to use. Users can add links, comments and images at will. Furthermore, boards are accessible regardless of where members are.

Below is a board I am working on in a school project.

realtimeboard

As can be seen in the image, comments can be added in yellow boxes and links come with the logo of the website links. Nodes can be moved around or added easily. If you want to mimic the same map in, let’s say, PowerPoint, moving or adding nodes requires taxing extra work on moving the connection lines or arrows around. With Realtimeboard, such a requirement is unnecessary. Therefore, a lot of time is saved.

Export options are plenty: PDF, image, csv and so on:

realtimeboard_2

I am not an investor in this firm. Just a fan that wants to show some token of appreciation to a cool tool.

Tool: Repl.it

I recently and fortunately came across a very interesting tool called Repl.it. Here is what it brings to the table:

Usually, the normal steps in programming include writing code in a text editor such as Pycharm or Eclipse, uploading to a repository such as GitHub and pushing it to a PaaS like Heroku or PythonAnywhere. However, even a text editor such as Pycharm requires some installation and housekeeping that can seem daunting to beginners.

Repl.it lowers that entry barrier. It allows coding in many popular languages right from a browser. Below is a quick code I wrote to have a dropdown menu from 1 to 49:

repl

All it takes is Internet, a browser and one-minute sign-up.

As of now, Repl.it seems to be focused on students. It’s free and its premium packages are very student-friendly. The Classroom Pro package is only $1/student/month. I think coding is fun and Repl.it seems to be highly useful in making coding accessible.

I am not an investor in the tool or one of its employees. Just a fan. I am glad that the startup recently raised some funding from the VCs.

Some basic SQL & Plotly in Python

In this post, I’ll document how to use SQL and plotly to create a basic bar chart in Python, specifically in Jupyter Notebook. I’ll try to be as detailed and visual as possible.

The dataset I am going to use is Nike Manufacturing Map:

The first step is to click download the dataset in Excel. Once the file is downloaded, open the file and remove the first row. The first row just has the name of the file, not the columns’ names we need. Since I haven’t figured out how to remove the first row, the fast way is to do it before starting the code to make our life easier. Click save and the data is ready to go

Open Jupyter Notebook. In my case, I use Anaconda. The first thing to do on a new Jupyter Notebook is to import necessary packages. The “as ABC” is to create an alias for packages with long names so that we won’t have a hard time calling those packages later in the code. Imagine having to type “plotly.graph_objs” 10 times instead of “go”.

import plotly.plotly as py #this package is for visualization
import plotly.graph_objs as go #this package is for visualization
import pandas as pd #this package is for handling the dataframe
from pandasql import sqldf #This is to allow users to use SQL queries to create a new dataframe
pysqldf = lambda q: sqldf(q, globals())

Packages

Then, load the file. To check if the file is loaded correctly, use df.head(). The command will show a snapshot of the data frame. If you want to see the whole data frame, just use df

df =pd.read_excel(‘/Users/camapcon/Documents/Github/Nike_Factory_Locations/export.xls’) #read the file in
df.head()

Read the file in

We need to change the names of the two columns highlighted in the screenshot. The way that they are named will make it tricky to process SQL queries. I tried it. It’s better to have more straightforward column names with no blank space in between. It’s pretty easy:

df = df.rename(columns={‘Nike, Inc. Brand(s)’: ‘Brands’, ‘% Female Workers’:’FemaleWorkers’, ‘Total Workers’:’TotalWorkers’})
df.head()

Column name change

The next step is to use SQL to create a summary table whose data will be used to draw bar charts. What we will analyze includes:

  • The total number of workers by brands
  • The number of factories by brands
  • Average number of workers at each factory by brands
  • Average percentage of female workers at each factory by brands

The code to use SQL to create a subset is below:

Primary = “””SELECT Brands, Sum(TotalWorkers) as TotalWorkers, Count(Brands) as Count, AVG(TotalWorkers) as AvgTotalWorkers, AVG(FemaleWorkers) as FemaleWorkers From df Group By Brands””” #create a data frame using a SQL
Primary_df = pysqldf(Primary)
Primary_df

Here is the result:

SQL 1

Notice that the figures aren’t pretty, right? Let’s round them up and make them look prettier

Second = “””SELECT Brands, TotalWorkers, Count, Round(AvgTotalWorkers, 0) as AvgTotalWorkers, Round(FemaleWorkers,0) as FemaleWorkers From Primary_df”””
Primary_df = pysqldf(Second)
Primary_df

Here is how it looks:

SQL 2

It’s time to create the bar charts:

trace1 = go.Bar( #create x and y axes
x=Primary_df[‘Brands’], #to use column Brands as the X axis
y=Primary_df[‘TotalWorkers’], #to use column TotalWorkers as the Y axis
name=’Total Global Workers by Nike Brands’
)
data1 = [trace1]
layout1 = go.Layout( #starting to plot a grouped bar chart
title=’Total Global Workers by Nike Brands’,
barmode=’group’
)

fig = go.Figure(data=data1, layout=layout1)
py.iplot(fig, filename=’grouped-bar’)

Here is how it looks

newplot

You can change the Y axis to another column as you wish. Here is an example:

trace2 = go.Bar( #Project Count by Mission Area
x=Primary_df[‘Brands’],
y=Primary_df[‘FemaleWorkers’],
name=’Average Percentage of Female Workers by Nike Brands’
)
data2 = [trace2]
layout2 = go.Layout( #starting to plot a grouped bar chart
title=’Average Percentage of Female Workers by Nike Brands’,
barmode=’group’
)

fig = go.Figure(data=data2, layout=layout2)
py.iplot(fig, filename=’grouped-bar’)

Try to label different charts differently to avoid confusion and errors. It would make debugging easier as well.

newplot-2

That’s all I have for this post. Just some basic SQL queries and Python code to handle and visualize data with Plotly and Pandas. I still need to practice and explore more. And I urge you to do the same, if you are as inexperienced and interested in data analysis like I am.

 

Exciting updates to Microsoft Excel

Almost every office job involves using Microsoft Excel. It’s useful. It’s versatile. Yet it can be frustrating at times. We use it to get things done, but I doubt many of us would claim to love it. That’s why I am excited about the changes Microsoft announced that it would bring to the iconic tool in the near future. Disclaimer: I own some Microsoft stocks, but this post stems from my genuine excitement as a long-time perennial Excel user who, like most, suffers the pain of some mundane tasks for years.

Click on the headlines to see more details and demos from Microsoft

Stock quotes and geographic data

Input the names of stocks or companies that you want to analyze and Excel will provide built-in information & data related to the companies such as number of employees, shares outstanding, P/E…No more going to other websites and painstakingly gather such information.

If you are interested in geographic data, Excel will enable the same capability as it will for stock quotes. Type the list of countries’ names and related information such as population. gas price will be provided.

Data entry from a screenshot

Good news for Android device owners (not so much for iOS users). Soon, Android phone users will be able to take a photo of a data table and quickly have it converted into Excel table. How much time would have been saved if this feature had been here for the past 5-10 years? When will iOS folks have it Microsoft????

Ideas 

Prepare a clean data table and Excel will do the preliminary analysis for you. Charts will be drawn. Outliers will be identified. Summary will be offered. No need to waste more time clicking around.

I really look forward to these updates. Life would be much easier to have some mundane tasks automated. This is what computers and machine learning are great at and should be used for.

 

Gmail new look and ZenHub add-on

Gmail new look

I have been using the new UI of Gmail for around one or two months. While I am not a professional user, here is what I think about the new look.

So far, the look and feel is more sleek and modern than its previous predecessor. In the past, the Calendar & Task were hidden under the Compose button. Now, they are more visible by being on the right-hand column of the screen. If you use Calendar & Task frequently, it is a nice improvement to have.

The new Gmail offers recommended responses, depending on the content of the received message. Below is an example. A schoolmate of mine thanked me for helping me with a matter. Gmail offered three suggested responses and all I have to do is to click on one of them. Perhaps, it’s interesting, but to some extent, I don’t feel too comfortable when Google outright shows that our email is read. Nonetheless, if I keep using the service knowing that my emails are read anyway, the new feature may come in handy as some point, especially when I am on the go.

Gmail_1

Another feature I noticed was reminders. I received an email from a friend 5 days ago. Detecting that I haven’t replied for 5 days, Gmail has a subtle reminder as you can see below. I don’t have much traffic to my mailbox, but if you are a busy person with a lot of email exchange, this may be useful.

Gmail_2

So far, I have been pleased with the new Gmail experience. I wasn’t a big fan of Google products’ UX and UI in the past, but this time I have to say that they did the right thing here.

ZenHub

I have been in a couple of software development courses at school. Trello was our go-to Kanban tool to manage stories and tasks. While the tool does its job, I was suggested to use another tool called ZenHub.

ZenHub is a free add-on on Chrome browser. It’s integrated into your Github account. If your team shares a private GitHub repository, ZenHub can be integrated into that repository and your team can manage epics & stories without changing browser tabs.

ZenHub_1

As you can see on the screenshot, ZenHub offers many more features than Trello. The default set-up includes more than three columns that are offered by Trello. The tool also comes with Reports function as can be seen on the screenshot. The Reports function imports information you put in each epic/story and helps create burndown chart with an extra manual step on Excel.

ZenHub_2

Of course, more features in a new tool require some getting-used-to. Nonetheless, I think it’s a convenient software. Shout-out to the ZenHub team and I look forward to using it more often in the future.