From 4621d7bd2473f1cdbfa4b85bdd24879350876b52 Mon Sep 17 00:00:00 2001 From: Mark Green <70458644+greenmmq@users.noreply.github.com> Date: Tue, 23 Jul 2024 17:43:52 +0000 Subject: [PATCH 1/2] basic dashboard --- .gitignore | 1 + dashboard.py | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 dashboard.py 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) From 08c8b23ca54ec9c7229da08c54df47bed96cce2f Mon Sep 17 00:00:00 2001 From: Mark Green <70458644+greenmmq@users.noreply.github.com> Date: Tue, 23 Jul 2024 10:48:50 -0700 Subject: [PATCH 2/2] add demo github actions --- .github/workflows/github-actions-demo.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/github-actions-demo.yml 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 }}."