Question: C++ problem please read the requirements carefully For this problem use social media data In this project, your program needs to extract interesting information from
C++ problem please read the requirements carefully
For this problem use social media data
In this project, your program needs to extract interesting information from the data and display it for the user.
Create a bounding box and compute what percentage of geocoded tweets fall within this area (you can create multiple bounding boxes e.g. 50 miles, 100 mile etc.). A bounding box is rectangular area defined by a north and south latitude and an east and west longitude.
The first thing your program needs to do is print a welcome message to the user that concisely explains program functionality For example, your program might print something like:
Welcome. This program calculates the percentage of tweets that fall within a specified distance.
Get user input from at least one menu
There should be a menu in your introduction that asks for input from the user. You are welcome to add additional menus if you need additional input from the user. For example, after displaying the welcome message you could display a menu to ask the user to specify the distance:
Enter the distance: 1) Within 50 miles 2) Within 100 miles 3) Within 200 miles 4) Within 500 miles 5) Within 1000 miles
Present results and ask for another query
Using the input from the user, display the results in a neatly formatted message such as:
The percentage of geocoded tweets that fell within 50 miles: 52%
After displaying the message, your program needs to ask the user if they would like to perform any more calculations. If the user says Yes, you should display the first menu again. If the user says No, you should display an exit message and exit the program. The details of the exit message are described below.
After the user selects No, and you exit your loop, you need to print another message to the user. In this message, say thanks for using the program.
Store data from the files in an object
Your program needs to have at least one class. create a class to support the functionality of the program. The class(es) you create will depend on the problem/ data you are working with. For instance, if you are working with individual tweets you may need a Tweet class. If you are working geocoded tweets you may also want a Geocode class that stores the latitude/longitude data.
The first thing your program needs to do, even before displaying the welcome message, is input the data from txt files. Data should be read in from the files and stored in the appropriate variable in your class to support what your program does. You should structure your program to read in all data only one time.
Other requirements:
All variables in your class need to be private and accessed through public methods. For
example, if one of the class variables is latitude then you will need getLatitude()and setLatitude() methods.
You need at least three objects. For example if you create a class Tweet, then you need at least three instances of Tweet in your program.
You are welcome to generate new data files to support your programs functionality. For example, if you are working with the URL domains extract, you may want to limit your
analysis to domains that occur at least 25 times. The data in these sub-extracts is sorted by count, so you can import the .csv file into Excel and delete the rows that fall below 25.
If you store data in an array, you can create an array that is larger than you need and leave some of it unused. You will need to keep track of how much of the array is used.
The easiest way to read the .csv files is to use getline() for each line in the file and then use stringstream to parse the line.
CSV FILE(coppied and pasted below) please copy and paste into excel and name geocodedTweets.csv
| Row | Local Date | Hour | Minute | Is Retweet | Retweet Count | Coordinates |
| 11921 | 7/17/2016 | 14 | 57 | FALSE | 10 | 48.137524,-120.010567 |
| 11955 | 7/17/2016 | 15 | 12 | FALSE | 2 | 48.412071,-120.145016 |
| 11953 | 7/17/2016 | 15 | 44 | FALSE | 0 | 48.211389,-120.1025 |
| 14013 | 7/17/2016 | 19 | 43 | FALSE | 0 | 48.364943,-120.12256 |
| 19420 | 7/17/2016 | 19 | 49 | FALSE | 6 | 47.839748,-120.013669 |
| 19422 | 7/17/2016 | 19 | 57 | FALSE | 0 | 47.840063,-120.089817 |
| 4082 | 7/17/2016 | 21 | 32 | FALSE | 67 | 47.45234,-120.29365 |
| 13726 | 7/17/2016 | 22 | 10 | FALSE | 2 | 48.354094,-120.095047 |
| 1759 | 7/17/2016 | 22 | 22 | FALSE | 0 | 47.886326,-120.116456 |
| 13715 | 7/18/2016 | 6 | 18 | FALSE | 4 | 47.07502,-122.941048 |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
