Friday, April 6, 2012

Using Google Fusion Tables: Hands on Example

1.Get your data
Fusion Tables can import a file of up to 100 MB of these file types:
●    Spreadsheets (.xls, .xslx, .ods)
●    comma-separated text (.csv)
●    other text-delimited files (.tsv, etc)
●    KML (.kml).
●    Google Spreadsheets

For this tutorial we will use an excel file which is available at the link:  http://bit.ly/Hnayz2
The excel file consists of twitter details of the  followers of Sony India ( @sony_india ) and followers of LG India ( @ lgindiatweets ). Sony India data is identified by a value 1 in company column and LG India is identified by value 2.
The twitter data has been downloaded from http://www.twittersave.tk where we have implemented a php script to download the data.
You can use any other data.


2.Log in to Google Fusion Tables
Go to http://www.google.com/fusiontables and Click on “SEE MY TABLES” button on the right.

3.Sign in / Sign up using your google account.Then click on “Create”, then “Table(beta)”.


4.Now there are three option:
  • From this computer
  • Google Spreadsheet
  • Create Empty Table


5.So select the first option “From This Computer” to upload a file from your computer and click on “Next”.
Now specify the columns to import and click “Next”. For this tutorial we have selected all the columns.

Give other details about your data if you want to and click “Finish”.
 
6.Now you will see the data in Table format. Notice that the location column has been highlighted, which means that Fusion Tables has identified the location data in your table. If your data does not have a column highlighted in yellow, that means that the Fusion Tables wasn't able to automatically pick a column that specified a location. 
To do this, click the “Edit” menu, then select “Modify Columns”. From here you will click on the column that holds your location data. After clicking, on the right you will see a drop down list labeled Type. Select Location from the drop down list, then click Save in the bottom left of this screen. After this, your column should be highlighted yellow.



7.Now the data can be visualized. Go to Menu there are options for File, View, Edit, Visualize, Merge, Experiment. Click "Visualize" and then select "Map". Your address data is now automatically translated into a map location(geocoding) and a map marker is placed on a Google Map for each valid location.

Note: Geocoding may take some minutes to complete in case of larger data. So the data which we are using already consists of the latitude and longitude information in the table which has been obtained using the following excel tool which uses yahoo geocodes:
http://bit.ly/excelgeo
 


8.The resulting map can be seen at:
http://bit.ly/HnQVHF

9.Before we end, one last thing, since we have data of two different companies it is  possible to represent the data on the map in a manner that followers of the two companies can be differentiated.



Styling
  • Click on Configure styles
  • Select Marker icon under Points in the left column.
  • Select the Buckets tab.
  • Select the radio button next to Divide into.
  • In the drop-down menu next to Divide into , select 2.
  • In the drop-down menu next to Column , select company.
  • In the text box next to Lines, enter the number 1 in first and 2 in the one below it. Select the colors red and yellow corresponding to 1 and 2.
  • Click the Save button.



10.The output can be seen at:
http://bit.ly/mapfusion

The map shows the relative distribution of the followers of the two companies which can help determine the popularity of the two brands as per geography.


No comments:

Post a Comment