This script queries the newsdata.sql Postgres database to answer the questions asked on the Project Description Page for the project and outputs the answers to the console in plain text.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. A larger project would have a "deployment" section in this README for production systems, but that is overkill for our purposes.
Simply navigate to the directory where you downloaded the script and run it by
typing python parser.py
Postgres >= 9.5.17
python >= 3.5.2
- Download sample Postgres database here.
- Extract the
newsdata.sql
file. - In the directory where you just extracted the file, run
psql -d news -f newsdata.sql
- Get this script onto your machine. clone this repository using
git clone https://github.com/isaac-friedman/fullstack-nanodegree-1.git
or download as a zip and extract.
You can even open the script on GitHub and just copy-paste.
Simply navigate to the directory where you downloaded the script and run it by
typing python parser.py
- Isaac Friedman
- Thanks to Clarence S. on the Udacity forum for help optimizing one of the queries.