1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Finger [1]
3 years ago
6

Write Python code to save the data to a MongoDB collection:Import json module to parse JSON dataImport MongoClient from pymongo

to use MongoDBCreate a loop to iterate through the variable with data from Twitter, and for each tweet:Parse these related values: id, text, created_at, user’s screen_name, retweet_count, favorite_count, lang.Use MongoDB’s insert method to add the parsed tweet values to MongoDB collection;Write Python code to query the database:Use find method to search for tweets with lang="en";Use the aggregate method with $sum to compute the total retweets;Use the aggregate method with $count and $group to count the number of tweets by each user (screen_name);
Computers and Technology
1 answer:
Zigmanuir [339]3 years ago
8 0

Answer:

Explanation:

The objective of this task is to compute a program that involves the usage of Python code to save the data to MongoDB and to query  the database.

Due to the error that occur which makes me to be unable to submit this answer, I've created a word document instead and the attached file can be found below.

Thanks!

Download docx
You might be interested in
3X5
yan [13]

Answer:

15

Explanation:

cause when you multiply three by five it will give u 15

7 0
2 years ago
_______ allows you to add formatting such as shapes and colors to text. a. worddraw b. wordart c. worddesign d. wordshapes
4vir4ik [10]
Word Design is the answer.
4 0
3 years ago
Read 2 more answers
18. Which type of briefing is delivered to individual resources or crews who are assigned to operational tasks and/or work at or
GrogVix [38]

Answer: Field-level briefing

Explanation: Field-level briefing is the brief description that is provided to the crew members or operation task holders.This briefing contains the information about the work and operation that are to be followed by the workers on the site .

Field level briefing is sort of instructions to individual or group of people who will be working with their assigned duties on the incident site.

8 0
3 years ago
What is the importance of data validation, and how can user data entry errors be reduced or eliminated?
lisabon 2012 [21]

Incorrect data can lead to unexpected program execution results. Data entry errors can be reduced by only accepting valid input, e.g., if a number must be entered, alphabetic characters are ignored. After data validation, error messages can be prompted to the user, requiring him to enter the data again.

5 0
3 years ago
create your own min function that finds the minimum element in a list and use it in a separate function
schepotkina [342]

Answer:

def minfunction(mylist):

   min = mylist[0]

   for i in mylist:

       if i < min:

           min = i

   print("The minimum is: "+str(min))

   

def anotherfunction():

   mylist = []

   n = int(input("Length of list: "))

   for i in range(n):

       listelement = int(input(": "))

       mylist.append(listelement)

   minfunction(mylist)

   

anotherfunction()

Explanation:

This solution is implemented in Python

This defines the min function

def minfunction(mylist):

This initializes the minimum element to the first index element

   min = mylist[0]

This iterates through the list

   for i in mylist:

This checks for the minimum

       if i < min:

... and assigns the minimum to variable min

           min = i

This prints the minimum element

   print("The minimum is: "+str(min))

   

This defines a separate function. This  separate function is used to input items into the list

def anotherfunction():

This defines an empty list

   mylist = []

This prompts user for length of list

   n = int(input("Length of list: "))

The following iteration inputs elements into the list

<em>    for i in range(n):</em>

<em>        listelement = int(input(": "))</em>

<em>        mylist.append(listelement)</em>

This calls the minimum function

   minfunction(mylist)

   

The main starts here and this calls the separate function

anotherfunction()

5 0
3 years ago
Other questions:
  • Universal Containers are using Salesforce for Order Management and has integrated with an in-house ERP system for order fulfilme
    5·1 answer
  • Which of the following is an example of a Boolean operator?
    8·1 answer
  • Write a function called first_last that takes a single parameter, seq, a sequence. first_last should return a tuple of length 2,wh
    14·1 answer
  • 1. Write an expression whose value is the result of converting the str value associated with s to an int value. So if s were ass
    12·1 answer
  • What should you do if you forget your root password for MySQL?
    13·1 answer
  • Someone please help will mark as brainliest
    8·2 answers
  • Which of the following is one of the tools in REPL.it that helps prevent syntax errors?
    10·1 answer
  • For how long should a media piece hold the user's attention?
    13·2 answers
  • A new president has been elected. She promises to lower taxes drastically. What is most LIKELY to happen as a result of this dec
    8·1 answer
  • 10 points + brainliest to first correect answer :) incorrect answers/ answers with no effort will be deleted this is easy im jus
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!