From 5f0e305f60d12f4f8b8045725a20fc6952a95c0d Mon Sep 17 00:00:00 2001 From: Paul Warner Date: Thu, 18 Mar 2021 21:50:20 -0700 Subject: [PATCH 1/4] add an inital graph, it's ugly --- .gitignore | 1 + analysis.py | 12 ++++++++++++ requirements.txt | 23 +++++++++++++++++++++++ 3 files changed, 36 insertions(+) create mode 100644 analysis.py create mode 100644 requirements.txt diff --git a/.gitignore b/.gitignore index fc272fa20..0fd5efb32 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .DS_Store code/.pynb_checkpoints/* data_tables/.DS_Store +env/ diff --git a/analysis.py b/analysis.py new file mode 100644 index 000000000..8fbea15de --- /dev/null +++ b/analysis.py @@ -0,0 +1,12 @@ +import pandas +import plotly.express as express_plot + +data_frame = pandas.read_csv('data_tables/vaccine_data/us_data/time_series/vaccine_data_us_timeline.csv') + +graph = express_plot.line( + data_frame, + x = 'Date', + y = 'Doses_admin', + title='COVID vaccination rate over time', + color="Province_State") +graph.show() \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 000000000..51c45520e --- /dev/null +++ b/requirements.txt @@ -0,0 +1,23 @@ +appnope==0.1.2 +backcall==0.2.0 +decorator==4.4.2 +ipdb==0.13.7 +ipython==7.21.0 +ipython-genutils==0.2.0 +jedi==0.18.0 +numpy==1.20.1 +pandas==1.2.3 +parso==0.8.1 +pexpect==4.8.0 +pickleshare==0.7.5 +plotly==4.14.3 +prompt-toolkit==3.0.17 +ptyprocess==0.7.0 +Pygments==2.8.1 +python-dateutil==2.8.1 +pytz==2021.1 +retrying==1.3.3 +six==1.15.0 +toml==0.10.2 +traitlets==5.0.5 +wcwidth==0.2.5 From 0bb3b2577cf967a64c3a45deceb266b6f6161942 Mon Sep 17 00:00:00 2001 From: Paul Warner Date: Thu, 18 Mar 2021 21:52:19 -0700 Subject: [PATCH 2/4] remove graph --- analysis.py | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 analysis.py diff --git a/analysis.py b/analysis.py deleted file mode 100644 index 8fbea15de..000000000 --- a/analysis.py +++ /dev/null @@ -1,12 +0,0 @@ -import pandas -import plotly.express as express_plot - -data_frame = pandas.read_csv('data_tables/vaccine_data/us_data/time_series/vaccine_data_us_timeline.csv') - -graph = express_plot.line( - data_frame, - x = 'Date', - y = 'Doses_admin', - title='COVID vaccination rate over time', - color="Province_State") -graph.show() \ No newline at end of file From 2ae43d484c88f917647aa6e409db3b38626e1c16 Mon Sep 17 00:00:00 2001 From: Paul Warner Date: Fri, 19 Mar 2021 09:22:33 -0700 Subject: [PATCH 3/4] initial go at a report --- analysis.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 analysis.py diff --git a/analysis.py b/analysis.py new file mode 100644 index 000000000..8fbea15de --- /dev/null +++ b/analysis.py @@ -0,0 +1,12 @@ +import pandas +import plotly.express as express_plot + +data_frame = pandas.read_csv('data_tables/vaccine_data/us_data/time_series/vaccine_data_us_timeline.csv') + +graph = express_plot.line( + data_frame, + x = 'Date', + y = 'Doses_admin', + title='COVID vaccination rate over time', + color="Province_State") +graph.show() \ No newline at end of file From 4987f068a73c24337baa337d466928ac4a35547d Mon Sep 17 00:00:00 2001 From: akalita Date: Fri, 19 Mar 2021 12:32:39 -0400 Subject: [PATCH 4/4] update the plot --- analysis.py | 1 + 1 file changed, 1 insertion(+) diff --git a/analysis.py b/analysis.py index 8fbea15de..c4addc291 100644 --- a/analysis.py +++ b/analysis.py @@ -2,6 +2,7 @@ import plotly.express as express_plot data_frame = pandas.read_csv('data_tables/vaccine_data/us_data/time_series/vaccine_data_us_timeline.csv') +data_frame = data_frame.groupby(["Province_State", "Date"], as_index=False)['Doses_admin'].sum() graph = express_plot.line( data_frame,