Skip to content

CodersVader/Logs-Analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logs Analysis Website

by Arvind Rathee

Logs Analysis project, part of the Udacity Full Stack Web Developer Nanodegree.

What is this project about?

This project analyze the log data by querying SQL and outputs the data into a text file. This project runs directly from command line and does not take any input from the user.

Database and its Adapter for Python

PostgreSQL along with Psycopg 2 most popular PostgreSQL database adapter for the Python programming language.

Project Content

  • main.py - This file contain code for querying the database and processing it.
  • out.txt - This file contains the output of main.py
  • newsdata.zip - This contain the databse file that is used to import database.

Requirements for the program to run

How to run the program?

Download the project zip file to you computer and unzip the file. Or clone this repository to your desktop.

Navigate to the project directory.

Unzip newsdata.zip and run following code to import the newsdata.sql

psql -f newsdata.sql -U username

Above code will prompt for password enter the password

Now database 'news' has been created containg tables

  • articles
  • log
  • authors

Run python program using command line or terminal

python main.py

A file named out.txt is created in the directory with output of the program in it.

Notes

  • In main.py you must replace user and password with your own while connecting to the database.

About

This is the project #3 for my Nanodegree.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages