The Log Analysis project is the first project in Udacity's full stack web development nanodegree program. The task was to build an internal reporting tool answering the following three 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?
- We are using a tools called Vagrant and VirtualBox to manage our VM.
- a newsdata.sql file provided by Udacity
- Flask
- Python
- PostgreSQL
- To get started, install vagrant and VirtualBox. You'll find a detailed guide for installing here.
- Cd into the vagrant directory and create a folder called newsdata
- Download the files news.py, newsdb.py and newsdata.sql, unzip and put them into the newsdata directory.
- Start up the VM and login by using the commands
vagrant up
followed byvagrant ssh
. - On your virtual Linux machine, cd into /vagrant/newsdata and use the command
psql -d news -f newsdata.sql.
to load the data. - Run the webapp with the command
python news.py
- Open your favorite browser and go to localhost:8000
- Once the webapp has loaded, you'll see the Newsdata log including the three following sections:
- Top 3 articles by views
- Top 3 authors by article views
- Dates on which requests errors were above 1%
- To close the connection from the command line press
ctrl + c
, logout of the VM with the commandctrl + d
and shutdown your VM with the commandvagrant halt
.
- Udacity provided the training, review and feedback