Coder Social home page Coder Social logo

abdulmajeedalomari / log-analysis-project Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 5 KB

Building an informative summary from logs is a real task that comes up very often in software engineering. For instance, at Udacity we collect logs to help us measure student progress and the success of our courses. The reporting tools we use to analyze those logs involve hundreds of lines of SQL.

Python 100.00%

log-analysis-project's Introduction

Log Analysis Project

You've been hired onto a team working on a newspaper site. The user-facing newspaper site frontend itself, and the database behind it, are already built and running. You've been asked to build an internal reporting tool that will use information from the database to discover what kind of articles the site's readers like.

The database contains newspaper articles, as well as the web server log for the site. The log has a database row for each time a reader loaded a web page. Using that information, your code will answer questions about the site's user activity.

The program you write in this project will run from the command line. It won't take any input from the user. Instead, it will connect to that database, use SQL queries to analyze the log data, and print out the answers to some questions.

This project is required for Full-Stack Nanodegree program.

It was developed by:

Abdulmajeed Alomari

Installation

Prerequisites

  • Having python3 installed.
  • You need to use Terminal on Mac or Linux systems. On windows, you I recommend using Git Bash.
  • You need to download the project's data "newsdata.sql" from here.

Usage

Once you get the above software installed and the needed data downloaded:

  1. Navigate to your FSND Virtual Machine folder and run the following commands:
cd vagrant
vagrant up
vagrant ssh
cd /vagrant
git clone https://github.com/AbdulmajeedAlOmari/log-analysis-project.git log-analysis-project
cd log-analysis-project
  1. You need to install "psycopg2" module by running the following command: pip3 install psycopg2
  2. Move the "newsdata.sql" to your project folder "log-analysis-project".
  3. Load the data from the “newsdata.sql” by using the following command: psql -d news -f newsdata.sql
  4. Connect to the database using the command: psql -d news
  5. Now, you can run the python script using the command: python log-analysis.py

Sample Output

You can visit "sample_output" to see the output of the python script "log-analysis.py"

References

I used the following references to help me finish this project:

log-analysis-project's People

Contributors

abdulmajeedalomari avatar

Watchers

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