GithubHelp home page GithubHelp logo

marcuskorea / populations_in_countries Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 87.75 MB

This project is an interactive dashboard that displays gender comparisons from different countries around the world

HTML 1.83% CSS 0.29% JavaScript 3.12% Jupyter Notebook 93.96% Python 0.80%
flask python pandas html-css-javascipt world-population

populations_in_countries's Introduction

Populations of the World

Projection:

  • How are populations around the world projected to increase?
  • Has there been a significant deviation between proportions of males and females in a particular country in the past and how is it forecast to change into the future.

Summary:

Creation

Python was used to clean the data and PostgreSQL was used to store the data. A connection was made to PostgreSQL and the data was turned into an API on the Flask web app so it could be easily accessed. Once this was done an interactive dashboard was created using HTML/CSS/JavaScript and using the Pytho package Flask, a web application was created.

Using the Dashboard:

NOTE: Instructions on how start the dashboard are at the end (after the screenshots)

To use the dashboard enter the year you would like to filter in the from and click "Choose Country". Then once the map displays click on the country you would like to see information for. Then a table and graph will appear underneath the map.

Languages used:

  • Python
  • HTML
  • CSS
  • JavaScript

Database used:

  • PostgreSQL

Python Packages Used:

  • Pandas
  • GeoPandas
  • SQLAlchemy
  • Flask
  • Matplotlib

Javascript Libraries Used:

  • D3
  • Leaflet
  • ScrollReveal
  • Plotly

Conclusions

  • Ukraine, Latvia and Estonia started off as the countries with greatest difference between gender. However, middle east took over this place and may stay on top in future.

  • China started as the Most populated country in 1951 but, however, in future, India may become the most populated country with 1.44 Bn people

Screenshots

Before Year is entered

Web application before entering year

After Year is entered

Web application after entering year

After Country is entered

Web application after entering country

API on the Flask Web App

API on the Flask Web App

Running all the code

NOTE: Make sure there is no database named populations in PGAdmin

Running the dashboard

  1. Set your path to this folder. (If you are using Visual Studio Code just click File > Open Folder > Populations_In_Countries
  2. Enter your password for PostgreSQL in the config file.
  3. Then run the file app.py.

Running the jupyter notebooks

  1. Before running any of the jupyter notebooks please install needed packages running the following code in the terminal.

     pip install pandas
     pip install sqlalchemy
     pip install geopandas
     pip install Flask-sqlalchemy
     pip install matplotlib
    

Or run this code in the first Jupyter Notebook

    ! pip install --user pandas
    ! pip install --user sqlalchemy
    ! pip install --user geopandas
    ! pip install --user Flask-sqlalchemy
  1. Run the file DataCleaning.ipynb

  2. Run the file Conclusions.ipynb

populations_in_countries's People

Contributors

ivana-stopka avatar macampon avatar marcuskorea avatar prabhdeepsandhu avatar

Stargazers

 avatar

Watchers

 avatar

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.