![]() Reading the file #I need to convert this into a readable datetime #iterate through timestamps and convert individual rows fb_posts = fb_posts.apply(lambda x: (int(x))) #create month, day, year and time columns fb_posts = fb_.year fb_posts = fb_.month fb_posts = fb_.day fb_posts = fb_.time #making the assumption that if 95% of the rows are NaN values, the column doesn’t contain valuable info for the purposes of our analysis #use dropna and specify threshhold of na values fb_posts = fb_posts.dropna(thresh=len(fb_posts)*0.05, axis=1) #use list(fb_posts) to id the remaining columns fb_posts = fb_posts.drop(fb_posts.iloc], axis=1) I saved the Facebook data on my Google Drive in order to interact with this data on Google Colab I had to use the lab package to mount the GDrive and open the folder and the csv relevant to my analysis. import pandas as pd import datetime import matplotlib.pyplot as plt import numpy as np from lab import drive drive.mount('/content/gdrive') fb_posts = pd.read_csv(‘/***/myposts.csv’) This will serve as a segue into a more detailed analysis about the types of content I have been posting over the last decade, leaving out the obviously cringeworthy posts younger me may have made. The intention of this first analysis was to get an understanding of: i.) how often I have posted on my Facebook account between 20 and breaking these updates according to types of updates i.e posting a status update, a post (this refers to either sharing a picture, news article or resharing a Facebook post with some personal commentary attached to it), sharing something on a friend's timeline, sharing an article and posting a link to an article, ii.) Yearly percentage likelihood to post particular types of updates by year and iii.) my propensity to post by weekday, hour and month measured by the weighted average of posting frequency over the last 10 years. #Xlist facebook seriesThis blog post starts the series of social media analysis blogs off with an analysis of my Facebook updates. I downloaded my Facebook data analysing my online behaviour and updating frequency and general engagement over the last decade. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |