Sunday, December 25, 2016

Nairaland Christmas Birthday Analyzed and Visualized in Python

Members of forum that celebrates their birthday on Christmas dayHappy Birthday Christmas to this Nairaland forum members

Which member of forum is celebrating his/her birthdays today? Let's derive some insights from the Birthday dataset.

Friday, December 23, 2016

6 Python web scraping libraries you can't afford to ignore

Hello there,
In this post I will share with you some excellent Python Web Scraping Libraries. For the benefit of the reader who doesn't know what web scrapping is, here is quick introduction.

Web Scraping: is a technique employed to extract large amounts of data from websites whereby the data is extracted and saved to a local file in your computer or to a database in table (spreadsheet) format (source, Web Scraping is also called Screen Scraping, Web Data Extraction, Web Harvesting etc.

Different programming languages have different techniques for doing web data scrapping. Here I will present to you some web data scrapping tools as used in the Python programming languages.

Wednesday, December 21, 2016

Copying tabular data to Excel/CSV file in Python

I know there are several ways of doing this task. But if you have very large number of tables to be copied into several spreadsheets, then the best approach is to automate the process using a scripting language like python.

One of the best python modules for doing this is called: pandas (an easy-to-use data structures and data analysis tools for the Python programming language)

If you don't already have pandas install, run "pip install pandas" from your command window.

Copying tabular data from PDF, HTML, Words etc to Excel/CSV spreadsheet file

With few lines of python pandas script, you can get this done. Then if you have multiple tables to copy into spreadsheets, you can use loop statement to go over all the tables.

I will give a very simple example here. Lets assume you have web page that contains a table and you want to save that table in an excel/csv file, here is how to go about doing it with python pandas module.

Tuesday, December 13, 2016

QGIS - Labeling a shapefile layer using two or more attributes information

Hello there,
There may be a situation whereby you want to display more than one attribute information or label of the shapefile map canvas you are working on. If this sounds like you, then you are reading the right tutorial.

In this post, I will discussed how to: Label a shapefile layer using two or more attributes information in QGIS.

Labeling a Shapefile Layer Using Multiple Attributes Information

Now, I assumed you already now how to label your shapefile map canvas by using a single attribute's information. This is fairly simple and it is what you will be taught in your first GIS training class.
What you probally don't know is that you can make use of more than on attribute information to label your map features in QGIS. This is made possible by the use of "QGIS label expression" command.
That is what QGIS expression in the label expression is used for.

The shapefile am going to use for this demonstration as seen above, has five (5) columns/fields of attributes which are: FID, State_Name, Area, Capital and Population. Now, lets label the map with as single attribute field then with multiple attribute fields.