Git Product home page Git Product logo

cs348's Introduction

The Country Factbook

Description

A world stats interface that allows you to learn about different countries and play games. image

Running the application

docker-compose up

This command will build the docker images, start the db and web containers, and seed the database.

The first time the containers are built, the database is completely empty. A script will automatically detect if the tables are empty and seed them with the world statistics. If the tables already exist and are populated this initialization step will be skipped.

Database Information

Once the container has been build and the database populate navigate to http://localhost:5001/ to interact with the web app.

Updating the Country Statistics

This factbook has the unique feature of supporting a timeseries data from multiple years. To update the database with new data, first insert this new data into the appropriate CSV file in the raw_data folder, make sure to follow the existing format. Then, with the web app up and running, simply open a terminal and run the command:

docker-compose exec web python manage.py update

Debugging

Frontend

Starting the app locally:

  1. Ensure the workign dir is the frontend ; cd frontend
  2. Install dependencies ; yarn
  3. Start the frontend ; yarn dev

Library Documentation Links


Backend

(once the project is up and running within its container)

Web

Access the WEB service using:

docker-compose exec web sh

PostgreSQL

Access the DB service using:

docker-compose exec db sh

Interacting with the PostgreSQL Database:

Once the project is up and running within its container, run the following command to access the PostgreSQL CLI.

docker-compose exec db psql --username=user --dbname=world_factbook

To view tables in the database, use

\dt

Run the following SQL command to check if the data inside the population table was loaded successfully.

TABLE population;

cs348's People

Contributors

gijssonyeo avatar ayildirim21 avatar rachel019 avatar mrkarezina avatar elibroftw avatar rachel133199 avatar

Watchers

 avatar

cs348's Issues

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.