Extract the data and transform the data

Assignment Help Python Programming
Reference no: EM132631481

Each text file contains information about the tweets, i.e., "id", "text", and "created_at" attributes. Your task is to extract the data and transform the data into the XML format with the following elements:

1. id: is a 19-digit number.

2. text: is the actual tweet.

3. Created_at: is the date and time that the tweet was created

The XML file must be in the same structure as the sample folder. Please note that, as we are dealing with large datasets, the manual checking of outputs is impossible and output files would be processed and marked automatically therefore, any deviation from the XML structure (i.e. sample.xml) and any deviation from this structure (e.g. wrong key names which can be caused by different spelling, different upper/lower case, etc., wrong hierarchy, not handling the XML special characters,...) will result in receiving zero for the output mark as the marking script would fail to load your file. (hint: run your code on the provided example and make sure that your code results in the exact same output as the sample output. You can also use the "xmltodict" package to make sure that your XML is loadable).

Beside the XML structure, the following constraints must also be satisfied:

1. The "id"s must be unique, so if there are multiple instances of the same tweets, you must only keep one of them in your final XML file.

2. The non-english tweets should be filtered out from the dataset and the final XML should only contain the tweets in English language. For the sake of consistency, you must use the langid package to classify the language of a tweet.

3. The re, os, and the langid packages in Python are the only packages that you are allowed to use for the task 1 of this assessment (e.g., "pandas" is not allowed!). Any other packages that you need to "import" before usage is not allowed.

Attachment:- Data wrangling.rar

Reference no: EM132631481

Questions Cloud

Can you relate to article on self-disclosure in relationship : Can you relate to this article on self-disclosure in relationships? If so, explain what specifically you could relate to and provide examples of your own.
Explain the functions of nonverbal communication : Describe an instance of miscommunication based on nonverbal communication. Connect this experience to one or more functions of nonverbal communication.
Discuss the importance of verbal skills in communication : In Chapter 4 of your text, titled Verbal and Nonverbal Communication: Making Every Word and Gesture Matter, Bevan & Sole (2014) discuss the power of language.
Calculate the coordinates of the radiated points : Calculate the angular misclose and the adjusted bearings of all the traverse lines and radiations and calculate the coordinates of the radiated points
Extract the data and transform the data : Extract the data and transform the data into the XML format - deviation from the XML structure - The "id"s must be unique, so if there are multiple instances
Calculate annual depreciation charge for each of six year : Calculate the annual depreciation charge for each of the six years of the truck's life using the declining-balance method and sum-of-digits method
Describe the talking styles in brief : Read "Shared talking styles herald new and lasting romance". Then, visit the Language Style Matching website and, using sample written communication between.
How do calculate the portfolio beta : Calculate the Portfolio's Beta. Corporation holds a diversified portfolio consisting of $6000 investment in each of 20 different common stocks.
Define self-concept and self-image in brief : Define self-concept, self-image, and self-esteem. Write at least two sentences on each term. Provide an example of how your "self-concept," "self-image,".

Reviews

Write a Review

Python Programming Questions & Answers

  Let ll be a list of integers

Let LL be a list of integers. Use list comprehension to produce teh following lists. Each one should just take onel line. Anser questions as two comments.

  Design a solution to highly-repetitive computational problem

IFB104 Building IT Systems Assignment Part A: Cityscapes. Design a solution to a highly-repetitive computational problem; Produce maintainable, reusable code

  Write a program that prompts the user for the numerator

Write a program that prompts the user for the numerator and denominator of an improper fraction, then displays the equivalent as a mixed number.

  Do a python project and get it running using app engine

Do a python project and get it running using App engine. Something very basic and simple

  Define function which takes a decimal number as an input

HOLMES INSTITUTE - HS1031 Introduction to Programming Assignment - Define a function conversion.py which takes a decimal number as an input

  Write a python program about triangles

Write a PYTHON program about triangles. You need two files, a module file and an executable file with a main method.

  Write a progra m that creates two objects

Write a progra m that creates two objects, object of the ProductionWorker class and an object of ShiftSupervisor r class.

  Gene Expression and DNA Methylation Assignment

Gene Expression and DNA Methylation Assignment Help and Solution - Briefly comment on the similarities and difference between the networks.

  Write a python program that reads the contents of the data

Design an algorithm and use it to write a Python program that reads the contents of the data file into a list. The program should then loop, to allow a user to check various numbers against those stored in the list.

  Calculate the net salary of the employee

Calculate the net salary of the employee. To calculate the net salary, subtract federal and state tax from the gross salary. Calculate the state tax at 5%.

  Write program that lets the user enter a non-negative

Write program that lets the user enter a non-negative integers than uses a look to calculate the factorial of that integer. Display the factorial.

  Write a function called acronym

Write a function called acronym. This function is passed a string s, and returns a string consisting of all of the capitalized letters in s.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd