This page's purpose is to help developper have a better understanding of the code.
The code is divided into 3 files:
We will see the goal of each one of those files, along with the location of the main code features ( e.g. tweet parsing )
Everything begins in the interface.js file, in the choixFichier() function, where the user gets to choose the date they want to analyse.
The dates choices depend on the folders present in the sample directory ( currently donnees ).
Once the date has been choosen, the user has access to the main menu ( mainMenu() function, still in the interface.js file ), where
He can chose what he wants to do among the following choices:
What those function actually do is just changing flags so that the tweetFonctions.main() can "know" what to do when it's called.
All the data parsing and computing is actually done in tweetFonctions.main() ! ( in the file tweetFonctions.js )
All the files are taken in account, and the dates are then extracted from those tweets.
The extracted dates are then parsed, and sorted. All that processing is made in the interface.js file.
All the parsing is taken care of by the csv-parser module
As said before, each feature has an associated flag, and is then processed in the TweetFonctions.main() function.
Here is the list of feature - Flag variable name:
| Feature | Variable name |
|---|---|
| Search By ID | searchByID |
| Search By Author | searchByAuthor |
| Top 10 most retweeted hashtags | mostRTHashtag |
| Top 10 users | top10A |
| Top 10 regions that tweet the most | tweetByCountry |
| Get associated hashtags | top10RTHAshtag |
| Number of tweets for a specific date range | numberTweetForH |