Skip to content

Commit

Permalink
Initial work on 🇵🇱 Poland
Browse files Browse the repository at this point in the history
  • Loading branch information
leonmelein committed Jul 18, 2024
1 parent d08102c commit 42cd6d2
Show file tree
Hide file tree
Showing 9 changed files with 1,153 additions and 24 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ __pycache__/
.ssl/
data/countries/dataset.sqlite3
env/
.zed/
.zed/
airflow/
Binary file modified data/dataset.sqlite3
Binary file not shown.
2 changes: 0 additions & 2 deletions data/init_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,3 @@
dbContext.execute("CREATE TABLE locations(id, name, alternate_name, lat, long)")
dbContext.execute("CREATE TABLE status(id, status, temperature, timestamp)")



2 changes: 1 addition & 1 deletion data/netherlands/NL-Sloterplas.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"\n",
"name = \"Sloterplas\"\n",
"id = str(uuid.uuid5(uuid.NAMESPACE_DNS, name))\n",
"lat, long = 52.3716536, 4.8153031\n"
"lat, long = 52.3712858,4.8242057\n"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion data/netherlands/NL-ZwemwaterNL.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.6"
"version": "3.12.4"
},
"orig_nbformat": 4,
"vscode": {
Expand Down
995 changes: 995 additions & 0 deletions data/poland/pl.ipynb

Large diffs are not rendered by default.

160 changes: 142 additions & 18 deletions data/united_kingdom/UK-SwimNI.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 4,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -81,7 +81,7 @@
" <td>54.668352</td>\n",
" <td>-5.637678</td>\n",
" <td>Excellent</td>\n",
" <td>2024-02-20T08:01:50+00:00</td>\n",
" <td>2024-03-06T08:01:42+00:00</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5</th>\n",
Expand All @@ -90,7 +90,7 @@
" <td>54.544500</td>\n",
" <td>-5.482600</td>\n",
" <td>Excellent</td>\n",
" <td>2024-02-20T08:01:57+00:00</td>\n",
" <td>2024-03-06T08:01:48+00:00</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
Expand All @@ -99,7 +99,7 @@
" <td>55.168300</td>\n",
" <td>-6.786300</td>\n",
" <td>Excellent</td>\n",
" <td>2024-02-20T08:02:02+00:00</td>\n",
" <td>2024-03-06T08:01:55+00:00</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6</th>\n",
Expand All @@ -108,7 +108,7 @@
" <td>54.213400</td>\n",
" <td>-5.886071</td>\n",
" <td>Excellent</td>\n",
" <td>2024-02-20T08:02:07+00:00</td>\n",
" <td>2024-03-06T08:02:00+00:00</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
Expand All @@ -117,7 +117,7 @@
" <td>55.205100</td>\n",
" <td>-6.645800</td>\n",
" <td>Excellent</td>\n",
" <td>2024-02-20T08:02:12+00:00</td>\n",
" <td>2024-03-06T08:02:05+00:00</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
Expand All @@ -126,7 +126,7 @@
" <td>55.060859</td>\n",
" <td>-6.054550</td>\n",
" <td>Excellent</td>\n",
" <td>2024-02-20T08:02:18+00:00</td>\n",
" <td>2024-03-06T08:02:11+00:00</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
Expand All @@ -144,15 +144,15 @@
"\n",
" location.longitude water_quality.classification water_quality.timestamp \n",
"id \n",
"4 -5.637678 Excellent 2024-02-20T08:01:50+00:00 \n",
"5 -5.482600 Excellent 2024-02-20T08:01:57+00:00 \n",
"1 -6.786300 Excellent 2024-02-20T08:02:02+00:00 \n",
"6 -5.886071 Excellent 2024-02-20T08:02:07+00:00 \n",
"2 -6.645800 Excellent 2024-02-20T08:02:12+00:00 \n",
"3 -6.054550 Excellent 2024-02-20T08:02:18+00:00 "
"4 -5.637678 Excellent 2024-03-06T08:01:42+00:00 \n",
"5 -5.482600 Excellent 2024-03-06T08:01:48+00:00 \n",
"1 -6.786300 Excellent 2024-03-06T08:01:55+00:00 \n",
"6 -5.886071 Excellent 2024-03-06T08:02:00+00:00 \n",
"2 -6.645800 Excellent 2024-03-06T08:02:05+00:00 \n",
"3 -6.054550 Excellent 2024-03-06T08:02:11+00:00 "
]
},
"execution_count": 8,
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -166,10 +166,134 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": []
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>name</th>\n",
" <th>temperature</th>\n",
" <th>location.latitude</th>\n",
" <th>location.longitude</th>\n",
" <th>water_quality.classification</th>\n",
" <th>water_quality.timestamp</th>\n",
" </tr>\n",
" <tr>\n",
" <th>id</th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>Ballyholme Beach</td>\n",
" <td>None</td>\n",
" <td>54.668352</td>\n",
" <td>-5.637678</td>\n",
" <td>Excellent</td>\n",
" <td>2024-03-06T08:01:42+00:00</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5</th>\n",
" <td>Ballywalter Beach</td>\n",
" <td>None</td>\n",
" <td>54.544500</td>\n",
" <td>-5.482600</td>\n",
" <td>Excellent</td>\n",
" <td>2024-03-06T08:01:48+00:00</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>Castlerock Beach</td>\n",
" <td>None</td>\n",
" <td>55.168300</td>\n",
" <td>-6.786300</td>\n",
" <td>Excellent</td>\n",
" <td>2024-03-06T08:01:55+00:00</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6</th>\n",
" <td>Newcastle Beach</td>\n",
" <td>None</td>\n",
" <td>54.213400</td>\n",
" <td>-5.886071</td>\n",
" <td>Excellent</td>\n",
" <td>2024-03-06T08:02:00+00:00</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>Portrush East/Curran Strand Beach</td>\n",
" <td>None</td>\n",
" <td>55.205100</td>\n",
" <td>-6.645800</td>\n",
" <td>Excellent</td>\n",
" <td>2024-03-06T08:02:05+00:00</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>Waterfoot Beach</td>\n",
" <td>None</td>\n",
" <td>55.060859</td>\n",
" <td>-6.054550</td>\n",
" <td>Excellent</td>\n",
" <td>2024-03-06T08:02:11+00:00</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" name temperature location.latitude \\\n",
"id \n",
"4 Ballyholme Beach None 54.668352 \n",
"5 Ballywalter Beach None 54.544500 \n",
"1 Castlerock Beach None 55.168300 \n",
"6 Newcastle Beach None 54.213400 \n",
"2 Portrush East/Curran Strand Beach None 55.205100 \n",
"3 Waterfoot Beach None 55.060859 \n",
"\n",
" location.longitude water_quality.classification water_quality.timestamp \n",
"id \n",
"4 -5.637678 Excellent 2024-03-06T08:01:42+00:00 \n",
"5 -5.482600 Excellent 2024-03-06T08:01:48+00:00 \n",
"1 -6.786300 Excellent 2024-03-06T08:01:55+00:00 \n",
"6 -5.886071 Excellent 2024-03-06T08:02:00+00:00 \n",
"2 -6.645800 Excellent 2024-03-06T08:02:05+00:00 \n",
"3 -6.054550 Excellent 2024-03-06T08:02:11+00:00 "
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df.sort_values(by=['name'], ascending=True)\n"
]
}
],
"metadata": {
Expand All @@ -188,7 +312,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.2"
"version": "3.12.4"
}
},
"nbformat": 4,
Expand Down
11 changes: 11 additions & 0 deletions init_db.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import sqlite3


db = sqlite3.connect("bathingWater.sqlite3")

dbContext = db.cursor()
# dbContext.execute("CREATE TABLE locations(id, name, alternate_name, description, url, lat, long)")
# dbContext.execute("CREATE TABLE status(id, status, temperature, timestamp)")

dbContext.execute("INSERT INTO locations VALUES (1, 'Sloterplas', 'Sloterpark', 'Zwemplas in Amsterdam Nieuw-West', 'https://amsterdam.nl', 52.3657703, 4.819712)")
dbContext.close()
2 changes: 1 addition & 1 deletion locations.geojson

Large diffs are not rendered by default.

0 comments on commit 42cd6d2

Please sign in to comment.