Skip to content

Commit

Permalink
dolaďování grafů, data do 24. 11. 2024
Browse files Browse the repository at this point in the history
  • Loading branch information
michalkasparek committed Nov 25, 2024
1 parent 1e73786 commit 521e672
Show file tree
Hide file tree
Showing 23 changed files with 316,231 additions and 320,048 deletions.
15 changes: 0 additions & 15 deletions 000_cekani.py

This file was deleted.

11 changes: 5 additions & 6 deletions 001_cd_scrapovani.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
kam = f"downloads/{datetime.now().strftime('%Y-%m-%d')}"
os.makedirs(kam, exist_ok=True)


def cd(odkud, kam, pocet_dni=0):

print(f"{odkud}-{kam} {pocet_dni} d")
Expand Down Expand Up @@ -91,7 +90,7 @@ def cd(odkud, kam, pocet_dni=0):

with open(
os.path.join(
f"downloads/{datetime.now().strftime('%Y-%m-%d')}",
kam,
f"cd_{odkud}_{kam}_D{pocet_dni:02}_{datetime.now().strftime('%Y-%m-%d_%H-%M-%S')}.html",
),
"w+",
Expand Down Expand Up @@ -141,17 +140,17 @@ def cd(odkud, kam, pocet_dni=0):
("Slavonice", "Plzeň"),
("Ústí nad Labem", "Dresden"),
("Brno", "Hamburg"),
("Brno", "Ljubljana"),
# ("Brno", "Ljubljana"),
("Olomouc", "Przemysl"),
("Ostrava", "Gdaňsk"),
# ("Ostrava", "Gdaňsk"),
("Pardubice", "Košice"),
("Praha", "Bern"),
("České Budějovice", "Zürich"),
("Praha", "Záhřeb"),
("Praha", "Lublaň"),
("Praha", "Amsterdam"),
("Praha", "Krakow"),
# ("Praha","Vratislav")
("Praha","Gdansk"),
("Praha","Vratislav")
]

random.shuffle(trasy_b)
Expand Down
105 changes: 0 additions & 105 deletions 001_cd_scrapovani_claude.txt

This file was deleted.

