KDnuggets Home » News » 2017 » Jun » Tutorials, Overviews » 6 Interesting Things You Can Do with Python on Facebook Data ( 17:n22 )

Gold Blog, May 20176 Interesting Things You Can Do with Python on Facebook Data


Facebook has a huge amount of data that is available for you to explore, you can do many things with this data. I will be sharing my experience with you on how you can use the Facebook Graph API for analysis with Python.



By Nour Galaby, Data Enthusiast.

In this article, I will be sharing my experience with you on how you can use the Facebook Graph API for analysis with Python and pandas.

Facebook data analysis

Facebook has a huge amount of data that is available for you to explore, you can do many things with this data like: Analyse Facebook pages or Facebook groups, use this data for Social Network Analysis (SNA), doing data analysis for digital marketing, or even gathering and saving data for your own personal projects. There are so many ways you can use this data; it's up to you.

In this videos I will show you examples of how you can do the basic stuff such as:  

  • Downloading data from Facebook
  • Converting from json to a more convenient data structure so we are able to work with it
  • Dealing with the date variable and other data in the Graph API

Lesson-01: Introduction & Understanding Graph API - Facebook Data Analysis with Python

In this video I will introduce you to the GRAPH API, I will use the GRAPH API Explorer and show you some example requests.

Lesson-02: Download & Save Facebook data - Facebook Data Analysis with Python

In this video I will show you how to download and save all data from Facebook page or a Facebook group keeping in mind certain points

Lesson-03: Setting up & Cleaning the data - Facebook Data Analysis by Python

In Lesson three I will use notebooks to clean and audit the data I got from Facebook and make it ready for analysis

Lesson-04: Most Commented on Posts - Facebook Data Analysis by Python

In lesson 4 I will show you a simple way to get the most commented on posts

Lesson-05: Most Liked Posts and BONUS  - Facebook Data Analysis by Python

In lesson 05 something interesting happened as I found some deleted posts that I got access to some info of it using the API

Lesson-06: Counting Words - Facebook Data Analysis by Python

In this video I will show you how to words frequency for all posts in a group or a page.
You can also use the same function on the comments

Lesson-07: Grouping posts by keywords - Facebook Data Analysis by Python

In this video I will group posts that have the keyword "free" in the steam page and count how many have this keyword VS how many of them does not.

Grouping by is very useful and you we will use it more often with more variables in future videos

Lesson-08:  Grouping by Dates  - Facebook Data Analysis by Python

In this video we will explore the “Created Time” variable to group posts by year, month, or day of the week.

This can be used to find posting patterns and more.

Do you have questions or suggestion? Feel free to contact me.

Bio: Nour Galaby is a Data Science Enthusiast that is passionate about Data Science and Machine learning.

Related: