Sunday, 31 August 2014

Simple visualization using (python and R )_part 1/2

Today I am going to make a simple graph with a data we generated through last post.
We had a data set which has a 4 data columns. I would like to just visualize each individual age using python and R.

We will compare two different visualization methods at the end of this post.

Let's look at the python case first.
In order to visualize the data, I am going to use a matplotlib library which is so popular. Please check the http://matplotlib.org/ for detail information. You can review the sample code and detail instruction.

This time I am going to just modify the code I made in previous post.
Of course matplotlib library is imported at the beginning section and some codes are added for displaying the graph.
As I said, my interest is the player's age. As you can see the source code, the individual's age is stored into the list.   


Wednesday, 27 August 2014

Data Handling (4/4) Web Data handling using Python library

Today  I am going to introduce another way to get a web data using python library.

I think it's much easier than previous one.
Python provides a useful library called "urllib". It can make you get a html tag without downloading or copying.

In order to use this library you have to import it at the first section of your python program.


I am going to do the same thing we did on previous posts.
Only you have to do is use this library and open method to get a html source. The rest of python source code is quite similar to previous one.