4 changes: 2 additions & 2 deletions 002_cd_cisteni.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@
"name": "stdout",
"output_type": "stream",
"text": [
"cd_2024-11-20.parquet\n",
"2024-11-20: 787\n"
"cd_2024-11-24.parquet\n",
"2024-11-24: 812\n"
]
}
],
Expand Down
2 changes: 1 addition & 1 deletion 004_rj_cisteni.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1249,7 +1249,7 @@
"2024-11-03: 0\n",
"2024-11-04: 0\n",
"2024-11-05: 0\n",
"2024-11-20: 940\n"
"2024-11-24: 756\n"
]
}
],
Expand Down
2 changes: 1 addition & 1 deletion 006_le_cisteni.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"2024-11-20: 270\n"
"2024-11-24: 270\n"
]
}
],
Expand Down
4 changes: 2 additions & 2 deletions 008_ar_cisteni.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"text": [
"<>:11: SyntaxWarning: invalid escape sequence '\\d'\n",
"<>:11: SyntaxWarning: invalid escape sequence '\\d'\n",
"C:\\Users\\micha\\AppData\\Local\\Temp\\ipykernel_23232\\1036985530.py:11: SyntaxWarning: invalid escape sequence '\\d'\n",
"C:\\Users\\micha\\AppData\\Local\\Temp\\ipykernel_25700\\1036985530.py:11: SyntaxWarning: invalid escape sequence '\\d'\n",
" datum = re.search(\"\\d{1,2}\\.\\s\\w{4,15}\\s20\\d{2}\", radek).group(0)\n"
]
}
Expand Down Expand Up @@ -528,7 +528,7 @@
"2024-11-04: 0\n",
"2024-11-05: 0\n",
"2024-11-06: 0\n",
"2024-11-20: 723\n"
"2024-11-24: 726\n"
]
}
],
Expand Down
54 changes: 35 additions & 19 deletions 050_spojeni.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@
"3 2024-11-07 18:\n",
"4 2024-11-07 18:\n",
" ... \n",
"15225 2024-11-20 10:\n",
"15226 2024-11-20 10:\n",
"15227 2024-11-20 00:\n",
"15228 2024-11-20 00:\n",
"15229 2024-11-20 00:\n",
"Name: oscrapovano_minuty, Length: 1363357, dtype: object"
"10259 2024-11-24 10:\n",
"10260 2024-11-24 10:\n",
"10261 2024-11-24 10:\n",
"10262 2024-11-24 19:\n",
"10263 2024-11-24 19:\n",
"Name: oscrapovano_minuty, Length: 1688934, dtype: object"
]
},
"execution_count": 4,
Expand Down Expand Up @@ -87,7 +87,7 @@
{
"data": {
"text/plain": [
"661211"
"812298"
]
},
"execution_count": 6,
Expand Down Expand Up @@ -123,6 +123,10 @@
" 2024-11-18 3310\n",
" 2024-11-19 3384\n",
" 2024-11-20 3393\n",
" 2024-11-21 3356\n",
" 2024-11-22 3589\n",
" 2024-11-23 3496\n",
" 2024-11-24 3394\n",
"LE 2024-11-07 332\n",
" 2024-11-08 1573\n",
" 2024-11-09 1873\n",
Expand All @@ -137,6 +141,10 @@
" 2024-11-18 1988\n",
" 2024-11-19 2050\n",
" 2024-11-20 2042\n",
" 2024-11-21 2123\n",
" 2024-11-22 2017\n",
" 2024-11-23 1951\n",
" 2024-11-24 2085\n",
"RJ 2024-11-06 3676\n",
" 2024-11-07 1853\n",
" 2024-11-08 11164\n",
Expand All @@ -152,6 +160,10 @@
" 2024-11-18 7927\n",
" 2024-11-19 14891\n",
" 2024-11-20 14477\n",
" 2024-11-21 10384\n",
" 2024-11-22 7936\n",
" 2024-11-23 13436\n",
" 2024-11-24 10115\n",
"ČD 2024-10-31 1325\n",
" 2024-11-01 13722\n",
" 2024-11-02 19225\n",
Expand All @@ -173,6 +185,10 @@
" 2024-11-18 21754\n",
" 2024-11-19 22402\n",
" 2024-11-20 21496\n",
" 2024-11-21 22217\n",
" 2024-11-22 21578\n",
" 2024-11-23 21450\n",
" 2024-11-24 21960\n",
"dtype: int64"
]
},
Expand Down Expand Up @@ -268,14 +284,14 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Before: 42215968\n",
"After: 5251224\n",
"Before: 42212588\n",
"After: 5249720\n",
"Before: 44052596\n",
"After: 5242387\n",
"Before: 38610880\n",
"After: 5242707\n"
"Before: 51765732\n",
"After: 6438988\n",
"Before: 51763674\n",
"After: 6437349\n",
"Before: 53857048\n",
"After: 6429946\n",
"Before: 47335774\n",
"After: 6430266\n"
]
}
],
Expand Down Expand Up @@ -307,7 +323,7 @@
{
"data": {
"text/plain": [
"(582443, 26)"
"714394"
]
},
"execution_count": 17,
Expand All @@ -316,7 +332,7 @@
}
],
"source": [
"df.shape"
"df.shape[0]"
]
},
{
Expand All @@ -328,7 +344,7 @@
{
"data": {
"text/plain": [
"(56715, 3)"
"61742"
]
},
"execution_count": 18,
Expand All @@ -337,7 +353,7 @@
}
],
"source": [
"df[['odjezd','odkud','kam']].drop_duplicates().shape"
"df[['odjezd','odkud','kam']].drop_duplicates().shape[0]"
]
},
{
Expand Down
Loading

0 comments on commit 521e672

Please sign in to comment.