Datasets:
Update README.md
Browse files
README.md
CHANGED
@@ -10,13 +10,41 @@ task_categories:
|
|
10 |
tags:
|
11 |
- geospatial
|
12 |
---
|
13 |
-
# Dataset Card for Flickr
|
14 |
|
15 |
217.646.487 images with lat lon coordinates from Flickr. This repo is a filtered version of https://huggingface.co/datasets/bigdata-pw/Flickr for all rows containing a valid lat lon pair.
|
16 |
|
17 |
-
|
18 |

|
19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
## Filter Process
|
21 |
|
22 |
It was harder than expected. The main problem is that sometimes the connection to HF hub breaks. Afaik DuckDB cannot quite deal with this very well, so this code does not work:
|
|
|
10 |
tags:
|
11 |
- geospatial
|
12 |
---
|
13 |
+
# Dataset Card for Flickr-Geo
|
14 |
|
15 |
217.646.487 images with lat lon coordinates from Flickr. This repo is a filtered version of https://huggingface.co/datasets/bigdata-pw/Flickr for all rows containing a valid lat lon pair.
|
16 |
|
|
|
17 |

|
18 |
|
19 |
+
## Load and Visualize
|
20 |
+
|
21 |
+
Load the data (2s on my system) with DuckDB:
|
22 |
+
|
23 |
+
```python
|
24 |
+
import duckdb
|
25 |
+
df = duckdb.sql("""
|
26 |
+
SELECT CAST(latitude AS DOUBLE) AS latitude,
|
27 |
+
CAST(longitude AS DOUBLE) AS longitude
|
28 |
+
FROM 'reduced_flickr_data/*.parquet'
|
29 |
+
""").df()
|
30 |
+
df
|
31 |
+
|
32 |
+
```
|
33 |
+
|
34 |
+
Create datashader plot in 1s with:
|
35 |
+
|
36 |
+
```python
|
37 |
+
import datashader as ds, colorcet
|
38 |
+
cvs = ds.Canvas(plot_width=2000, plot_height=1000)
|
39 |
+
agg = cvs.points(df, 'longitude', 'latitude')
|
40 |
+
img = ds.tf.shade(agg, cmap=colorcet.fire, how='log')
|
41 |
+
img
|
42 |
+
|
43 |
+
# export with
|
44 |
+
# from datashader.utils import export_image
|
45 |
+
# export_image(img, "out", background="white", export_path=".")
|
46 |
+
```
|
47 |
+
|
48 |
## Filter Process
|
49 |
|
50 |
It was harder than expected. The main problem is that sometimes the connection to HF hub breaks. Afaik DuckDB cannot quite deal with this very well, so this code does not work:
|