This is Logs Analysis project a part of udacity Uconnect Full stack engineer program.
We we're supposed to create a reporting tool that prints out reports (in plain text) based on the data in the database. This reporting tool is a Python program using the psycopg2 module to connect to the database.
The output queries should 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?
The project code requires the following software:
- Python 3.5.2 or later
- psycopg2 2.7.3.2 or later
- PostgreSQL 9.5.10 or later
You can run the project in a Vagrant managed virtual machine (VM) which includes all the required dependencies (see below for how to run the VM). For this you will need Vagrant and VirtualBox software installed on your system.
This project consists of the following files:
Queries.py- The Python program that connects to the PostgreSQL database, executes the SQL queries and displays the results.README.md- This read me file.Outputs.txt- TXT file contains sample outputs.
- Run in the working folder
vagrant upto configure the VM - Run
vagrant sshto log into the VM - Download the news data and save it in the working VM folder
- Run
psql -d news -f newsdata.sqlto generate the database - Run
python Queries.pyin terminal to generate the database report