How to become a consultant in SEO for the first time

[Cross post from Quora]

I’d make sure you know what you are getting into. SEO is complicated and multifaceted. You need to be qualified to work for clients. I’d start with the following guidelines and afterwards, search for other free guides and tutorials and consume them all: The Beginner’s Guide to Search Engine Optimization from Moz

The next step is to gather all the tools you’ll need to be successful. Check this out: World’s Best SEO Tools and Free Search Software

As far as salary goes, it has a large range, mostly based on your experience. If you have no experience, but know enough and have the tools, I’d suggest getting some SEO projects done so that you build your experience and confidence. Check out Upwork, the world’s largest online workplace for freelance gigs.



Black Hat SEO is a bomb waiting to explode

Quora question: Can an on-page SEO and off page SEO with backlinks and social signals alone be enough to skyrocket your site or do you also need a marketing campaign as well?

It sounds sketchy. Backlinks and social signals ONLY sounds a black hat SEO strategy. I’d suggest you never do this for a client. The risks are stratospherically too high. Buying cheap backlinks and social signals is easy on sites like BHW and Fiver. I would never do that for clients. In the new world of SEO, content rules as do REAL backlinks and social signals. The search engines have won. Get over it. Else you may build up a site for a few months and then Google Seach’s AI catches up with you and that site drops like a ballistic missile. Don’t chance it.

State data within a Python Class definition

From my procedural language days, state data was easier for me to understand than in some OOP languages. It took me a while, for instance, but I finally got the syntax correct below for creating a local state variable within a Python class here: [the solution was to create the var “self.count” with the _init_ method below… not as ‘count’ but as ‘self.count’ and referenced as such elsewhere]

class Classy(object):

# PAB: note that I added self.count and referenced it elsewhere in the class methods.

def __init__(self):

     self.count = 0



def addItem(self, item):

# Python's version of a CASE statement:

    if item == "tophat":

        self.count += 2

    elif item == "bowtie":

        self.count += 4

    elif item == "monocle":

        self.count += 5



def getClassiness(self):

    return (self.count)

# You’ll get the following error if you don’t add (self) to all of your Class def methods:

" ... takes no arguments (1 given)"


Combinatorics problem

  1. You are given a ten piece box of chocolate truffles. You know based on the label that six of the pieces have an orange cream filling and four of the pieces have a coconut filling. If you were to eat four pieces in a row, what is the probability that the first two pieces you eat have an orange cream filling and the last two have a coconut filling?

(given, O = orange, C = coconut) :


= P(1st is orange) * P(2nd is orange) * P(3rd is coconut) * P (4th is coconut)

= 6/10 * 5/9 * 4/8 * 3/7

= .6 * .556 * .5 * .429

= .0716

Follow-up question: If you were given an identical box of chocolates and again eat four pieces in a row, what is the probability that exactly two contain coconut filling?

  • Step 1 involves a combinatorics problem of 4 choose 2 to determine how many combinations of oranges and coconuts we can obtain given 4 pulls from the box :

= 4C2

= 4!/ (2! * (4-2)!)

= 24 / (2 * 2)

= 6

This is equivalent to the following six combinations:


  • Step 2. In the first question above, we learned that the probability of pulling exactly 2 coconuts in 4 pulls from the box is the same at pulling exactly 2 oranges as well and we can see that the probability is the same for all 6 combinations of Os and Cs.

Therefore, the probability of pulling exactly 2 coconuts

=  4C2 [see step 1 above] * .0716

=  6 * .0716

=  .4296

Are all my Digital Assets Secure when a key person leaves my organization?

If you lost access to your business emails at this moment, what shape would your business be in? In the digital world, email accounts and passwords are now the “keys” to your business kingdom. Share them sparingly and covet them fiercely.

Do not have your team sign up for vital online services using their individual emails. The business manager’s email, say [email protected], may seem adequate and safe, but it is not. Most likely, only Freddie has access to that email and therefore all the business-related digital properties and services are tied to it. Instead, maintain a generic company email account and password for Internet services which can be accessed by several people by using a service such as LastPass.

For company-wide use, create something like [email protected] to access your vital online services such as website hosting and merchant accounts. If Freddie the business manager decides to leave the company, perhaps in a huff, all you have to do is change one password and your business’s online accounts are secure. And please make your passwords non-trivial. Use an app like Norton’s free Password Generator to create tough-to-crack passwords. Don’t worry, LastPass will manage all the wacky passwords for you.

If your company is large, you can create several categorical email accounts like [email protected],  [email protected], and [email protected] depending on departmental responsibilities. In this scenario, each password should be different across functional areas.

You get the picture. No matter what scheme you come up with to keep your digital business organized, make sure your emails and passwords are current, secure, and backed up, else you may face days of unnecessary fear and dread when Freddie the business manager decides to quit his job to work for the competition or join a rock band.

As a modern-day King Richard might cry at such a predicament, “My Kingdom for all my business-related email passwords!”

Fare thee well.

U.S. Healthcare Associated Infections ( HAIs ) using CDC public data

I just finished my @CDCgov data story about Healthcare Associated Infections ( #HAIs ) using D3. These infections are particularly nasty as they are antibiotic-resistant. I’ve created an interactive map of the U.S. with the total number of infections per state and the rate of infection per 1000 people for the latest available year, 2014. If CDC funding continues to be cut, it is unknown when the next HAI updates will be made.

Check it out here:

Image: CDC

Excel and .csv lesson learned… Includes painful waste of time, unfortunately.

I found out that when you export data in .csv format from #Excel make sure you don’t have a trailing space after any column names. They are exported as “col_name ” with the space AND quotes. Beware when using them to index your array! They will fail. Simply delete any hidden spaces in your column names before exporting. Please. For your own sanity. #DataAnalytics #ERROR #painful lesson.

Peter Bakke DOH!

Debugging Javascript – one useful tool

Here’s an idea for displaying those pesky ephemeral variables that come and go like ghosts in JavaScript. Check this out. I
want to know if I’m reading in a CSV file properly or not. You can use for any variable / array / object.


// Read in a .csv file
d3.csv(“../datafile.csv”, function(someData) {


function debugMe(whateverData) {

// ‘Sum Ages’ is a variable in row zero of passed var ‘whateverData’
document.getElementById(“debug”).innerHTML = “Debug: ” + whateverData[0][‘Sum Ages’].toString()


<p id=”debug”></p>

Python Immutable strings, integers, booleans

In Python, STRINGS, INTS, BOOLs etc. are IMMUTABLE… meaning, for example, that you cannot convert a df column that is a string to a column that is int.  However,  you can ASSIGN the values (objects) to another variable or create a new instance of that column in another dataframe   … or use .astype(int) to perform an intermediate computation.