Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Boljše preverjanje datumov pri uvozu MIZŠ podatkov #103

Open
wants to merge 539 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 40 commits
Commits
Show all changes
539 commits
Select commit Hold shift + click to select a range
40c26a0
OstaniZdrav Data update 🤖
May 23, 2021
7c372ac
MIZŠ Data update 🤖
May 24, 2021
23410cb
OstaniZdrav Data update 🤖
May 24, 2021
6b608ad
OstaniZdrav Data update 🤖
May 25, 2021
f81225d
OstaniZdrav Data update 🤖
May 25, 2021
65e89d9
OstaniZdrav Data update 🤖
May 26, 2021
8a31ff3
MIZŠ Data update 🤖
May 26, 2021
e9412ce
MIZŠ Data update 🤖
May 26, 2021
28edf4b
OstaniZdrav Data update 🤖
May 26, 2021
60e92f8
OstaniZdrav Data update 🤖
May 26, 2021
7715c97
OstaniZdrav Data update 🤖
May 26, 2021
deb723e
OstaniZdrav Data update 🤖
May 27, 2021
e937fc9
OstaniZdrav Data update 🤖
May 27, 2021
578c9db
OstaniZdrav Data update 🤖
May 28, 2021
e62addf
OstaniZdrav Data update 🤖
May 28, 2021
a03df1c
OstaniZdrav Data update 🤖
May 29, 2021
c3de2b3
OstaniZdrav Data update 🤖
May 29, 2021
68b62e2
OstaniZdrav Data update 🤖
May 30, 2021
3390199
MIZŠ Data update 🤖
May 31, 2021
2ba3c14
OstaniZdrav Data update 🤖
May 31, 2021
1cddaf9
OstaniZdrav Data update 🤖
Jun 1, 2021
945f10b
MIZŠ Data update 🤖
Jun 2, 2021
ce2d4c3
OstaniZdrav Data update 🤖
Jun 3, 2021
d14706f
MIZŠ Data update 🤖
Jun 3, 2021
89cd27b
OstaniZdrav Data update 🤖
Jun 3, 2021
311c174
OstaniZdrav Data update 🤖
Jun 4, 2021
101671b
OstaniZdrav Data update 🤖
Jun 4, 2021
88770b6
OstaniZdrav Data update 🤖
Jun 5, 2021
e9f9781
OstaniZdrav Data update 🤖
Jun 6, 2021
1641670
MIZŠ Data update 🤖
Jun 7, 2021
1c54ea1
OstaniZdrav Data update 🤖
Jun 7, 2021
f56bcc2
OstaniZdrav Data update 🤖
Jun 8, 2021
1fd3ecf
OstaniZdrav Data update 🤖
Jun 8, 2021
75b57a6
MIZŠ Data update 🤖
Jun 8, 2021
3ebb9c4
OstaniZdrav Data update 🤖
Jun 8, 2021
3cb4336
OstaniZdrav Data update 🤖
Jun 9, 2021
155cec4
MIZŠ Data update 🤖
Jun 10, 2021
d067afc
OstaniZdrav Data update 🤖
Jun 10, 2021
19c49b5
OstaniZdrav Data update 🤖
Jun 11, 2021
aff462d
OstaniZdrav Data update 🤖
Jun 12, 2021
e4078d5
OstaniZdrav Data update 🤖
Jun 13, 2021
2878895
OstaniZdrav Data update 🤖
Jun 14, 2021
a1f7b35
MIZŠ Data update 🤖
Jun 15, 2021
1e1de89
OstaniZdrav Data update 🤖
Jun 15, 2021
e0b117b
OstaniZdrav Data update 🤖
Jun 16, 2021
eaf4d5a
MIZŠ Data update 🤖
Jun 17, 2021
f64b107
OstaniZdrav Data update 🤖
Jun 17, 2021
5a1aeb1
OstaniZdrav Data update 🤖
Jun 18, 2021
744d12d
MIZŠ Data update 🤖
Jun 18, 2021
d4cb6b6
OstaniZdrav Data update 🤖
Jun 18, 2021
6ce2a1b
OstaniZdrav Data update 🤖
Jun 19, 2021
d731856
OstaniZdrav Data update 🤖
Jun 19, 2021
d9f5228
OstaniZdrav Data update 🤖
Jun 20, 2021
e23f554
OstaniZdrav Data update 🤖
Jun 20, 2021
3b79986
OstaniZdrav Data update 🤖
Jun 21, 2021
0a1f40a
MIZŠ Data update 🤖
Jun 21, 2021
6290720
OstaniZdrav Data update 🤖
Jun 21, 2021
ba7ca0b
OstaniZdrav Data update 🤖
Jun 22, 2021
876d005
MIZŠ Data update 🤖
Jun 22, 2021
a4907b4
OstaniZdrav Data update 🤖
Jun 22, 2021
9ffd3f8
OstaniZdrav Data update 🤖
Jun 23, 2021
ad1b143
MIZŠ Data update 🤖
Jun 23, 2021
f135427
OstaniZdrav Data update 🤖
Jun 23, 2021
6b284ff
OstaniZdrav Data update 🤖
Jun 24, 2021
6933dba
OstaniZdrav Data update 🤖
Jun 24, 2021
a9062b2
OstaniZdrav Data update 🤖
Jun 24, 2021
4587cc9
OstaniZdrav Data update 🤖
Jun 25, 2021
a8f7376
OstaniZdrav Data update 🤖
Jun 25, 2021
2076729
OstaniZdrav Data update 🤖
Jun 26, 2021
20c8bb9
OstaniZdrav Data update 🤖
Jun 26, 2021
6b6c2c1
OstaniZdrav Data update 🤖
Jun 27, 2021
7eb4fc5
OstaniZdrav Data update 🤖
Jun 27, 2021
834c199
OstaniZdrav Data update 🤖
Jun 28, 2021
14c174e
MIZŠ Data update 🤖
Jun 28, 2021
f550a80
OstaniZdrav Data update 🤖
Jun 28, 2021
d573f40
OstaniZdrav Data update 🤖
Jun 29, 2021
cfa316a
OstaniZdrav Data update 🤖
Jun 29, 2021
1e7a477
OstaniZdrav Data update 🤖
Jun 30, 2021
65df474
MIZŠ Data update 🤖
Jun 30, 2021
6b16ae9
OstaniZdrav Data update 🤖
Jun 30, 2021
dc19225
OstaniZdrav Data update 🤖
Jul 1, 2021
80c5f17
OstaniZdrav Data update 🤖
Jul 1, 2021
b2d4041
OstaniZdrav Data update 🤖
Jul 2, 2021
c3bbd34
OstaniZdrav Data update 🤖
Jul 2, 2021
41a0071
OstaniZdrav Data update 🤖
Jul 3, 2021
c619dad
OstaniZdrav Data update 🤖
Jul 3, 2021
5603a9f
OstaniZdrav Data update 🤖
Jul 4, 2021
867d2e8
OstaniZdrav Data update 🤖
Jul 4, 2021
f06235b
OstaniZdrav Data update 🤖
Jul 5, 2021
89787ff
OstaniZdrav Data update 🤖
Jul 5, 2021
8b88744
OstaniZdrav Data update 🤖
Jul 6, 2021
144da92
OstaniZdrav Data update 🤖
Jul 6, 2021
4cf59ae
MIZŠ Data update 🤖
Jul 6, 2021
edda764
OstaniZdrav Data update 🤖
Jul 6, 2021
c1e955e
OstaniZdrav Data update 🤖
Jul 7, 2021
cf63cae
OstaniZdrav Data update 🤖
Jul 8, 2021
e19ae8a
OstaniZdrav Data update 🤖
Jul 9, 2021
9e95c66
OstaniZdrav Data update 🤖
Jul 9, 2021
cab6634
OstaniZdrav Data update 🤖
Jul 10, 2021
fa8d00f
OstaniZdrav Data update 🤖
Jul 10, 2021
8c2b667
OstaniZdrav Data update 🤖
Jul 10, 2021
6f57921
OstaniZdrav Data update 🤖
Jul 10, 2021
ba25258
OstaniZdrav Data update 🤖
Jul 11, 2021
a93ff50
OstaniZdrav Data update 🤖
Jul 11, 2021
4e03674
OstaniZdrav Data update 🤖
Jul 12, 2021
b8ea9fb
OstaniZdrav Data update 🤖
Jul 12, 2021
92aa83b
OstaniZdrav Data update 🤖
Jul 13, 2021
592d3bb
OstaniZdrav Data update 🤖
Jul 13, 2021
be032bd
OstaniZdrav Data update 🤖
Jul 14, 2021
2db8620
OstaniZdrav Data update 🤖
Jul 14, 2021
89e5138
OstaniZdrav Data update 🤖
Jul 15, 2021
2e314df
OstaniZdrav Data update 🤖
Jul 15, 2021
53becc5
OstaniZdrav Data update 🤖
Jul 15, 2021
9c7ceee
OstaniZdrav Data update 🤖
Jul 16, 2021
e92351d
OstaniZdrav Data update 🤖
Jul 16, 2021
e68897d
OstaniZdrav Data update 🤖
Jul 17, 2021
93d51f5
OstaniZdrav Data update 🤖
Jul 17, 2021
ec37f7e
OstaniZdrav Data update 🤖
Jul 18, 2021
c407608
OstaniZdrav Data update 🤖
Jul 18, 2021
1705584
OstaniZdrav Data update 🤖
Jul 19, 2021
7b55e57
OstaniZdrav Data update 🤖
Jul 19, 2021
be1f270
OstaniZdrav Data update 🤖
Jul 20, 2021
2fbf8da
OstaniZdrav Data update 🤖
Jul 20, 2021
de3416b
OstaniZdrav Data update 🤖
Jul 21, 2021
cad15dc
OstaniZdrav Data update 🤖
Jul 21, 2021
2eb7187
OstaniZdrav Data update 🤖
Jul 22, 2021
1ee8ab3
OstaniZdrav Data update 🤖
Jul 22, 2021
296e53f
OstaniZdrav Data update 🤖
Jul 23, 2021
15e94e7
OstaniZdrav Data update 🤖
Jul 23, 2021
dfe8e9e
OstaniZdrav Data update 🤖
Jul 24, 2021
bb43c82
OstaniZdrav Data update 🤖
Jul 24, 2021
69822d5
OstaniZdrav Data update 🤖
Jul 25, 2021
9e3d785
OstaniZdrav Data update 🤖
Jul 25, 2021
401d98a
OstaniZdrav Data update 🤖
Jul 26, 2021
7c6018c
OstaniZdrav Data update 🤖
Jul 26, 2021
b89d4af
OstaniZdrav Data update 🤖
Jul 27, 2021
a004c6c
OstaniZdrav Data update 🤖
Jul 27, 2021
b3fb159
OstaniZdrav Data update 🤖
Jul 28, 2021
13ed858
OstaniZdrav Data update 🤖
Jul 28, 2021
8caa74d
OstaniZdrav Data update 🤖
Jul 29, 2021
19f00c6
OstaniZdrav Data update 🤖
Jul 29, 2021
ed4ae13
OstaniZdrav Data update 🤖
Jul 29, 2021
823ccbb
OstaniZdrav Data update 🤖
Jul 30, 2021
7b37e00
OstaniZdrav Data update 🤖
Jul 30, 2021
cfca5f6
OstaniZdrav Data update 🤖
Jul 31, 2021
e008ba2
OstaniZdrav Data update 🤖
Jul 31, 2021
a0d17ed
OstaniZdrav Data update 🤖
Aug 1, 2021
f0a69af
OstaniZdrav Data update 🤖
Aug 1, 2021
b6a8256
OstaniZdrav Data update 🤖
Aug 2, 2021
2330f9f
OstaniZdrav Data update 🤖
Aug 2, 2021
2edb7b6
OstaniZdrav Data update 🤖
Aug 3, 2021
33aee64
OstaniZdrav Data update 🤖
Aug 3, 2021
1e6be96
OstaniZdrav Data update 🤖
Aug 4, 2021
0b9ac15
OstaniZdrav Data update 🤖
Aug 4, 2021
3a8708f
OstaniZdrav Data update 🤖
Aug 5, 2021
090f4e7
OstaniZdrav Data update 🤖
Aug 5, 2021
2db337a
OstaniZdrav Data update 🤖
Aug 6, 2021
8a4f410
OstaniZdrav Data update 🤖
Aug 6, 2021
f863b9f
OstaniZdrav Data update 🤖
Aug 7, 2021
2f9c340
OstaniZdrav Data update 🤖
Aug 7, 2021
efd649b
OstaniZdrav Data update 🤖
Aug 8, 2021
4c71b29
OstaniZdrav Data update 🤖
Aug 8, 2021
e1c1f4f
OstaniZdrav Data update 🤖
Aug 9, 2021
79c235a
OstaniZdrav Data update 🤖
Aug 9, 2021
3818ded
OstaniZdrav Data update 🤖
Aug 10, 2021
3cbe115
OstaniZdrav Data update 🤖
Aug 10, 2021
818a348
OstaniZdrav Data update 🤖
Aug 11, 2021
ef1d378
OstaniZdrav Data update 🤖
Aug 11, 2021
5462abb
OstaniZdrav Data update 🤖
Aug 12, 2021
ee8479a
OstaniZdrav Data update 🤖
Aug 12, 2021
b8c9dca
OstaniZdrav Data update 🤖
Aug 13, 2021
5ff0986
OstaniZdrav Data update 🤖
Aug 13, 2021
b363cf1
OstaniZdrav Data update 🤖
Aug 14, 2021
841db74
OstaniZdrav Data update 🤖
Aug 14, 2021
03f3509
OstaniZdrav Data update 🤖
Aug 15, 2021
3f30600
OstaniZdrav Data update 🤖
Aug 15, 2021
c283e8f
OstaniZdrav Data update 🤖
Aug 16, 2021
60e60e3
OstaniZdrav Data update 🤖
Aug 16, 2021
2b916f7
OstaniZdrav Data update 🤖
Aug 17, 2021
b836e30
OstaniZdrav Data update 🤖
Aug 17, 2021
a280b40
OstaniZdrav Data update 🤖
Aug 18, 2021
b79eb24
OstaniZdrav Data update 🤖
Aug 18, 2021
1e4c9c8
OstaniZdrav Data update 🤖
Aug 19, 2021
51e1c58
MIZŠ Data update 🤖
Aug 19, 2021
f29c4d3
OstaniZdrav Data update 🤖
Aug 19, 2021
2c3612d
OstaniZdrav Data update 🤖
Aug 20, 2021
9610186
OstaniZdrav Data update 🤖
Aug 20, 2021
d31a770
OstaniZdrav Data update 🤖
Aug 21, 2021
76ebdd9
OstaniZdrav Data update 🤖
Aug 21, 2021
cd5bebb
OstaniZdrav Data update 🤖
Aug 22, 2021
6e18cf7
OstaniZdrav Data update 🤖
Aug 22, 2021
e8c6b4d
OstaniZdrav Data update 🤖
Aug 23, 2021
8f28d36
OstaniZdrav Data update 🤖
Aug 23, 2021
342d3f6
OstaniZdrav Data update 🤖
Aug 24, 2021
a55608e
OstaniZdrav Data update 🤖
Aug 24, 2021
042aed6
OstaniZdrav Data update 🤖
Aug 25, 2021
3cc8fae
OstaniZdrav Data update 🤖
Aug 25, 2021
c6d6422
OstaniZdrav Data update 🤖
Aug 26, 2021
7dc10bf
OstaniZdrav Data update 🤖
Aug 26, 2021
60766c6
OstaniZdrav Data update 🤖
Aug 27, 2021
f62e1c1
OstaniZdrav Data update 🤖
Aug 27, 2021
ec4d8db
OstaniZdrav Data update 🤖
Aug 28, 2021
8a923f0
OstaniZdrav Data update 🤖
Aug 28, 2021
7408322
OstaniZdrav Data update 🤖
Aug 29, 2021
98cb10f
OstaniZdrav Data update 🤖
Aug 29, 2021
59b3ab3
OstaniZdrav Data update 🤖
Aug 30, 2021
2b02417
OstaniZdrav Data update 🤖
Aug 30, 2021
c53ba9d
OstaniZdrav Data update 🤖
Aug 31, 2021
8a47284
OstaniZdrav Data update 🤖
Aug 31, 2021
faac6ee
OstaniZdrav Data update 🤖
Sep 1, 2021
46289e7
OstaniZdrav Data update 🤖
Sep 1, 2021
04a906c
OstaniZdrav Data update 🤖
Sep 1, 2021
12b0171
OstaniZdrav Data update 🤖
Sep 2, 2021
8f9d4c3
OstaniZdrav Data update 🤖
Sep 2, 2021
57bd9af
OstaniZdrav Data update 🤖
Sep 2, 2021
ca11583
OstaniZdrav Data update 🤖
Sep 3, 2021
cd3283c
MIZŠ Data update 🤖
Sep 3, 2021
0197ea1
MIZŠ Data update 🤖
Sep 3, 2021
3a81bae
OstaniZdrav Data update 🤖
Sep 3, 2021
3ebd42d
OstaniZdrav Data update 🤖
Sep 4, 2021
1b6295e
OstaniZdrav Data update 🤖
Sep 4, 2021
d42e698
OstaniZdrav Data update 🤖
Sep 5, 2021
5319922
OstaniZdrav Data update 🤖
Sep 5, 2021
55bb88d
OstaniZdrav Data update 🤖
Sep 5, 2021
8965b1b
OstaniZdrav Data update 🤖
Sep 5, 2021
f42f99d
OstaniZdrav Data update 🤖
Sep 6, 2021
25424e7
OstaniZdrav Data update 🤖
Sep 6, 2021
da281ad
MIZŠ Data update 🤖
Sep 6, 2021
e480ae4
MIZŠ Data update 🤖
Sep 6, 2021
5539598
Merged upstream
ikolar Sep 6, 2021
4f94eb7
OstaniZdrav Data update 🤖
Sep 6, 2021
8a5abbb
OstaniZdrav Data update 🤖
Sep 7, 2021
de9dc14
Merge branch 'master' of github.com:ikolar/data
ikolar Sep 7, 2021
201aa3a
MIZŠ Data update 🤖
Sep 7, 2021
64fd252
OstaniZdrav Data update 🤖
Sep 7, 2021
ffdf20f
OstaniZdrav Data update 🤖
Sep 8, 2021
2736d2d
OstaniZdrav Data update 🤖
Sep 8, 2021
6eb59a7
MIZŠ Data update 🤖
Sep 9, 2021
59f0329
OstaniZdrav Data update 🤖
Sep 9, 2021
44c9990
OstaniZdrav Data update 🤖
Sep 10, 2021
168506d
MIZŠ Data update 🤖
Sep 10, 2021
e5e070d
OstaniZdrav Data update 🤖
Sep 10, 2021
0f0fb69
OstaniZdrav Data update 🤖
Sep 11, 2021
e4a5c1f
OstaniZdrav Data update 🤖
Sep 11, 2021
1c9bbfa
OstaniZdrav Data update 🤖
Sep 12, 2021
34205e8
Merge branch 'master' of github.com:ikolar/data
ikolar Sep 12, 2021
5559601
Dopolnil vaccination.csv s podatki o tem, koliko cepljenj je starih v…
ikolar Sep 12, 2021
0183614
Dodal izračun št. cepljenih, ki so bili cepljeni pred v zadnjih 1/2/3…
ikolar Sep 12, 2021
a4f0283
Posodobitev šifranta šol (dve novi šoli, nekaj popravkov naslovov, te…
ikolar Nov 12, 2021
6ad8d49
Merged with upstream.
ikolar Nov 12, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions csv/schools-absences.csv
Original file line number Diff line number Diff line change
Expand Up @@ -7601,8 +7601,8 @@ date,absent.from,absent.to,school_type,school,person_type,person_class,reason
2020-10-24,2020-10-25,2020-11-03,PV,19190,E,ZAVU,ZAVOKU
2020-10-24,2020-10-22,2020-11-01,PV,24276,E,PVV,PVOKU
2020-10-24,2020-10-20,2020-10-30,PV,3710,E,PVDS,OSOKU
2020-10-24,2020-10-21T00:00:00,2020-10-22,PV,9598,A,PVSO2,OSSUM
2020-10-24,2020-10-21T00:00:00,2020-10-22,PV,9598,A,PVSO2,OSSUM
2020-10-24,2020-10-21,2020-10-22,PV,9598,A,PVSO2,OSSUM
2020-10-24,2020-10-21,2020-10-22,PV,9598,A,PVSO2,OSSUM
2020-10-24,2020-10-19,2020-10-23,ZAV,1001,E,ZAVU,ZAVSUM
2020-10-24,2020-10-19,2020-10-23,ZAV,1001,E,ZAVU,ZAVSUM
2020-10-24,2020-10-19,2020-10-23,ZAV,1001,E,ZAVU,ZAVSUM
Expand Down Expand Up @@ -17448,7 +17448,7 @@ date,absent.from,absent.to,school_type,school,person_type,person_class,reason
2021-02-10,2021-02-05,2021-02-14,PV,20816,A,PVSO2,PVSUM
2021-02-10,2021-02-09,2021-02-18,PV,20816,A,PVSO2,PVSUM
2021-02-10,2021-02-09,2021-02-18,PV,20816,E,PVV,PVOKU
2021-02-10,2021-02-10,2201-02-18,PV,20816,E,PVV,PVSUM
2021-02-10,2021-02-10,2021-02-18,PV,20816,E,PVV,PVSUM
2021-02-10,2021-02-11,2021-02-14,PV,20816,E,PVV,PVSUM
2021-02-10,2021-02-11,2021-02-14,PV,20816,E,PVV,PVSUM
2021-02-10,2021-02-05,2021-02-15,PV,20915,E,PVV,OSOKU
Expand Down Expand Up @@ -18063,8 +18063,8 @@ date,absent.from,absent.to,school_type,school,person_type,person_class,reason
2021-02-15,2021-02-09,2021-02-11,PV,10050,E,PVV,PVSUM
2021-02-15,2021-02-09,2021-02-11,PV,10050,E,PVDS,PVSUM
2021-02-15,2021-02-09,2021-02-11,PV,10050,E,PVDS,PVSUM
2021-02-15,2021-02-12,2121-02-21,PV,10730,E,PVV,PVSUM
2021-02-15,2021-02-12,2121-02-21,PV,10730,E,PVDS,PVSUM
2021-02-15,2021-02-12,2021-02-21,PV,10730,E,PVV,PVSUM
2021-02-15,2021-02-12,2021-02-21,PV,10730,E,PVDS,PVSUM
2021-02-15,2021-02-09,2021-02-18,PV,1091,E,PVV,PVOKU
2021-02-15,2021-02-15,2021-02-25,PV,1135,E,PVDS,OSOKU
2021-02-15,2021-02-10,2021-02-19,PV,1150,A,PVSO1,OSSUM
Expand Down
4 changes: 4 additions & 0 deletions csv/schools-cases.csv.timestamp
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
<<<<<<< HEAD
1613568164
=======
1613568229
>>>>>>> d5e22fd290f15082b09a8f100618b4fe493b8a1f
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tole je ostanek conflict resolvinga... treba fixat

2 changes: 1 addition & 1 deletion csv/schools-regimes.csv
Original file line number Diff line number Diff line change
Expand Up @@ -2193,7 +2193,7 @@ date,changed.from,changed.to,school_type,school,person_class,attendees,regime,re
2021-02-15,2021-02-09,2021-02-18,OSPP,529,OSPP9,8,OSPPKAR,OSPPOKUU
2021-02-15,2021-02-09,2021-02-11,PV,10050,PVSO1,7,PVKAR,PVSUMV
2021-02-15,2021-02-09,2021-02-11,PV,10050,PVSO1,10,PVKAR,PVSUMV
2021-02-15,2021-02-12,2121-02-21,PV,10730,PVSO2,5,PVKAR,PVOKUUC
2021-02-15,2021-02-12,2021-02-21,PV,10730,PVSO2,5,PVKAR,PVOKUUC
2021-02-15,2021-02-12,2021-02-21,PV,1126,PVSO2,24,OSKAR,OSOKUUC
2021-02-15,2021-02-10,2021-02-19,PV,11691,PVSO2,11,PVKAR,PVOKUV
2021-02-15,2021-02-09,2021-02-10,PV,11909,PVSO1,6,PVKAR,PVSUMV
Expand Down
4 changes: 4 additions & 0 deletions ostanizdrav/merged.csv.timestamp
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
<<<<<<< HEAD
1613696247
=======
1613696318
>>>>>>> d5e22fd290f15082b09a8f100618b4fe493b8a1f
41 changes: 34 additions & 7 deletions schools/parse_mizs_csvs.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /bin/python

from datetime import datetime, timedelta
from datetime import datetime
from operator import itemgetter
import codecs
import csv
Expand Down Expand Up @@ -61,19 +61,45 @@ def get_sledilnik_key(d, mizs_key):

def reformat_dates(date_columns, row):
"""
Reformat the dates from a human-readable d.m.Y form into
the standard YMD form.
Reformat dates (DAT_OD, DAT_DO, DAT_POROCANJA) from a
human-readable d.m.Y form into the standard YMD form.
"""

# parse dates
for i in date_columns:
date = dateutil.parser.parse(row[i], dayfirst=True).date()
# fix errornous "0020" year entries

# the reporting app doen't seem to validate the year field
# sometimes, typos can happen
# fix some common ones
if date.year == 20:
date = datetime(2020, date.month, date.day)
date = datetime(2020, date.month, date.day).date()
elif date.year == 2121:
date = datetime(2021, date.month, date.day).date()
elif date.year == 2201:
date = datetime(2021, date.month, date.day).date()

if date.year < 2020 or date.year > 2021:
logger.warning("Suspicious date found in line: \n{}\n".format(row))
row[i] = date

# do some extra checks on the start and stop dates
start_date = row[date_columns[0]]
stop_date = row[date_columns[1]]
# start date should of course not come after the stop date
if start_date > stop_date:
logger.warning(
"Start date {} is after the stop date {} in line:\n{}".format(
start_date, stop_date, row
)
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be either

logger.warning(f'Start date {start_date} is after the stop date {stop_date} in line:\n{row}')

(shorter)... or ...

logger.warning('Start date %s is after the stop date %s in line:\n%s', start_date, stop_date, row)

to leverage filtering using logging services where you can do aggregations for this message regardless of parameter values.

# both should not be too far into the past nor the future
now = datetime.now().date()
if start_date.year < 2020 or (start_date - now).days > 10:
logger.warning(
"Weird start date {} found in line: \n{}".format(start_date, row)
)
elif stop_date.year < 2020 or (stop_date - now).days > 90:
logger.warning("Weird stop date {} found in line: \n{}".format(stop_date, row))


def parse_csv(url):
"""
Expand Down Expand Up @@ -215,6 +241,7 @@ def school_regimes_csv(outfile):
csvwriter.writeheader()
csvwriter.writerows(regimes)


if __name__ == "__main__":
dicts = load_dicts()

Expand Down