This project's goal is to build an internal reporting tool that will use information from a database to discover what kind of articles the site's readers like.
The project contains three major components:
- an Ubuntu virtual machine
- a Postgres database
- a Python script for analyzing logs of the database.
Prerequsites: Vagrant 2.0.2 or higher
This vm is located in the FSND-Virtual-Machine/vagrant
subdirectory.
The news
database contains information regarding a newspaper site. It contains articles, web server log for the site, and information about article authors.
The python script located under solution/solution.py
analyzes the news data base and answers the three 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?
- Clone repo
- Navigate to the
FSND-Virtual-Machine/vagrant
subdirectory vagrant up
to bring up the vmvagrant ssh
to login to the vm- Download and unzip the
FSND-Virtual-Machine/newsdata.zip
file from within the vm. This contains the Postgres database dump file which will create and populate thenews
database. - Run
psql -d news -f newsdata.sql
to populate the database
- From within the vm, download the
solution/solution.py
script - Run the script -
python3 solution.py
- A copy of the intended output is located in
solution/solution_output.txt