Skip to content

Analysis of a website's users activity using complex PostgreSQL queries

Notifications You must be signed in to change notification settings

amrfekryy/FSND-project1-logs-analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

FSND Project1 - Logs Analysis

This is a command line reporting tool that connects to the database of a newspaper website and provides insights derived from users activity.

Questions answered by the program:

  • What are the most popular three articles of all time?
  • What are the most popular article authors of all time?
  • On which days did more than 1% of requests lead to errors?

Requirements:

  1. Set-up a virtual machine using Vagrant and VirtualBox.

    • install VirtualBox package for your operating system.
    • install Vagrant package for your operating system.
    • download the FSND Virtual Machine folder and cd into the "vagrant" subdirectory.
    • run vagrant up to download the Linux operating system and install it.
    • run vagrant ssh to log in to your installed Linux vertual machine.
    • click here for more detailed instructions (course enrollment required).
  2. download and unzip newsdata.sql into "vagrant" directory. This file contains the database design (tables), and data for each table.

Usage:

  1. set up the local database "news", and load data into it using the command psql -d news -f newsdata.sql

  2. add the necessary views in "create_views.sql" using the command psql -d news -f create_views.sql

  3. run the python file from the command line python3 report.py and you will see the answers to the questions as in "output.txt" file.

About

Analysis of a website's users activity using complex PostgreSQL queries

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages