0% found this document useful (0 votes)
154 views12 pages

Instagram User Analytics

This project analyzed user data from Instagram including photos, likes, comments and more using SQL queries. The queries provided insights such as the oldest users on Instagram, users who never posted photos, the most popular hashtags, and that Thursdays see the most new user registrations. On average, each user posted 2.57 photos. Some users who liked every photo were identified as potential bots. The winner of a photo contest was also identified based on the photo with the most likes.

Uploaded by

kalakanishk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
154 views12 pages

Instagram User Analytics

This project analyzed user data from Instagram including photos, likes, comments and more using SQL queries. The queries provided insights such as the oldest users on Instagram, users who never posted photos, the most popular hashtags, and that Thursdays see the most new user registrations. On average, each user posted 2.57 photos. Some users who liked every photo were identified as potential bots. The winner of a photo contest was also identified based on the photo with the most likes.

Uploaded by

kalakanishk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 12

Project 2 : Instagram

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.

• After accessing the dataset from the trainity website and


running it on mysql workbench, the Instagram dataset was
ready to be analysed.

• I ran various queries giving me answers to the various


questions involved as part of the project.

• And finally after getting the suitable answers, I have reflected


the result in this PPT with a brief explanation: One question per
slide (with executed queries, its answer and explanation)
Tech Stack Used
Technologies used:
1. Mysql: Mysql was used to run the queries which would give
me answers to the questions asked as part of the project.
2. Mysql workbench: Mysql workbench was used to run the
whole database and execute it to the mysql.
3. PPT: PPT used for making reports about the extracted data
and what I conclude from that data.
Insights
Insights Taken from each Question explained in Brief in the
following slides
A) 1) Your Task: Find the 5 oldest
users of the Instagram from the Answer:
database provided.
+----+------------------+---------------------+
| id | username | created_at |
+----+------------------+---------------------+
Solution:- select * from users | 80 | Darby_Herzog | 2016-05-06 00:14:21 |
-> order by created_at asc limit 5; | 67 | Emilio_Bernier52 | 2016-05-06 13:04:30 |
| 63 | Elenor88 | 2016-05-08 01:30:41 |
| 95 | Nicole71 | 2016-05-09 17:30:22 |
| 38 | Jordyn.Jacobson2 | 2016-05-14 07:56:26 |
Insight: The following 5 users +----+------------------+---------------------+
were the first people to register
on Instagram which makes them
the most loyal customer of
Instagram
A) 2) Your Task: Find the users
who have never posted a single
photo on Instagram.
Answer:
+---------------------+ | Julien_Schmidt |
Solution:- select username | username | | Mike.Auer39 |
-> from users +---------------------+ | Franco_Keebler64 |
-> left join photos | Aniya_Hackett | | Nia_Haag |
-> on users.id = photos.user_id | Kasandra_Homenick | | Hulda.Macejkovic |
| Jaclyn81 |
-> where photos.id is null; | Rocio33 |
| Leslie67 |
| Maxwell.Halvorson | | Janelle.Nikolaus81 |
| Tierra.Trantow | | Darby_Herzog |
Insight: The following users are | Esther.Zulauf61 |
| Pearl7 |
such who have not posted a single | Ollie_Ledner37 | | Bartholome.Bernhard |
photo on Instagram. So, we can | Mckenna17 | | Jessyca_West |
approach these users with | David.Osinski47 | | Esmeralda.Mraz57 |
different filters , campaigns, and | Morgan.Kassulke | | Bethany20 |
notifications and convince them | Linnea59 | +---------------------+
how posting photos makes them | Duane60 |
engage with their family and
friends even more.
A) 3) Your Task: Identify the
winner of the contest and provide
their details to the team.

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 |

Insight: The photo (


https://jarret.name) posted by the
user Zack_kemmer93 has the
most number of likes that is 48
and hence, this user becomes the
winner of the contest.
A) 4) Your Task: Identify and
suggest the top 5 most commonly
used hashtags on the platform.

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.

• I learned how to handle medium sized databases on mysql and


mysql workbench. Learned and played around various new
keywords and functions of Mysql while executing queries.

• This helped me realise how beneficial small chunks of data can


be if one has the knowledge of mysql and has the ability to
extract valuable insights about the product from that dataset.

• Finally, I learned how mysql can be used to create reports


which can be used by the upper management and helps them
make the decision making process faster.

You might also like