Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You will be writing at least five queries in MongoDB as social media analytics on the Twitter data. The first four queries are guided below

  1. You will be writing at least five queries in MongoDB as social media analytics on the Twitter data. The first four queries are guided below and the fifth query can be any query you choose. The video will show examples on how to write these queries. In order to speed up querying, we will create an index on every key in the twitter_feed collection. Use the command (note the $** simply means create an index on all fields and subfields in a document).

db.twitter_feed.createIndex({"$**": "text"})

Query 1: You are interested in the top 10 most active Twitter accounts by tweet_count. The example uses national parks; however, you may be using a different example. This query, you will need to do an aggregate with the following stages: group, sort, limit use the TwitterHandle as the _id when you are grouping.

Query 2: Let's delve into the users. The user object contains quite a bit of information about the user who wrote the tweets. We would like to see tweets from people with a high follower count. For example, are there any users with followers over 10000?

Query 3: How often are the tweets in your database retweeted? Let's use the .count to find the number of tweets greater than or equal to 1.

Query 4: Let's analyze the text of the tweet. Depending on your example Twitter feed, there are a variety of keywords you may want to search for. If you are looking at sports Twitter feeds, you may want to look at injury reports or trading. If you are looking at government, you may want to review legislation. For museums, you may be concerned about open admission. For this example we will search for texts containing the word picture.

Query 5: Develop your own query.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Business and Administrative Communication

Authors: Kitty o. locker, Donna s. kienzler

10th edition

77830105, 978-0077830106, 978-0073403182

More Books

Students also viewed these Databases questions

Question

Be prepared to discuss your career plans.

Answered: 1 week ago

Question

How can you get better feedback on your writing?

Answered: 1 week ago