- os
- sys
- requests
- datetime
- json
- pandas
- wikipedia
-
Add events, their dates, and a category to the eventsList.csv file, then run WikiPrimaryEvents.py to generate a list of contained links and a CSV file of views for those events.
-
Run WikiLinkedPages.py with python3 WikiLinkedPages.py {category} to get pageview data on all links within events in a category.
-
When adding new categories, create new directories /{category}/Views/ and /{category}/Links/.
-
The WikiAnalyzeLinks.py script can be run with python3 WikiAnalyzeLinks.py {category}. It calculates an average baseline of views, a peak number of views, and the percent increase between them. These numbers are the average of the 5 dates surrounding the minimum for baseline, and the average of 5 dates surrounding the maximum for peak. This can and probably should be changed but gets a rough estimate for the % increase in traffic to those pages.