-
Extracting Twitter data from a CSV file
-
Storing those records after in a MongoDB collection
-
Analysing the data can be done through selecting a specific option from a Menu
-
Results are being provided based on the following criteria:
- How many Twitter users are in the database?
- Which Twitter users link the most to other Twitter users? (The top ten.)
- Who is are the most mentioned Twitter users? (The top five.)
- Who are the most active Twitter users (The top ten)?
- Who are the five most grumpy (most negative tweets) and the most happy (most positive tweets)?
- Docker ✅
- Connect to your Docker container running the MongoDB DBMS through:
docker run --rm -v $(pwd)/data:/data/db --publish=27017:27017 --name dbms -d mongo 88385afac5fe88a5ba47cd60c084bc1855cae6089a7e7d95ba24f0ba6fea1404
NB! If you have Windows, please replace $(pwd) with the path to the directory of the repository
-
Run the following command in a new shell
docker run -it --rm elit0452/dotnet
- In case you don't have the image downloaded, it will be downloaded from Docker hub 🐳.
-
Download the sample Twitter data with:
wget http://cs.stanford.edu/people/alecmgo/trainingandtestdata.zip
-
Uncompress the Twitter dataset to your current directory with:
unzip trainingandtestdata.zip
-
Clone the project using the following command or download the repository zip file
git clone https://github.com/elit0451/TwitterAnalyserMongoDB.git
-
Using a shell navigate to the folder where the repository is located
-
Use your favourite text editor and change the csv file location in TweetsRepo.cs file to the place where the
testdata.manual.2009.06.14.csv
is being stored‼️ ‼️ training.1600000.processed.noemoticon.csv contains 2 tweets with the same ID ➡️ the program will keep hanging‼️ ‼️ -
Similarly, edit the MongoHelper.cs file with your local machine's IP address (the port stays the same)
-
The next step is to execute the following command and afterwards you can interact with the aplication 🏗
dotnet run
-
In order to see the queried results in the file you can start picking up the options from the menu 👍🏻