Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
hub-bla committed May 11, 2024
0 parents commit 28e2204
Show file tree
Hide file tree
Showing 23 changed files with 86,212 additions and 0 deletions.
12,153 changes: 12,153 additions & 0 deletions .ipynb_checkpoints/estates-checkpoint.geojson

Large diffs are not rendered by default.

1,279 changes: 1,279 additions & 0 deletions .ipynb_checkpoints/lockers_data-checkpoint.csv

Large diffs are not rendered by default.

4,500 changes: 4,500 additions & 0 deletions .ipynb_checkpoints/parcel_lockers-checkpoint.ipynb

Large diffs are not rendered by default.

1,240 changes: 1,240 additions & 0 deletions .ipynb_checkpoints/petrol_station_coords-checkpoint.ipynb

Large diffs are not rendered by default.

77 changes: 77 additions & 0 deletions .ipynb_checkpoints/poznan_petrol_stations-checkpoint.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
longitude,latitude,ADRES
16.844053485045464,52.35333034999999,GŁOGOWSKA 429
16.9467307,52.4309675,SERBSKA 24
16.8890053,52.4066757,STANISŁAWA PRZYBYSZEWSKIEGO 39A
16.9019178,52.4538917,OBORNICKA 300
16.9938282,52.3828629,SZWAJCARSKA 14
16.99204639847367,52.39305925,SZWAJCARSKA 1
16.975640492018158,52.3109205,SYPNIEWO 4
16.88637915719044,52.3784018,CZECHOSŁOWACKA 108
16.8840061,52.3823898,GŁOGOWSKA 260 (268)
16.9532955,52.4052588,JANA PAWŁA II 12
16.9434083,52.3845184,ZAMENHOFA 138
16.9661004,52.3894102,KRZYWOUSTEGO 309
16.8915494,52.4605282,OBORNICKA 337
16.910266,52.4435656,WŁOŚCIAŃSKA 6
16.913771320772618,52.437151400000005,AL. SOLIDARNOŚCI 51
16.86958072995735,52.3964369,GRUNWALDZKA 104
16.923513272308014,52.4352559,AL. SOLIDARNOSCI 48
16.928943065181613,52.45161445,UMULTOWSKA 32
16.8294463,52.4150467,BUKOWSKA 285
16.9775331,52.4259486,BAŁTYCKA 34
16.8285935,52.2302134,MIESZKA I 40
16.9982025,52.35191,BOLESŁAWA KRZYWOUSTEGO 135
16.904411220735383,52.450790999999995,OBORNICKA 263
16.8478093,52.4300016,DĄBROWSKIEGO 315
16.907805660690265,52.45955655,SZYMANOWSKIEGO 13
16.8636103,52.3828687,JAWORNICKA 58
16.914403649999997,52.436225300000004,SOLIDARNOŚCI 55
16.8367432,52.4318475,DĄBROWSKIEGO 381A
16.885633637386942,52.393729,CHOCISZEWSKIEGO 49
16.9553417,52.4095312,JANA PAWŁA II 2
16.9363623,52.3981185,KRÓLOWEJ JADWIGI 15
16.9441431,52.4428034,NARAMOWICKA 131
16.8911938,52.416093,STEFANA ŻEROMSKIEGO 3
16.973312264863445,52.3822564,BOBRZAŃSKA 21
16.981165785784313,52.3917119,CHARTOWO 21
16.96089306732516,52.38631565,PIŁSUDSKIEGO 110
16.9141635,52.4438933,WOJCIECHOWSKIEGO 4
16.933895776195595,52.41139325,MAŁE GARBARY 1A
16.9060299,52.4159743,KOŚCIELNA 35
16.8660404,52.3915292,JUGOSŁOWIAŃSKA 33A
16.9030364,52.4579381,STRÓŹYŃSKIEGO 21A
16.9350574,52.4269732,MURAWA 1
16.9215862,52.4006424,TOPOLOWA 11
16.834629421085943,52.3542662,GŁOGOWSKA 432
16.8828075,52.3825463,ZGODA 19
16.957989056212078,52.3766349,KURLANDZKA 2
16.865,52.396,GRUNWALDZKA 108
16.80094674784185,52.4337828,DĄBROWSKIEGO 543
16.9063302,52.4423631,JURASZÓW 22
16.9953387,52.4095058,WARSZAWSKA 142
16.9506683,52.4322832,SERBSKA 7
16.9413605,52.3761384,ROMANA MAYA 1
16.8996957,52.382164,GÓRECKA 25
17.035163431882054,52.40837665,WARSZAWSKA 349
16.8935393,52.3751872,CZECHOSŁOWACKA 102
16.977479612711818,52.42680625,BAŁTYCKA 37
16.8743758,52.3781113,GŁOGOWSKA 232/234
16.9117432012196,52.3864369,TRAUGUTTA 1/3
16.9299984,52.4438678,UMULTOWSKA 2
16.9511628,52.3958177,RONDO RATAJE
16.8682971,52.4105909,BUŁGARSKA 119
16.910307008835353,52.44458095,WOJCIECHOWSKIEGO 7/17
16.91029650275926,52.44288795,LECHICKA 2
16.874312316755116,52.3788968,GŁOGOWSKA 218
16.918172245834533,52.42652625,PIĄTKOWSKA 68
17.008334,52.4101079,WARSZAWSKA 246
16.991705768932956,52.3713094,BODAWSKA 4
16.943002,52.3835842,ZAMENHOFA 140
16.8288414,52.3755365,WOŁCZYŃSKA 50
16.808750300404647,52.4311331,WICHROWA 1
16.966738544796605,52.426812749999996,BAŁTYCKA 4A
16.9945955,52.3610325,KRZYWOUSTEGO 121
17.27705,52.47018,MIESZKA I 28
16.911067298690114,52.38572525,HETMAŃSKA 82
16.915662284687713,52.3841673,HETMAŃSKA 98
16.9731018,52.4099817,WARSZAWSKA 71/73
21,500 changes: 21,500 additions & 0 deletions .ipynb_checkpoints/predicting_parcel_lockers_location-checkpoint.ipynb

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions .ipynb_checkpoints/requirements-checkpoint.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
selenium
webdriver-manager
pandas
jupyter
chardet
geopandas
folium
matplotlib
tabula-py
seaborn
43 changes: 43 additions & 0 deletions .ipynb_checkpoints/residents-checkpoint.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
,Nazwa osiedla,Powierzchnia w km2,Liczba mieszkańców*,Gęstość zaludnienia
0,"Antoninek-Zieliniec-Kobylepole","20,54",9837,"478,92"
1,Chartowo,"4,49",22110,"4924,28"
2,Fabianowo-Kotowo,"7,10",1771,"249,44"
3,Główna,"6,82",4507,"660,85"
4,Głuszyna,"14,43",3875,"268,54"
5,Górczyn,"4,33",12414,"2866,97"
6,Grunwald Południe,"3,83",23951,"6253,52"
7,Grunwald Północ,"0,76",12830,"16881,58"
8,"Jana III Sobieskiego iMarysieńki","0,79",9151,"11583,54"
9,Jeżyce,"1,98",21611,"10914,65"
10,Junikowo,"5,29",9889,"1869,38"
11,Kiekrz,"10,25",1842,"179,71"
12,"Krzesiny-Pokrzywno-Garaszewo","9,99",2265,"226,73"
13,Krzyżowniki-Smochowice,"10,71",7948,"742,11"
14,Kwiatowe,"2,31",4545,"1967,53"
15,Ławica,"13,94",7898,"566,57"
16,Morasko-Radojewo,"18,03",2774,"153,85"
17,Naramowice,"7,21",17873,"2478,92"
18,"Nowe WinogradyPołudnie","1,14",13437,"11786,84"
19,Nowe Winogrady Północ,"1,14",15369,"13481,58"
20,Nowe Winogrady Wschód,"0,47",5692,"12110,64"
21,Ogrody,"1,95",5896,"3023,59"
22,"Otrów Tumski- Śródka-Zawady-Komandoria","3,36",5942,"1768,45"
23,Piątkowo,"3,84",34066,"8871,35"
24,Rataje,"5,20",33278,"6399,62"
25,Sołacz,"5,54",4882,"881,23"
26,Stare Miasto,"3,91",24819,"6347,57"
27,Stare Winogrady,"3,48",8272,"2377,01"
28,"Starołęka-Minikowo-Marlewo","13,48",9824,"728,78"
29,Stary Grunwald,"0,63",3035,"4817,46"
30,Strzeszyn,"12,00",8665,"722,08"
31,"Szczepankowo-Spławie-Krzesinki","18,44",7563,"410,14"
32,Św. Łazarz,"3,70",29791,"8051,62"
33,Świerczewo,"3,94",13324,"3381,73"
34,Umultowo,"6,12",4481,"732,19"
35,"Warszawskie-Pomet-Maltańskie","5,85",7077,"1209,74"
36,Wilda,"6,90",26380,"3823,19"
37,Winiary,"2,17",13183,"6075,12"
38,Wola,"3,27",5175,"1582,57"
39,Zielony Dębiec,"4,12",12267,"2977,43"
40,Żegrze,"3,15",16426,"5214,60"
41,Podolany,"5,30",8528,"1609,06"
Expand Down
68 changes: 68 additions & 0 deletions .ipynb_checkpoints/residents_pdf_to_csv-checkpoint.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 19,
"id": "8fd6159b-b932-4b81-a09f-40594f118b40",
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"C:\\Users\\Hubert\\anaconda3\\envs\\paczkomaty\\lib\\site-packages\\tabula\\io.py:1045: FutureWarning: errors='ignore' is deprecated and will raise in a future version. Use to_numeric without passing `errors` and catch exceptions explicitly instead\n",
" df[c] = pd.to_numeric(df[c], errors=\"ignore\")\n"
]
}
],
"source": [
"from tabula import read_pdf\n",
"from tabulate import tabulate\n",
"import pandas as pd\n",
"\n",
"#reads table from pdf file\n",
"residents = read_pdf(\"residents.pdf\",pages=\"all\") #address of pdf file\n",
"\n",
"columns = list(residents[0].columns)\n",
"\n",
"extra_row = list(residents[1].columns)\n",
"residents[1] = residents[1].rename(columns={f'{prev}': new for prev, new in zip(extra_row, columns)})\n",
"\n",
"# insert to 0 index\n",
"residents[1].loc[-1] = extra_row #add row with index -1\n",
"residents[1].index = residents[1].index + 1 # shift indices so -1 is now 0\n",
"residents[1] = residents[1].sort_index() # sort by index\n",
"\n",
"residents = pd.concat(residents, ignore_index=True,axis=0)\n",
"residents['Nazwa osiedla'] = residents['Nazwa osiedla'].apply(lambda estate: estate.replace('\\r', ''))\n",
"\n",
"#change decimals to floats\n",
"residents['Powierzchnia w km2'] = pd.to_numeric(residents['Powierzchnia w km2'].apply(lambda s: s.replace(',', '.')))\n",
"residents['Gęstość zaludnienia'] = pd.to_numeric(residents['Gęstość zaludnienia'].apply(lambda s: s.replace(',', '.')))\n",
"\n",
"residents.to_csv('residents.csv', index=False)\n"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.13"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
Loading

0 comments on commit 28e2204

Please sign in to comment.