Data Analysis

Unable to install packages in R

Posted on

Running Rstudio on Windows for more than a day or so without shutting down? Are you now getting errors installing packages? I suggest Windows has “lost” its mind. Save and Restart #rstudio & #windows. Likely your problems will go away.  #DataAnalytics #DataAnalyst #Statistics

Searches related to this R (RStudio) package installation problem that might provide solutions as well:


Once upon a time, I may have been a pig farmer. And there is nothing wrong with that.

Posted on

You know, whenever you hear about someone claiming that they are reincarnated from a previous life, the following seems to be true: they once were a prince, princess, queen or king. Or maybe a duke, duchess, earl, shaman. Whatever.

I am proud to announce right here and now that I, if I am indeed reincarnated, was probably a pig farmer in a previous life somewhere in medieval Germany.

Hey, bacon had to come from somewhere.

Now top that, you grandees.

Data Analysis

Are You Having Trouble Plotting a Time Series in R? Here’s one solution.

Posted on

Context: I was using data, so the data is presented in csv format.
The data consists of various country-related data with rows as country names and columns as years.

Step 1. Read into a data.frame the local .csv file that you downloaded from the Gapminder website.

Note that “row.names = 1” saves each of the 175 or so country names in the rows. Columns will be years.

df <- read.csv(‘’, header = T, row.names = 1, check.names = F)

Step 2. Transform the data.frame. 

Years are now rows instead of columns. Country names are now cols.

df_t <- t(df)

Step 3. Add a “Year” column created from the row.names. For me, this was the missing link for
successfully plotting the data, else I was floundering.

Reason for this: We need this col to be numeric variables in order to plot
…which are the years in the time series

df_t$Year <- row.names(df_t)

Step 4. That’s it! Now you can plot. It’s that simple.

For example:

ggplot(df_t, aes(Year, group = 1)) +
geom_line(aes(y = Albania, color=“Albania”)) +
geom_point(aes(y = India, color=“India”))


Peter Bakke - Data Analyst plotting time series


Penalized for writing about a technical suggestion for SEM users of Google?

Posted on

Geesh! I wrote a blog post last week about what I thought was a rather clever article about what I presumed might be “Preferred” Google abbreviations in NAPS (Name, Address, Phone) usage across the Web. In fact, I’m taking a very difficult Data Analysis (DA) nanodegree with Udacity and in my Data Wrangling project I strongly suggest in it that we Data Analysts should use consistent abbreviations when doing Search Engine Marketing, etc. and data cleanup. One of our tasks is to clean up street names in a large dataset taken from Open Street Mapping (OSM). Thus, the abbreviation idea for street name cleanup. My point: Standard abbreviations will actually reduce computing time across the planet. Haha. Maybe.

Well, my site that contained the aforementioned blog got hammered. It tumbled from page 1 SERP to Page 6 SERP with no end in sight when searching for “Peter Bakke,” c’est moi. Perhaps the word “Google” appeared too many times in my post and Google penalized me for keyword stuffing. Or perhaps Google thinks people writing about Google are pandering. Dunno.

In any case, I’m also learning about machine learning [ML aka AI] in my nanodegree and the Google automagic search result demotion is certainly an example of ML, good or bad. C’est la vie.



Preferred Google Street Mapping Abbreviations

Posted on

So, if you are a search engine company, say, Google, and you have data centers all across the planet and a significant amount of the work that those data centers do is to parse text (and I mean LOTS of text) every microsecond of every day, then you could see why search engines might want to have standardized abbreviations so that text can be processed in a uniform and efficient way. Thus, I suggest the idea of preferred Google street mapping abbreviations (see example table of abbreviations at bottom of this post).

Google Data Center / Google
                                                   Google Data Center / Google

After all, using standard abbreviations means that search engines need to process fewer characters which means less processing time and less processing time means fewer resources used with less cost. Catch the drift here? It may not seem like much to mere humans to save a few characters in a text string containing a long form street name versus a short form street name. However, multiply all that work, as Carl Sagan would say, “by billions and billions,” and then you might just generate some tangible savings.

The new mantra for digital marketers and SEOs is to “make search engines happy,” which really means making the AI search bots ‘happy.’  The simple act of standard abbreviations could help the job of savvy digital marketers.  Afterall, the difference in SERP position A versus position A could be significant. Could one signal for better ranking be a uniformly abbreviated business NAP everwhere in cyberspace? (See “NAP” at bottom of this page.) Who knows? It’s worth a try.

Finally, simply imagine, if you can wrap your mind around it, the teraflops you’ll be personally responsible for saving in a lifetime by abbreviating everything, everywhere, uniformly. Perhaps we digital marketers could single-handedly affect global warming by reducing extra heat entering the atmosphere from data centers that we are saving from executing all those extra teraflops… all of this by merely shortening “Street” to “St” or “улица” to “ул.”

Happy abbreviating, everyone. 🙂

Pete Bakke, PMP, Data Analyst, Digial Marketer

Tucson, AZ.

Google Mapping


Alley : Aly
Apartment : Apt
Arcade : Arc
Avenue : Ave
Basement : Bsmt
Beach : Bch
Bend : Bnd
Bottom : Btm
Boulevard : Blvd
Branch : Br
Building : Bldg
Bypass : Byp
Camp : Cp
Causeway : Cswy
Center : Ctr
Circle : Cir
Court : Ct
Cove : Cv
Creek : Crk
Crossing : Xing
Crossroad : Xrd
Drive: Dr
East : E
Expressway : Expy
Field : Fld
Freeway : Fwy
Front : Frnt
Gateway : Gtwy
Hangar : Hngr
Harbor : Hbr
Haven : Hvn
Heights : Hts
Highway : Hwy
Island : Is
Junction : Jct
Lake : Lk
Lane : Ln
Lobby : Lbby
Meadow : Mdw
Mill : Ml
Mount : Mt
Mountain : Mtn
Northeast : NE
Northwest : NW
North : N
Office : Ofc
Parkway : Pky
Place : Pl
Plain : Pln
Plaza : Plz
Point : Pt
Ranch : Rnch
Rapids : Rpds
Ridge : Rdg
Road : Rd
Room : Rm
Route : Rte
Southeast : SE
Southwest : SW
Skyway : Skwy
South : S
Space : Spc
Spring : Spg
Square : Sq
Station : Sta
Street : St
Suite : Ste
Summit : Smt
Terrace : Ter
Trace : Trce
Trail : Trl
Trailer : Trlr
Turnpike : Tpk
Valley : Vly
View : Vw
Village : Vlg
Wharf : Whf
Well : Wl
West : W

Hats off to : Acceptable Google Maps NAP  [NAP = Name Address Phone, not places you take a nap.]


Favorite quote about the power of children’s imagination – by Arthur Rackam

Posted on

“I can only say that I firmly believe in the greatest stimulating and educative power of imaginative, fantastic, and playful pictures and writings for children in their most impressionable years – a view that most unfortunately, I consider, has its opponents in these matter-of-fact days. Children will make no mistake in the way of confusing the imaginative and symbolic with actual. Nor are they blind to decorative or abstractly designed treatment in art, any more than they are to poetic or rhythmic form in literature. And it must be insisted on that nothing less than the best that can be had, cost what it may (and it hardly can be cheap), is good enough for those early impressionable years when standards are formed for life. Any accepting, or even choosing art or literature of a lower standard as good enough for children is a disastrous and costly mistake. ” – Arthur Rackham

                    Sangreal by Arthur Rackham