Git Product home page Git Product logo

logs-analysis's Introduction

Logs analysis

This repo is for the Udacity Full-stack Nanodegree project Logs Analysis. It is a reporting tool for a fictional newspaper site that uses information from the database to discover what kind of articles the site's readers like. The database contains newspaper articles, data about the authors of the articles, and server logs for the site.

Set up

  1. Install VirtualBox https://www.virtualbox.org/wiki/Downloads
  2. Install Vagrant https://www.vagrantup.com/
  3. Clone repo https://github.com/udacity/fullstack-nanodegree-vm
  4. cd into vagrant folder and clone this repo
  5. Unzip newsdata.zip. Its contents contain newdata.sql.
  6. Run vagrant up and then vagrant ssh
  7. cd logs-analysis
  8. Type command psql -d news -f newsdata.sql into terminal to load the data.
  9. Run python newsdata.py

Design

The database consisted of three tables - authors, articles, and log. Here are the questions for the project and the approach I used to solve them:

1. What are the most popular three articles of all time?

Query the articles that have been viewed the most from the log table and find the article titles from the articles table.

2. Who are the most popular article authors of all time?

Query the authors where the sum of the views for each article they've written are highest.

3. On which days did more than 1% of requests lead to errors?

Query logs table to find days where the ratio of request statuses that are 400 or above to total statuses are greater than 1%.

logs-analysis's People

Contributors

bengoblue05 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.