diff --git a/.github/workflows/github-actions-demo.yml b/.github/workflows/github-actions-demo.yml new file mode 100644 index 0000000..0eb7126 --- /dev/null +++ b/.github/workflows/github-actions-demo.yml @@ -0,0 +1,18 @@ +name: GitHub Actions Demo +run-name: ${{ github.actor }} is testing out GitHub Actions 🚀 +on: [push] +jobs: + Explore-GitHub-Actions: + runs-on: ubuntu-latest + steps: + - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." + - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" + - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." + - name: Check out repository code + uses: actions/checkout@v4 + - run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." + - run: echo "🖥️ The workflow is now ready to test your code on the runner." + - name: List files in the repository + run: | + ls ${{ github.workspace }} + - run: echo "🍏 This job's status is ${{ job.status }}." diff --git a/.gitignore b/.gitignore index a117581..e8f898a 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /data/db /data/db.tar.zst /data/db.tar.gz +__pycache__ \ No newline at end of file diff --git a/dashboard.py b/dashboard.py new file mode 100644 index 0000000..4e39c78 --- /dev/null +++ b/dashboard.py @@ -0,0 +1,24 @@ +from dash import Dash, html, dcc, callback, Output, Input +import plotly.express as px +import pandas as pd + +df = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/gapminder_unfiltered.csv') + +app = Dash() + +app.layout = [ + html.H1(children='Population over Time by Country', style={'textAlign':'center'}), + dcc.Dropdown(df.country.unique(), 'United States', id='dropdown-selection'), + dcc.Graph(id='graph-content') +] + +@callback( + Output('graph-content', 'figure'), + Input('dropdown-selection', 'value') +) +def update_graph(value): + dff = df[df.country==value] + return px.line(dff, x='year', y='pop') + +if __name__ == '__main__': + app.run(debug=True)