Coder Social home page Coder Social logo

logs-analysis's Introduction

Logs Analysis Project

This is an internal reporting tool that uses information from the database to discover what kind of articles the site's readers like.

The given database contains newspaper articles, as well as the web server log for the site.

This program was built in Python3 and PostgreSQL and it runs from command line. There is no user's input. The program connects to the database, uses SQL queries to analyze the log data, and print out the answers to questions:

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

This is a project submission for Udacity Full Stack Web Developer Nanodegree Program.

Requirements

In order to run and make changes to this project, you'll need:

Projects files and Modules:

  • Download the data sample for this project
  • Download or clone this project repository
  • Install the psycopg2 module: pip3 install psycopg2

Usage

Make sure to save the data sample file newsdata.sql inside project directory.

Build the database

  1. Load the data to a local news database: psql -d news -f newsdata.sql
  2. Create the VIEWS into the database:'psql -d news -f sql_views.sql
  3. Connect to the local database: psql -d news

Run the program python3 reporting_tool.py

Files

Understanding the files:

reporting_tool.py The program.

results.jpg The program results screen.

sql_views.sql The file to create the VIEWS.

logs-analysis's People

Contributors

mc4rol9 avatar

Stargazers

 avatar

Watchers

James Cloos avatar  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.