This is the project for Udacity Intro to Programing Nano Degree - Back-End Development. In this project, you will use PostgresSQL to build an internal reporting tool that will use information from a large database to discover what kind of articles the site's readers like. The database has the following 3 tables:
- articles - articles that has been posted so far
- authors - a list of the authors
- log - log records that sent to server (>1,000K rows)
Run the code from main.py you will find the answer of the following questions:
- What are the most popular three articles of all time?
- Who are the most popular article authors of all time?
- On which days did more than 1% of requests lead to errors?
- Python 2.7
- Vagrent
- VirtualBox
- Git
- Set up VirtualBox & Vagrant
- Download or clone the FSND-VM repository
- Download data
- Unzip the file, move newsdata.sql into vagrant folder
- Load the data into your local database with
psql -d news -f newsdata.sql
- Connect to your database using
psql -d news
, then you can explore the tables - Run the code
python main.py
- The output will be displayed in the bash
- Go into the downloaded fullstack-nanodegree-vm repository enter command:
$ vagrant up
- Log in using command:
$ vagrant ssh
- Change directory to vagrant using command:
$ cd /vagrant