{"id":48563768,"url":"https://github.com/tyleracorn/covid_alberta","last_synced_at":"2026-04-08T12:37:02.831Z","repository":{"id":40161386,"uuid":"250150451","full_name":"tyleracorn/covid_alberta","owner":"tyleracorn","description":"looking at some of the alberta specific covid data","archived":false,"fork":false,"pushed_at":"2023-04-12T00:02:03.000Z","size":5141,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-02-12T02:14:23.705Z","etag":null,"topics":["alberta","canada","covid-19","covid19-data","webscraper"],"latest_commit_sha":null,"homepage":"http://tyleracorn.com/covid_alberta/","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tyleracorn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-03-26T03:19:07.000Z","updated_at":"2020-05-02T03:18:14.000Z","dependencies_parsed_at":"2023-09-29T00:21:46.413Z","dependency_job_id":null,"html_url":"https://github.com/tyleracorn/covid_alberta","commit_stats":{"total_commits":44,"total_committers":1,"mean_commits":44.0,"dds":0.0,"last_synced_commit":"9ffd77c638728808d99be4a8f44bdcb5cf65b28c"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tyleracorn/covid_alberta","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyleracorn%2Fcovid_alberta","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyleracorn%2Fcovid_alberta/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyleracorn%2Fcovid_alberta/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyleracorn%2Fcovid_alberta/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tyleracorn","download_url":"https://codeload.github.com/tyleracorn/covid_alberta/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyleracorn%2Fcovid_alberta/sbom","scorecard":{"id":904863,"data":{"date":"2025-08-11","repo":{"name":"github.com/tyleracorn/covid_alberta","commit":"9ffd77c638728808d99be4a8f44bdcb5cf65b28c"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.5,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/main.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:7: update your workflow using https://app.stepsecurity.io/secureworkflow/tyleracorn/covid_alberta/main.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:8: update your workflow using https://app.stepsecurity.io/secureworkflow/tyleracorn/covid_alberta/main.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/main.yml:14","Warn: pipCommand not pinned by hash: .github/workflows/main.yml:15","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Vulnerabilities","score":0,"reason":"34 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-j6gc-792m-qgm2","Warn: Project is vulnerable to: GHSA-pj73-v5mw-pm9j","Warn: Project is vulnerable to: GHSA-jxhc-q857-3j6g","Warn: Project is vulnerable to: GHSA-48wp-p9qv-4j64","Warn: Project is vulnerable to: GHSA-4qw4-jpp4-8gvp","Warn: Project is vulnerable to: GHSA-636f-xm5j-pj9m","Warn: Project is vulnerable to: GHSA-7vh7-fw88-wj87","Warn: Project is vulnerable to: GHSA-fmx4-26r3-wxpf","Warn: Project is vulnerable to: GHSA-52p9-v744-mwjj","Warn: Project is vulnerable to: GHSA-mqm2-cgpr-p4m6","Warn: Project is vulnerable to: GHSA-286v-pcf5-25rc","Warn: Project is vulnerable to: GHSA-2qc6-mcvw-92cw","Warn: Project is vulnerable to: GHSA-2rr5-8q37-2w7h","Warn: Project is vulnerable to: GHSA-353f-x4gh-cqq8","Warn: Project is vulnerable to: GHSA-59gp-qqm7-cw4j","Warn: Project is vulnerable to: GHSA-5w6v-399v-w3cc","Warn: Project is vulnerable to: GHSA-7rrm-v45f-jp64","Warn: Project is vulnerable to: GHSA-cgx6-hpwq-fhv5","Warn: Project is vulnerable to: GHSA-crjr-9rc5-ghw8","Warn: Project is vulnerable to: GHSA-fq42-c5rg-92c2","Warn: Project is vulnerable to: GHSA-gx8x-g87m-h5q6","Warn: Project is vulnerable to: GHSA-jc36-42cf-vqwj","Warn: Project is vulnerable to: GHSA-jw9f-hh49-cvp9","Warn: Project is vulnerable to: GHSA-mrxw-mxhj-p664","Warn: Project is vulnerable to: GHSA-pxvg-2qj5-37jq","Warn: Project is vulnerable to: GHSA-r95h-9x8f-r3f7","Warn: Project is vulnerable to: GHSA-v4f8-2847-rwm7","Warn: Project is vulnerable to: GHSA-v6gp-9mmm-c6p5","Warn: Project is vulnerable to: GHSA-vr8q-g5c7-m54m","Warn: Project is vulnerable to: GHSA-vvfq-8hwr-qm4m","Warn: Project is vulnerable to: GHSA-xc9x-jj77-9p9j","Warn: Project is vulnerable to: GHSA-xh29-r2w5-wx8m","Warn: Project is vulnerable to: GHSA-xxx9-3xcr-gjj3","Warn: Project is vulnerable to: GHSA-5cm2-9h8c-rvfx"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-24T16:58:34.439Z","repository_id":40161386,"created_at":"2025-08-24T16:58:34.439Z","updated_at":"2025-08-24T16:58:34.439Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31556238,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T10:21:54.569Z","status":"ssl_error","status_checked_at":"2026-04-08T10:21:38.171Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alberta","canada","covid-19","covid19-data","webscraper"],"created_at":"2026-04-08T12:37:01.911Z","updated_at":"2026-04-08T12:37:02.813Z","avatar_url":"https://github.com/tyleracorn.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Covid Alberta\n\u003e This is a small package that I have developed to look at some of the alberta specific covid data.\n\n\nThis file will become your README and also the index of your documentation.\n\n## Install\n\n`pip install covid_alberta`\n\n## Web Scraper\n\nThe `albertaC19` is a class that scrapes the updated stats off of the [alberta Covid-19 website](https://covid19stats.alberta.ca/).\n\nexample of using the webscraper\n\n\n```\nabC19scaper = covid_alberta.albertaC19(outputfolder=\"\")\n# I don't plan on writing out the data in this example thus the keywords\nab_totals, ab_regions, ab_testing = abC19scaper.scrape_all(fltypes=None, return_dataframes=True)\n```\n\n\n    ---------------------------------------------------------------------------\n\n    IndexError                                Traceback (most recent call last)\n\n    \u003cipython-input-3-cea1377c44fe\u003e in \u003cmodule\u003e\n          1 abC19scaper = covid_alberta.albertaC19(outputfolder=\"\")\n          2 # I don't plan on writing out the data in this example thus the keywords\n    ----\u003e 3 ab_totals, ab_regions, ab_testing = abC19scaper.scrape_all(fltypes=None, return_dataframes=True)\n    \n\n    c:\\Repositories_C\\covid_alberta\\covid_alberta\\webscraper.py in scrape_all(self, totalfl, regionsfl, testfl, fltypes, combine_dataframes, return_dataframes)\n        335 \n        336         '''\n    --\u003e 337         totals = self.scrape_albertaTotals(output_filename=totalfl, fltypes=fltypes, return_dataframe=return_dataframes)\n        338         regions = self.scrape_albertaRegions(output_filename=regionsfl, fltypes=fltypes, return_dataframe=return_dataframes)\n        339         testing = self.scrape_albertaTesting(output_filename=testfl, fltypes=fltypes, return_dataframe=return_dataframes)\n    \n\n    c:\\Repositories_C\\covid_alberta\\covid_alberta\\webscraper.py in scrape_albertaTotals(self, output_filename, fltypes, update_figure_order, return_dataframe)\n        177         # Scrape the data\n        178         ab_cumulative = json.loads(totals_results[fig_order['cum_cases']].string)\n    --\u003e 179         ab_daily_cases = json.loads(totals_results[fig_order['daily_cases']].string)\n        180         ab_case_status = json.loads(totals_results[fig_order['case_status']].string)\n        181 \n    \n\n    IndexError: list index out of range\n\n\nNow we can show the dataframes\n\n```\nab_totals.tail()\n```\n\n\n\n\n\u003cdiv\u003e\n\u003cstyle scoped\u003e\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n\u003c/style\u003e\n\u003ctable border=\"1\" class=\"dataframe\"\u003e\n  \u003cthead\u003e\n    \u003ctr style=\"text-align: right;\"\u003e\n      \u003cth\u003e\u003c/th\u003e\n      \u003cth\u003ecum_cases\u003c/th\u003e\n      \u003cth\u003eConfirmed_count\u003c/th\u003e\n      \u003cth\u003eProbable_count\u003c/th\u003e\n      \u003cth\u003eDaily_count\u003c/th\u003e\n      \u003cth\u003eActive_cum\u003c/th\u003e\n      \u003cth\u003eDied_cum\u003c/th\u003e\n      \u003cth\u003eRecovered_cum\u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003cth\u003e2020-04-04\u003c/th\u003e\n      \u003ctd\u003e1250\u003c/td\u003e\n      \u003ctd\u003e38\u003c/td\u003e\n      \u003ctd\u003e19\u003c/td\u003e\n      \u003ctd\u003e57\u003c/td\u003e\n      \u003ctd\u003e618\u003c/td\u003e\n      \u003ctd\u003e23\u003c/td\u003e\n      \u003ctd\u003e322\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e2020-04-05\u003c/th\u003e\n      \u003ctd\u003e1308\u003c/td\u003e\n      \u003ctd\u003e35\u003c/td\u003e\n      \u003ctd\u003e23\u003c/td\u003e\n      \u003ctd\u003e58\u003c/td\u003e\n      \u003ctd\u003e676\u003c/td\u003e\n      \u003ctd\u003e24\u003c/td\u003e\n      \u003ctd\u003e382\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e2020-04-06\u003c/th\u003e\n      \u003ctd\u003e1344\u003c/td\u003e\n      \u003ctd\u003e20\u003c/td\u003e\n      \u003ctd\u003e16\u003c/td\u003e\n      \u003ctd\u003e36\u003c/td\u003e\n      \u003ctd\u003e712\u003c/td\u003e\n      \u003ctd\u003e27\u003c/td\u003e\n      \u003ctd\u003e449\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e2020-04-07\u003c/th\u003e\n      \u003ctd\u003e1409\u003c/td\u003e\n      \u003ctd\u003e39\u003c/td\u003e\n      \u003ctd\u003e26\u003c/td\u003e\n      \u003ctd\u003e65\u003c/td\u003e\n      \u003ctd\u003e776\u003c/td\u003e\n      \u003ctd\u003e27\u003c/td\u003e\n      \u003ctd\u003e518\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e2020-04-08\u003c/th\u003e\n      \u003ctd\u003e1423\u003c/td\u003e\n      \u003ctd\u003e9\u003c/td\u003e\n      \u003ctd\u003e5\u003c/td\u003e\n      \u003ctd\u003e14\u003c/td\u003e\n      \u003ctd\u003e876\u003c/td\u003e\n      \u003ctd\u003e29\u003c/td\u003e\n      \u003ctd\u003e518\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/div\u003e\n\n\n\n```\nab_regions.tail()\n```\n\n\n\n\n\u003cdiv\u003e\n\u003cstyle scoped\u003e\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n\u003c/style\u003e\n\u003ctable border=\"1\" class=\"dataframe\"\u003e\n  \u003cthead\u003e\n    \u003ctr style=\"text-align: right;\"\u003e\n      \u003cth\u003e\u003c/th\u003e\n      \u003cth\u003eCalgary_cumulative\u003c/th\u003e\n      \u003cth\u003eCentral_cumulative\u003c/th\u003e\n      \u003cth\u003eEdmont_cumulative\u003c/th\u003e\n      \u003cth\u003eNorth_cumulative\u003c/th\u003e\n      \u003cth\u003eSouth_cumulative\u003c/th\u003e\n      \u003cth\u003eUnknown_cumulative\u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003cth\u003e2020-04-04\u003c/th\u003e\n      \u003ctd\u003e778\u003c/td\u003e\n      \u003ctd\u003e61\u003c/td\u003e\n      \u003ctd\u003e315\u003c/td\u003e\n      \u003ctd\u003e75\u003c/td\u003e\n      \u003ctd\u003e19\u003c/td\u003e\n      \u003ctd\u003e2\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e2020-04-05\u003c/th\u003e\n      \u003ctd\u003e801\u003c/td\u003e\n      \u003ctd\u003e65\u003c/td\u003e\n      \u003ctd\u003e340\u003c/td\u003e\n      \u003ctd\u003e79\u003c/td\u003e\n      \u003ctd\u003e21\u003c/td\u003e\n      \u003ctd\u003e2\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e2020-04-06\u003c/th\u003e\n      \u003ctd\u003e821\u003c/td\u003e\n      \u003ctd\u003e65\u003c/td\u003e\n      \u003ctd\u003e348\u003c/td\u003e\n      \u003ctd\u003e86\u003c/td\u003e\n      \u003ctd\u003e22\u003c/td\u003e\n      \u003ctd\u003e2\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e2020-04-07\u003c/th\u003e\n      \u003ctd\u003e854\u003c/td\u003e\n      \u003ctd\u003e72\u003c/td\u003e\n      \u003ctd\u003e364\u003c/td\u003e\n      \u003ctd\u003e94\u003c/td\u003e\n      \u003ctd\u003e23\u003c/td\u003e\n      \u003ctd\u003e2\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e2020-04-08\u003c/th\u003e\n      \u003ctd\u003e860\u003c/td\u003e\n      \u003ctd\u003e72\u003c/td\u003e\n      \u003ctd\u003e368\u003c/td\u003e\n      \u003ctd\u003e95\u003c/td\u003e\n      \u003ctd\u003e26\u003c/td\u003e\n      \u003ctd\u003e2\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/div\u003e\n\n\n\n```\nab_testing.tail()\n```\n\n\n\n\n\u003cdiv\u003e\n\u003cstyle scoped\u003e\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n\u003c/style\u003e\n\u003ctable border=\"1\" class=\"dataframe\"\u003e\n  \u003cthead\u003e\n    \u003ctr style=\"text-align: right;\"\u003e\n      \u003cth\u003e\u003c/th\u003e\n      \u003cth\u003etest_count\u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003cth\u003e2020-04-04\u003c/th\u003e\n      \u003ctd\u003e1737\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e2020-04-05\u003c/th\u003e\n      \u003ctd\u003e1112\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e2020-04-06\u003c/th\u003e\n      \u003ctd\u003e1129\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e2020-04-07\u003c/th\u003e\n      \u003ctd\u003e1319\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e2020-04-08\u003c/th\u003e\n      \u003ctd\u003e459\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/div\u003e\n\n\n\nThese are all pandas DataFrames. For more info on using pandas check out the pandas [cookbook](https://pandas.pydata.org/pandas-docs/stable/user_guide/cookbook.html).\n\n## analysis\n\n\u003e these are functions that I have started working on for some quick analyses of the data. The main one being doubling rates\n\n### Doubling times\n\nthe `calculate_doublingtimes` function returns 2 columns.\n\n\u003e `dtime` is how many days our count has been doubling from the first reported case to get to todays case count\n\n\u003e `dtime_rw` is a rolling window calcualtion. So if you window is 6 days it looks at what our doubling rate, starting from the case count 6 days ago, would have to be to get to todays case count.\n\nI started off looking at the rolling window calculation. However the more I look into it the more I'm not happy with using the rolling window. Our information about Covid-19 cases are changing so rapidly, that the rolling window calculation tends to be too noisy and too optimistic to be useful. We can calculate both below and see what they look like\n\n```\ntotals_dt = covid_alberta.calculate_doublingtimes(ab_totals, col_suffix=\"cum_cases\", combine_df=False)\nregions_dt = covid_alberta.calculate_doublingtimes(ab_regions, col_suffix=\"cumulative\", combine_df=False)\ntotals_dt.tail()\n```\n\n\n\n\n\u003cdiv\u003e\n\u003cstyle scoped\u003e\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n\u003c/style\u003e\n\u003ctable border=\"1\" class=\"dataframe\"\u003e\n  \u003cthead\u003e\n    \u003ctr style=\"text-align: right;\"\u003e\n      \u003cth\u003e\u003c/th\u003e\n      \u003cth\u003edtime\u003c/th\u003e\n      \u003cth\u003edtime_rw\u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003cth\u003e2020-04-04\u003c/th\u003e\n      \u003ctd\u003e2.818897\u003c/td\u003e\n      \u003ctd\u003e7.119992\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e2020-04-05\u003c/th\u003e\n      \u003ctd\u003e2.897670\u003c/td\u003e\n      \u003ctd\u003e7.353586\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e2020-04-06\u003c/th\u003e\n      \u003ctd\u003e2.982973\u003c/td\u003e\n      \u003ctd\u003e9.613334\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e2020-04-07\u003c/th\u003e\n      \u003ctd\u003e3.059140\u003c/td\u003e\n      \u003ctd\u003e11.617191\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e2020-04-08\u003c/th\u003e\n      \u003ctd\u003e3.150442\u003c/td\u003e\n      \u003ctd\u003e17.176893\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/div\u003e\n\n\n\n```\nregions_dt.tail()\n```\n\n\n\n\n\u003cdiv\u003e\n\u003cstyle scoped\u003e\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n\u003c/style\u003e\n\u003ctable border=\"1\" class=\"dataframe\"\u003e\n  \u003cthead\u003e\n    \u003ctr style=\"text-align: right;\"\u003e\n      \u003cth\u003e\u003c/th\u003e\n      \u003cth\u003eCalgary_dtime\u003c/th\u003e\n      \u003cth\u003eCalgary_dtime_rw\u003c/th\u003e\n      \u003cth\u003eCentral_dtime\u003c/th\u003e\n      \u003cth\u003eCentral_dtime_rw\u003c/th\u003e\n      \u003cth\u003eEdmont_dtime\u003c/th\u003e\n      \u003cth\u003eEdmont_dtime_rw\u003c/th\u003e\n      \u003cth\u003eNorth_dtime\u003c/th\u003e\n      \u003cth\u003eNorth_dtime_rw\u003c/th\u003e\n      \u003cth\u003eSouth_dtime\u003c/th\u003e\n      \u003cth\u003eSouth_dtime_rw\u003c/th\u003e\n      \u003cth\u003eUnknown_dtime\u003c/th\u003e\n      \u003cth\u003eUnknown_dtime_rw\u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003cth\u003e2020-04-04\u003c/th\u003e\n      \u003ctd\u003e3.019693\u003c/td\u003e\n      \u003ctd\u003e7.296903\u003c/td\u003e\n      \u003ctd\u003e4.046714\u003c/td\u003e\n      \u003ctd\u003e14.735665\u003c/td\u003e\n      \u003ctd\u003e3.872364\u003c/td\u003e\n      \u003ctd\u003e5.864623\u003c/td\u003e\n      \u003ctd\u003e3.692514\u003c/td\u003e\n      \u003ctd\u003e8.141493\u003c/td\u003e\n      \u003ctd\u003e4.472769\u003c/td\u003e\n      \u003ctd\u003e7.609425\u003c/td\u003e\n      \u003ctd\u003e0\u003c/td\u003e\n      \u003ctd\u003e0\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e2020-04-05\u003c/th\u003e\n      \u003ctd\u003e3.110208\u003c/td\u003e\n      \u003ctd\u003e7.587349\u003c/td\u003e\n      \u003ctd\u003e4.151191\u003c/td\u003e\n      \u003ctd\u003e12.826571\u003c/td\u003e\n      \u003ctd\u003e3.956375\u003c/td\u003e\n      \u003ctd\u003e6.261873\u003c/td\u003e\n      \u003ctd\u003e3.807239\u003c/td\u003e\n      \u003ctd\u003e8.008629\u003c/td\u003e\n      \u003ctd\u003e4.553405\u003c/td\u003e\n      \u003ctd\u003e6.431655\u003c/td\u003e\n      \u003ctd\u003e0\u003c/td\u003e\n      \u003ctd\u003e0\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e2020-04-06\u003c/th\u003e\n      \u003ctd\u003e3.202070\u003c/td\u003e\n      \u003ctd\u003e9.970858\u003c/td\u003e\n      \u003ctd\u003e4.317239\u003c/td\u003e\n      \u003ctd\u003e18.637702\u003c/td\u003e\n      \u003ctd\u003e4.082834\u003c/td\u003e\n      \u003ctd\u003e8.636192\u003c/td\u003e\n      \u003ctd\u003e3.890285\u003c/td\u003e\n      \u003ctd\u003e7.959255\u003c/td\u003e\n      \u003ctd\u003e4.709120\u003c/td\u003e\n      \u003ctd\u003e6.000000\u003c/td\u003e\n      \u003ctd\u003e0\u003c/td\u003e\n      \u003ctd\u003e0\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e2020-04-07\u003c/th\u003e\n      \u003ctd\u003e3.286065\u003c/td\u003e\n      \u003ctd\u003e12.181763\u003c/td\u003e\n      \u003ctd\u003e4.376066\u003c/td\u003e\n      \u003ctd\u003e15.441420\u003c/td\u003e\n      \u003ctd\u003e4.189037\u003c/td\u003e\n      \u003ctd\u003e11.309771\u003c/td\u003e\n      \u003ctd\u003e3.966687\u003c/td\u003e\n      \u003ctd\u003e8.029614\u003c/td\u003e\n      \u003ctd\u003e4.863424\u003c/td\u003e\n      \u003ctd\u003e7.289318\u003c/td\u003e\n      \u003ctd\u003e0\u003c/td\u003e\n      \u003ctd\u003e0\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e2020-04-08\u003c/th\u003e\n      \u003ctd\u003e3.385243\u003c/td\u003e\n      \u003ctd\u003e19.656061\u003c/td\u003e\n      \u003ctd\u003e4.538143\u003c/td\u003e\n      \u003ctd\u003e20.885405\u003c/td\u003e\n      \u003ctd\u003e4.323639\u003c/td\u003e\n      \u003ctd\u003e15.835158\u003c/td\u003e\n      \u003ctd\u003e4.109679\u003c/td\u003e\n      \u003ctd\u003e9.387934\u003c/td\u003e\n      \u003ctd\u003e4.893159\u003c/td\u003e\n      \u003ctd\u003e8.566048\u003c/td\u003e\n      \u003ctd\u003e0\u003c/td\u003e\n      \u003ctd\u003e0\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/div\u003e\n\n\n\n## Plots\n\nHere is some of the plots I've used for looking at the data. For this example I'm using matplotlib. Plotly creates nice plots but is a little harder to include in this documentation since it's hosted on github pages. If you head over to [my website](www.tyleracorn.com) I'll post the plotly code and example of the interactive plots there.\n\n```\nimport matplotlib.pyplot as plt\n\n# Set defaults and settings\ndays_to_trim = 1\ndate_fmt = \"%B %d\"\n\n# Grab the data we want for the plots and trim the last day off\nplt_totals = ab_totals[:-days_to_trim]\nplt_total_dt = totals_dt[:-days_to_trim]\nplt_regions = ab_regions[:-days_to_trim]\nplt_regions_dt = regions_dt[:-days_to_trim]\n\n# use a format dictionary so I only have to set them in one location\n\nfmt = {'alb': {'x_data': plt_totals['cum_cases'],\n               'y_data': plt_total_dt['dtime'],\n               'last_date': plt_totals.index.strftime(date_fmt)[-1],\n               'annot_x': plt_totals['cum_cases'][-1],\n               'annot_y': plt_total_dt['dtime'][-1],\n               'color': 'green',\n               'label': 'Alberta'},\n       'cal': {'x_data': plt_regions['Calgary_cumulative'],\n               'y_data': plt_regions_dt['Calgary_dtime'],\n               'last_date': plt_regions.index.strftime(date_fmt)[-1],\n               'annot_x': plt_regions['Calgary_cumulative'][-1],\n               'annot_y': plt_regions_dt['Calgary_dtime'][-1],\n               'color': 'orange',\n               'label': 'Calgary'},\n       'edm': {'x_data': plt_regions['Edmont_cumulative'],\n               'y_data': plt_regions_dt['Edmont_dtime'],\n               'last_date': plt_regions.index.strftime(date_fmt)[-1],\n               'annot_x': plt_regions['Edmont_cumulative'][-1],\n               'annot_y': plt_regions_dt['Edmont_dtime'][-1],\n               'color': 'blue', \n               'label': 'Edmonton'},\n      }\n\n# Setup the plot\nfig, ax = plt.subplots(figsize=(8,6))\n\n# Create the scatter plots using a loop and the dictionary above\nfor rgn in ['alb', 'cal', 'edm']:\n    ax.plot(fmt[rgn]['x_data'], fmt[rgn]['y_data'], \n            c=fmt[rgn]['color'], label=fmt[rgn]['label'])\n\n# add an annotation to the last point\nfor rgn in ['alb', 'cal', 'edm']:\n    ax.plot(fmt[rgn]['annot_x'], fmt[rgn]['annot_y'], 'o', c=fmt[rgn]['color'])\n    ax.text(fmt[rgn]['annot_x'] - 60, fmt[rgn]['annot_y'] + 0.08, fmt[rgn]['last_date'], \n            fontdict={'color': fmt[rgn]['color'], 'size': 8, 'weight': 'bold'})\n# fancy up the plot\nax.grid(which='both', linestyle=(0, (5, 3)), lw=0.5)\nax.legend(frameon=True, fancybox=True, shadow=True)\nax.set_ylabel('Doubling Time (Days)', fontdict={'size': 9, 'family': 'sans-serif', 'style':'italic'})\nax.set_xlabel('Cumulative Case Count', fontdict={'size': 9, 'family': 'sans-serif', 'style':'italic'})\ntitle = ax.set_title(\"Alberta: Doubling Time by Cumulative Cases\",\n                     fontdict={'fontsize': 10, 'family': 'sans-serif', 'fontweight': 'bold'})\n```\n\n\n![png](docs/images/output_14_0.png)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftyleracorn%2Fcovid_alberta","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftyleracorn%2Fcovid_alberta","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftyleracorn%2Fcovid_alberta/lists"}