Skip to content

Commit

Permalink
Merge branch 'master' into refactor
Browse files Browse the repository at this point in the history
# Conflicts:
#	.pre-commit-config.yaml
#	covid19_inference/model/utility.py
#	scripts/interactive/example_bundeslaender.ipynb
#	scripts/interactive/example_one_bundesland.ipynb
  • Loading branch information
jdehning committed Mar 1, 2023
2 parents 2bbbfac + 165e504 commit 7649efd
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/psf/black
rev: 22.10.0
rev: 23.1.0
hooks:
- id: black
language_version: python3
Expand Down
5 changes: 2 additions & 3 deletions covid19_inference/data_retrieval/_RKI.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,12 @@ def _to_iso(self):
df = self.data
if "Meldedatum" in df.columns:
df["date"] = df["Meldedatum"].apply(
lambda x: datetime.datetime.strptime(x, "%Y-%m-%d")
lambda x: datetime.datetime.strptime(x, "%Y/%m/%d 00:00:00")
)
df = df.drop(columns="Meldedatum")
if "Refdatum" in df.columns:
df["date_ref"] = df["Refdatum"].apply(
lambda x: datetime.datetime.strptime(x, "%Y-%m-%d")
lambda x: datetime.datetime.strptime(x, "%Y/%m/%d 00:00:00")
)
df = df.drop(columns="Refdatum")

Expand Down Expand Up @@ -187,7 +187,6 @@ def __download_via_rest_api(self, try_max=10):

# Fills DF with data from all landkreise
for idlandkreis in unique_ids:

url_str = (
"https://services7.arcgis.com/mOBPykOjAyBO2ZKk/ArcGIS/rest/services/RKI_COVID19/FeatureServer/0//query?where=IdLandkreis%3D"
+ idlandkreis
Expand Down
8 changes: 7 additions & 1 deletion scripts/interactive/example_one_bundesland.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,13 @@
"metadata": {},
"outputs": [],
"source": [
"!pip install covid19_inference"
"#optional (if not cloned i.e. running in colab)\n",
"# !pip install covid19_inference\n",
"%load_ext autoreload\n",
"%autoreload 2\n",
"import aesara\n",
"aesara.config.mode = \"NUMBA\"\n",
"import pymc as pm"
]
},
{
Expand Down

0 comments on commit 7649efd

Please sign in to comment.