Thursday 21 April 2016

Water Water Everywhere and Not a Drop to Drink -Making Use of Social Media Data (Part 2)

The reason I chose this title "Water Water Everywhere and Not a Drop to Drink", and I should have explained this in the first post is to stress the that we have large amounts of useful data in social media and yet it's being under utilized. On my last post on this series I promised that I will use data mined from Twitter to get a fact based insight on any topic being discussed on the micro-blogging platform.

I will guide you on how to build a word cloud from text data mined on Twitter using R . Do not worry this post is not about R and for those who are scared of programming I am working on a shiny app that will help you generate word cloud from Twitter and giving you the option to download it.
Visit this link to see the prototype https://gabrielmutua.shinyapps.io/word_cloud/ still under development.

The first step is to go to visit https://apps.twitter.com/ and create a new app. Note that you must have a Twitter account to create a Twitter App. After creating  the app successfully you will be directed to this page.

Rpraticemutua is the name of the App I have created

Secondly , assuming already you have the recent version of R . Make sure you load(or install) the following packages in R.


 
The go to back to you Twitter app and go Key and Access tokens. This Access Tokens will authorize R to be connected to Twitter API.

We will need this two keys

Never share this details to the public it can be used to hack into your Twitter Account. With this details for example I can update your twitter status. We will also require the following access tokens.

We will also require the following access tokens

From R we can use this code to connect it with Twitter. Note that we have searched 100 tweets on the trending topic #HappyBirthdayYourMajesty which a written in English.

We will later clean the data and plot a word cloud on the next post. Note you can view the obtained tweets by viewing the object my_tweets.

Schooling Without Learning


There are several principles on which human life flourishes and most of them are contradicted by the culture of education we have in place. The first is human beings are naturally different and diverse. Our education system is not based on diversity but conformity. 
Under 8-4-4 we were (and students are still enduring the same system) forced to prosper along very narrow selected spectrum of subjects with strong emphasis on Math and Sciences. The effect is that we are producing graduates who are not creative at all. Student who cannot think beyond the notes they have crammed for their various National exams which have already lost their credibility. Poor souls from campus thanks to mwakenya and other dubious methods who are technically geniuses according to their certificates but cannot fit in the competitive job market.
 I can’t argue against science and mathematics they are necessary but not sufficient. A real education has to give equal weight to the arts, the humanities and physical education. Arts and humanities are not important because they improve science and mathematics scores but because they speak to parts of our hearts which are otherwise untouched.
Having been in the job market to a close to one year I have learned that art based careers are equally paying on average like science and mathematics careers. In terms of job availability both fields are the same it depends on how you market yourself and your willingness to create jobs rather than seeking a job.
We are living in a good times, and we should take advantages of information technology to make arts desirable again to our young generation. If you ask me designing/building a website, creating computer based designs, 3D- Printing, music production, animation, marketing on social media all of these fields are art based and the list is endless. People have already build successful careers on these fields.

 Another principle on which human life flourishes is curiosity. If we can light a spark of curiosity in minds of our children (pupils and students), they will enjoy learning and little effort will be used and frequently they will initiate the learning on their own. It’s a real achievement to put that particular ability out or to stifle it. 

This will lead me to emphasize the value of teachers. There is no education system in the world or any school in Kenya that is better than its teachers/lecturers. Teachers/Lectures are the lifeblood of the success of schools and colleges. But teaching is a creative profession, teaching properly conceived is not a delivery system. Teachers/Lectures are not there to pass on received information, good teachers do that but what great teachers also do is mentor, stimulate, provoke and engage. 
Education is about learning and if there is no learning going on there is no education. People spend a lot of time discussing education without ever discussing learning. The whole point of education is to get people to learn. Learning cannot take place if we don't empower our teachers and government should take note of that.

Part of the problem of 8-4-4 is that it focuses not on teaching and learning but testing. Testing is important. Standardized tests have a place but they should not be the dominant culture of education. They should be diagnostic. They should help.  We have witnessed during the recent past the rampant cheating on our national exams and this is because we have solely allowed national exams to decide who is smart or not which is wrong. National exams/ Standardized tests should support learning not obstruct it like they frequently do. 
 
