`run.sh` has been provided for easier execution.
# Usage
1. Active virtual env with `source .venv/bin/activate` (assuming relative path is in this folder)
2. Run `python analysis.py`
3. Graphs will be output at `out/`
4. Deactive env with `deactivate`
# Notes
Built in Python 3.6.8, but should work with all higher versions.  
Module geoip2 does not seem to track its dependencies correctly and so may cause errors when installing `requirements.txt`. In such cases, manually install the modules that are producing errors.  
Note that downloadStats.php fetches images and data from `python/out/`, so rerunning analysis.py should also automatically update downloadStats.php.  
# Overview
There are two main parent classes, Graph and Log. Log represents each log file format type (currently Apache and FTP). Graph represents each type of graph. A singular graph class can produce multiple graphs, though they will usually be related (i.e. different pie charts).  
First, the initialized log subclasses will be feed lines from their logs in ascending time order. These are then processed and converted into usable data (Log.readLine, currently, ip, time, downloaded file, size, and location). Afterwards, the processed line is given to each graph so that the graph can save the data it needs (Graph.process). This repeats until all lines have been read. Then, each graph draws and saves its associated graphs (Graph.draw).  

Remarks:
1. Graph.process is always provided lines in ascending time order. This requires the assumption that each log file is in ascending time order and that, for each log type, the the time range between files are disjoint.
2. Subclasses of Log should override readLine(...) and subclasses of Graph should override process(...) and draw(...).  
