Datasets:
Update README.md
Browse files
README.md
CHANGED
|
@@ -55,7 +55,30 @@ df.to_parquet('geonames_23_03_2025.parquet')
|
|
| 55 |
|
| 56 |
## Quality
|
| 57 |
|
| 58 |
-
Be warned, the quality - especially for other languages than English - might sometimes be low. Sometimes there are duplicates and very confusing entries.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
|
| 60 |
## Query with DuckDB
|
| 61 |
|
|
|
|
| 55 |
|
| 56 |
## Quality
|
| 57 |
|
| 58 |
+
1. Be warned, the quality - especially for other languages than English - might sometimes be low. Sometimes there are duplicates and very confusing entries.
|
| 59 |
+
2. There are obvious misses that could be cleaned with very simple processing. Example: filtering by country code germany, there is a point in Ukraine and France:
|
| 60 |
+
|
| 61 |
+
```python
|
| 62 |
+
import duckdb
|
| 63 |
+
import geopandas
|
| 64 |
+
from lonboard import viz
|
| 65 |
+
df = duckdb.sql(f"SELECT * FROM 'https://huggingface.co/datasets/do-me/Geonames/resolve/main/geonames_23_03_2025.parquet?download=true' WHERE \"8\" = 'DE' ").df() # you can add the country code to the query with AND \"8\" = 'GB'
|
| 66 |
+
gdf = geopandas.GeoDataFrame( df, geometry=geopandas.points_from_xy(x=df["5"], y=df["4"]))
|
| 67 |
+
gdf = gdf[~gdf.duplicated('1', keep=False)]
|
| 68 |
+
viz(
|
| 69 |
+
gdf,
|
| 70 |
+
scatterplot_kwargs={
|
| 71 |
+
"get_radius": 5, # radius value
|
| 72 |
+
"radius_units": "pixels", # use screen pixels instead of meters
|
| 73 |
+
"pickable": True, # ensure layer responds to pointer events
|
| 74 |
+
},
|
| 75 |
+
map_kwargs={
|
| 76 |
+
"show_tooltip": True, # render tooltip on hover
|
| 77 |
+
},
|
| 78 |
+
)
|
| 79 |
+
```
|
| 80 |
+
|
| 81 |
+

|
| 82 |
|
| 83 |
## Query with DuckDB
|
| 84 |
|