Giter VIP home page Giter VIP logo

logs-analysis's Introduction

Logs analysis Report

This is a simple reporting tool done using Python that prints out reports for a newspaper to its analysis articles and authors.

Installation

  1. Clone this repo
git clone https://github.com/onemoreahmad/logs-analysis
cd logs-analysis
  1. Download the database file:
  1. Import the database after you unzipped it:
psql -d news -f newsdata.sql
  1. Install psycopg2-binary library using pip3 by typing this command:
pip3 install psycopg2-binary

Run the script

Run the script by using this command:

python3 app.py

You should get output similar to the following results:

 1- What are the most popular three articles of all time?
 -  Candidate is jerk, alleges rival  -  338647  views
 -  Bears love berries, alleges bear  -  253801  views
 -  Bad things gone, say good people  -  170098  views

2- Who are the most popular article authors of all time?
 -  Ursula La Multa  —  507594  views
 -  Rudolf von Treppenwitz  —  423457  views
 -  Anonymous Contributor  —  170098  views
 -  Markoff Chaney  —  84557  views

3. On which days did more than 1% of requests lead to errors?
 -  2016-07-17  —  2.25  views

Done

That was it!

Please let me know if you get any issue or find any security bugs.

Author

  • Ahmad Alahmadi
  • Github: @onemoreahmad

logs-analysis's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.