Instagram User Analytics
Instagram User Analytics
User Analytics
This project utilises various SQL queries to analyse the data of
Instagram related to its account handling, photos , user
engagement, likes and comments.
The project provides very good insight into the user engagement
scenario of Instagram and makes it easier to role out new
schemes and makes the decision making process very fast.
Kanishk Kala
[email protected]
+91 8130299492
Approach
• I installed mysql and mysql workbench on my laptop, and
created the initial setup, made a local host and setup my
password.
Solution:- select
username,photos.id,photos.image_url
,count(*) as total from photos inner
join likes on likes.photo_id = photos.id Answer:
inner join users on photos.user_id =
users.id group by photos.id order by | username | id | image_url | total |
total DESC limit 1; +-----------------+-----+------------------------+-------+
| Zack_Kemmer93 | 145 | https://jarret.name | 48 |
Solution:- select
Answer:
tags.tag_name,count(*) as total from
photo_tags join tags on +----------+-------+
| tag_name | total |
photo_tags.tag_id=tags.id group by
+----------+-------+
tags.id order by total DESC limit 5; | smile | 59 |
| beach | 42 |
Insight: The five most used | party | 39 |
| fun | 38 |
hashtags turns out to be #smile,
| concert | 24 |
#beach, #party, #fun, #concert +----------+-------+
because they are the most used
hashtags by the users from #smile
being used 59 times to #concert
being the 5th most widely used
hashtag at 24 times. These
hashtags gives us insight into
which hashtags can be used to
generate maximum traffic in the
future.
A) 5) Your Task: What day of the
week do most users register on?
Provide insights on when to
schedule an ad campaign.
Solution:- select
dayname(created_at) as day,count(*)
as total from users group by day order Answer:
by total DESC limit 1;
| day | total |
+----------+-------+
| Thursday | 16 |
Insight: On running the above
+----------+-------+
query on mysql, we can see that
16 new users have registered on
Thursday which is the highest
among rest of the days. Hence
Thursday would be a great day to
launch a new campaign as
Thursday turns out to be the most
traffic generating day of the week.
B) 1) Your Task: Provide how many
times does average user posts on
Instagram. Also, provide the total
number of photos on Instagram/total
number of users.
Answer:
Solution:- select (select count(*) from
photos)/(select count(*) from users) +--------+
as avg;
| avg |
+--------+
Insight: The following number | 2.5700 |
2.57 denotes that a average user +--------+
has posted 2.57 photos on
Instagram which is very low when
compared to the actual photos
per person posted on Instagram ,
but this is a moderate result
based on the dataset provided.
B) 2) Your Task: Provide data on Answer:
users (bots) who have liked every
single photo on the site (since any
+--------------------+-----------+
normal user would not be able to do
this). | username | num_likes |
+--------------------+-----------+
| Aniya_Hackett | 257 |
Solution:- select username,count(*) | Jaclyn81 | 257 |
as num_likes from users inner join | Rocio33 | 257 |
likes on users.id = likes.user_id group
by likes.user_id having num_likes = | Maxwell.Halvorson | 257 |
(select count(*) from photos) ; | Ollie_Ledner37 | 257 |
| Mckenna17 | 257 |
| Duane60 | 257 |
Insight: The following 13 users are | Julien_Schmidt | 257 |
such who have liked every single
photo on Instagram dataset as | Mike.Auer39 | 257 |
they have liked all the 257 photos | Nia_Haag | 257 |
on the dataset which is highly | Leslie67 | 257 |
unlikely for a normal person to | Janelle.Nikolaus81 | 257 |
do. Hence I can infer from this | Bethany20 | 257 |
that these 13 users are bots
+--------------------+-----------+
Result
• First of all, I would like to mention that this was my first full-
fledged project. SO this was definitely a very engaging
experience for me.