Instead of curiosity what we have now is a culture of compliance. You are supposed to get certain marks or grades to be considered a good student/pupil. Rather than exciting the power of imagination and curiosity in our students we are forcing them to comply to fixed standards which doesn't work well.
Other principle is that human life is inherently creative, we create our lives and we can recreate them as we go through them. It’s the common currency of being human being. It’s why human culture is so interesting, diverse and dynamic. We all create our own lives through this restless processes of imagining alternatives and possibilities. One role of education is to awaken and develop these powers of creativity. Instead, our current system focuses on standardization. We should recognize its students/pupil who learning and education system has to engage them, their curiosity , their individuality , and their creativity . That’s how we can  get them to learn. 

Wednesday 20 April 2016

Water Water Everywhere and Not a Drop to Drink -Making Use of Social Media Data (Part 1)



The ancient Greek philosophers Plato and Aristotle may seem like the quintessential Dead White Males, but in fact they’re very much alive. Twenty four centuries ago they laid the foundations of Western culture, and their ideas and insights still dictate essential features of our world right now, from what we eat to what we see on the internet.


Forget right brain/ left brain, neuroscientist debunked that theory years ago. And even forget men from mars and women from Venus. The real split that shapes our lives, our relationship and our culture is between our inner Plato and inner Aristotle.


Plato was a typical playboy from a wealthy, connected Athenian family until he met a man named Socrates, who taught him that the surest path to wisdom was rational contemplation, and that being a “lover of wisdom” or philosopher was the highest form of life.


Plato taught his students that all of us want to be part of something higher, a transcendent reality of which the world we see is only a small part, and which unites everything into a single harmonious whole. All of us, he said want to crawl out of the cave of darkness and ignorance, and walk in the light of truth.“There is no other road to happiness,” Plato concluded, “either for society or the individual” 
 
Plato’s most brilliant pupil, however arrived at a very different view. Growing up in a family of Greek physicians, Aristotle learned early on the value of observation and hands-on experience. We don’t live in a cave, was his reply to Plato; we live in the real world. “Facts are the starting point” of all knowledge, Aristotle wrote. So instead of accepting his teacher’s belief in pure contemplation, Aristotle said our path to knowledge comes through logical, methodical discovery of the world around us-and facts that make it up.


Aristotle asks: “How does it work?” Plato asks: “Why does it exist at all?”


Plato asks, “What do you want your world to be?” Aristotle asks, “How do you fit into the world that already exists?”


Plato asks, “What’s your dream? “ Aristotle replies, “Wake up and smell the coffee”.


Two different world-views: one great debate. Personally I think like Aristotle and I will pose similar questions in respect to Social Media. “Why does Social media exist?” and “How does your brand fit in the Social media world?” 


Well, this article is about Social media and how we can get meaningful data from Social Media (Twitter and Facebook) and use it to understand better our targets. (Customers and public opinion on brands for Marketers and Voters/Public opinion for politicians).

When I started mining data from Facebook using R I was doing it for fun. I was amazed by the ability to connect R with Facebook API and the potential held by the data I could retrieve. As a novice in Social media analysis I created some simple apps using Shiny (A package in R to build web based apps) which were fun to play with. 

I will share with you one app, I call it "The Facebook App" . It connects R with Facebook , R sends a request to Facebook API to get the list of pages the user has liked (The APP user). The Facebook API responds by allowing R to get the requested data in form of a Data frame. R writes the data frame into a .csv (comma separated format) file which you can download and view the list of pages you have liked.  You can follow this link to try the app https://gabrielmutua.shinyapps.io/facebook-App/ 

Later on I worked on project were I mined text Data on Twitter and performed Sentiment Analysis on it. It was interesting project and I learned a lot. I will share more on my past projects another day. I want to focus(on next series of blogs) on importance of social media data in understanding the target group/market.

In today’s world of social media and the wide variety of social media channels available, there is a huge amount of data available. The challenge comes in accessing that data and transforming it into something that is usable and actionable.

There are three major approaches to looking at social media: channel reporting tools, overview score- carding systems and predictive analytic techniques (primarily text mining). Each has its useful aspects, but each also has limitations.
  
In the next post I will discuss a fourth approach using a predictive analytic platform that includes not only text mining, but network analysis as well as other predictive techniques such as clustering to overcome not only the limitations of the previous techniques, but generate new fact based insight as well. I will use data mined from Twitter so be ready to learn something new.