Prints out reports based on the analysis of a newspaper's database.
The reports answer the following questions:
- What are the most popular three articles of all time?
- Who are the most popular article authors of all time?
- On which days did more than 1% of requests lead to errors?
Logs Analysis makes use of a Virtual machine that can be installed as follows:
- Install VirtualBox 5.1
- Install Vagrant
- Download the VM configuration
- Start the virtual machine:
cd vagrant
to open the vagrant subdirectoryvagrant up
to download and install the Linux operating systemvagrant ssh
to log in to the virtual machine
Logs Analysis analyses the data from a database that can be downloaded and initialized as follows:
- Download the data
- Unzip the archive and move
newsdata.sql
to the vagrant subdirectory - Within the vagrant subdirectory:
psql -d news -f newsdata.sql
to initalize the database - Move
views.sql
to the vagrant subdirectory - Create views in the database:
psql -d news -f views.sql
Once everything is installed: python analysis.py