Git Product home page Git Product logo

assignment-analyzing-us-economic-data-and-building-a-dashboard's Introduction

Assignment-Analyzing-US-Economic-Data-and-Building-a-Dashboard

import pandas as pd from bokeh.plotting import figure, output_file, show,output_notebook output_notebook()

def make_dashboard(x, gdp_change, unemployment, title, file_name): output_file(file_name) p = figure(title=title, x_axis_label='year', y_axis_label='%') p.line(x.squeeze(), gdp_change.squeeze(), color="firebrick", line_width=4, legend="% GDP change") p.line(x.squeeze(), unemployment.squeeze(), line_width=4, legend="% unemployed") show(p)

links={'GDP':'https://s3-api.us-geo.objectstorage.softlayer.net/cf-courses-data/CognitiveClass/PY0101EN/projects/coursera_project/clean_gdp.csv',\ 'unemployment':'https://s3-api.us-geo.objectstorage.softlayer.net/cf-courses-data/CognitiveClass/PY0101EN/projects/coursera_project/clean_unemployment.csv'}

Type your code here

csv_path = links['GDP'] df = pd.read_csv(csv_path) df.head()

Type your code here

csv_path = links['unemployment'] df = pd.read_csv(csv_path) df.head()

Type your code here

df[df['unemployment'] > 8.5]

Create your dataframe with column date

csv_path=links['GDP'] gdp_dataframe=pd.read_csv(csv_path) x = pd.DataFrame(gdp_dataframe, columns=['date']) x.head()

Create your dataframe with column change-current

gdp_change = pd.DataFrame(gdp_dataframe, columns=['change-current']) gdp_change.head()

Create your dataframe with column unemployment

unemploy_dataframe= pd.read_csv(csv_path) unemployment = pd.DataFrame(unemploy_dataframe, columns=['unemployment']) unemployment.head()

title = "Unemployement stats according to GDP"

file_name = "index.html"

Fill up the parameters in the following function:

make_dashboard(x=, gdp_change=, unemployment=, title=, file_name=)

make_dashboard(x=x, gdp_change=gdp_change, unemployment=unemployment, title=title, file_name=file_name)

assignment-analyzing-us-economic-data-and-building-a-dashboard's People

Contributors

mariussandor 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.