Skip to content

Commit 10e2568

Browse files
Julien RousselJulien Roussel
authored andcommitted
data folder problem solved
1 parent 1244366 commit 10e2568

File tree

3 files changed

+5
-12
lines changed

3 files changed

+5
-12
lines changed

.gitignore

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
#Ignore Data file
2-
/data
3-
4-
# Figures
5-
/figures
6-
qolmat/notebooks/figures
7-
81
# Byte-compiled / optimized / DLL files
92
__pycache__/
103
*.py[cod]

examples/benchmark.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -323,15 +323,13 @@ n_imputers = len(dict_imputers)
323323
fig = plt.figure(figsize=(6 * n_columns, 6))
324324
for i_col, col in enumerate(df_plot):
325325
ax = fig.add_subplot(1, n_columns, i_col + 1)
326-
values_orig = df_station[col]
327-
328-
acf = utils.acf(values_orig)
329-
330-
plt.plot(acf, color="black")
331326
for name_imputer, df_imp in dfs_imputed_station.items():
332327

333328
acf = utils.acf(df_imp[col])
334329
plt.plot(acf, label=name_imputer)
330+
values_orig = df_station[col]
331+
acf = utils.acf(values_orig)
332+
plt.plot(acf, color="black", lw=2, ls="--", label="original")
335333
plt.legend()
336334

337335
plt.savefig("figures/acf.png")

qolmat/utils/data.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ def get_data(name_data="Beijing", datapath: str = "data/", download: Optional[bo
3333
path_zip = os.path.join(datapath, zipname)
3434

3535
if not os.path.exists(path_zip + ".zip"):
36+
if not os.path.exists(datapath):
37+
os.mkdir(datapath)
3638
urllib.request.urlretrieve(urllink + zipname + ".zip", path_zip + ".zip")
3739

3840
with zipfile.ZipFile(path_zip + ".zip", "r") as zip_ref:

0 commit comments

Comments
 (0)