parquet-converter commited on
Commit
4a84f25
·
1 Parent(s): 6d2f0f7

Update parquet files

Browse files
README.md DELETED
@@ -1,80 +0,0 @@
1
- ---
2
- dataset_info:
3
- features:
4
- - name: geonameid
5
- dtype: int64
6
- - name: name
7
- dtype: string
8
- - name: asciiname
9
- dtype: string
10
- - name: alternatenames
11
- dtype: string
12
- - name: latitude
13
- dtype: float64
14
- - name: longitude
15
- dtype: float64
16
- - name: feature_class
17
- dtype: string
18
- - name: feature_code
19
- dtype: string
20
- - name: country_code
21
- dtype: string
22
- - name: cc2
23
- dtype: string
24
- - name: admin1_code
25
- dtype: string
26
- - name: admin2_code
27
- dtype: string
28
- - name: admin3_code
29
- dtype: string
30
- - name: admin4_code
31
- dtype: string
32
- - name: population
33
- dtype: int64
34
- - name: elevation
35
- dtype: float64
36
- - name: dem
37
- dtype: int64
38
- - name: timezone
39
- dtype: string
40
- - name: modification_date
41
- dtype: string
42
- splits:
43
- - name: train
44
- num_bytes: 2378719253
45
- num_examples: 12368001
46
- download_size: 824343833
47
- dataset_size: 2378719253
48
- ---
49
- # Dataset Card for "geonames"
50
-
51
- [More Information needed](https://github.com/huggingface/datasets/blob/main/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
52
-
53
- [Source](https://download.geonames.org/export/dump/)
54
-
55
- ```
56
- "geonameid", # integer id of record in geonames database
57
- "name", # name of geographical point (utf8) varchar(200)
58
- "asciiname", # name of geographical point in plain ascii characters, varchar(200)
59
- "alternatenames",
60
- # alternatenames, comma separated, ascii names automatically transliterated, convenience attribute from alternatename table, varchar(10000)
61
- "latitude", # latitude in decimal degrees (wgs84)
62
- "longitude", # longitude in decimal degrees (wgs84)
63
- "feature_class", # see http://www.geonames.org/export/codes.html, char(1)
64
- "feature_code", # see http://www.geonames.org/export/codes.html, varchar(10)
65
- "country_code", # ISO-3166 2-letter country code, 2 characters
66
- "cc2",
67
- # alternate country codes, comma separated, ISO-3166 2-letter country code, 200 characters
68
- "admin1_code",
69
- # fipscode (subject to change to iso code), see exceptions below, see file admin1Codes.txt for display names of this code; varchar(20)
70
- "admin2_code",
71
- # code for the second administrative division, a county in the US, see file admin2Codes.txt; varchar(80)
72
- "admin3_code", # code for third level administrative division, varchar(20)
73
- "admin4_code", # code for fourth level administrative division, varchar(20)
74
- "population", # bigint (8 byte int)
75
- "elevation", # in meters, integer
76
- "dem",
77
- # digital elevation model, srtm3 or gtopo30, average elevation of 3''x3'' (ca 90mx90m) or 30''x30'' (ca 900mx900m) area in meters, integer. srtm processed by cgiar/ciat.
78
- "timezone", # the iana timezone id (see file timeZone.txt) varchar(40)
79
- "modification_date", # date of last modification in yyyy-MM-dd format"
80
- ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
data/train-00004-of-00005-ee1f536ecc1b7b46.parquet DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:0a7fa5591609ac014eed2c51a48b620c410f2261fab6b12445a6c9826535867a
3
- size 156371467
 
 
 
 
data/train-00003-of-00005-b6f64b7aa9afbd04.parquet → default/geonames-train-00000-of-00005.parquet RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:34df2b1a2997a107bba9e378d5808a4ae86bc203225e22c1ccc44732e6d45531
3
- size 168460134
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bf79d142a143084f20c0fc8f91c4b87add02b7a6bce6d2ffa20cc65f61bf16e7
3
+ size 158534739
data/train-00000-of-00005-3da75cb6dc67210c.parquet → default/geonames-train-00001-of-00005.parquet RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:44b01d0c6553db297d9471507cf8a8d08702b04ec0f1753c59bb1b52f44bb0af
3
- size 162972880
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f141cd8871fb4f5adf90cced3609b532a212522c61190085b95b381004ae72dd
3
+ size 162318308
data/train-00001-of-00005-284ffdeed116289c.parquet → default/geonames-train-00002-of-00005.parquet RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:6417108435f40379b8c565e00ad4d83dab0ee1b1872ad772ef5cc02803b2789d
3
- size 161236250
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:590c90c1762c88abd8ba11064a4da964a19d9152a6675070719e605d917aa6ae
3
+ size 164663622
data/train-00002-of-00005-2f05dda1564d24eb.parquet → default/geonames-train-00003-of-00005.parquet RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:8320ce19e60a8264144b3029d7a9f8af632129b795e6477343d2966e9019db69
3
- size 175303102
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5271a56d2ffe5ef6378564d976c31e457dd48f53f5d10e0524dba81f30ac420a
3
+ size 158234599
default/geonames-train-00004-of-00005.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:77fbcdb7675297de01ce06d3895d38ad5e8939b8a898c19c3eb34cd385cc9a77
3
+ size 148581420
geonames_generate.py DELETED
@@ -1,113 +0,0 @@
1
- #!/usr/bin/env python3
2
- # -*- coding: utf-8 -*-
3
- import os
4
- from functools import partial
5
- from pathlib import Path
6
-
7
- import datasets
8
- import pandas as pd
9
- from datasets import DatasetDict, load_dataset
10
-
11
-
12
- VERSION = datasets.Version("0.0.1")
13
-
14
- AVAILABLE_DATASETS = {
15
- 'geonames': 'https://download.geonames.org/export/dump/allCountries.zip',
16
- 'alternateNames': 'https://download.geonames.org/export/dump/alternateNames.zip',
17
- }
18
- FIELDS = [
19
- "geonameid", # integer id of record in geonames database
20
- "name", # name of geographical point (utf8) varchar(200)
21
- "asciiname", # name of geographical point in plain ascii characters, varchar(200)
22
- "alternatenames",
23
- # alternatenames, comma separated, ascii names automatically transliterated, convenience attribute from alternatename table, varchar(10000)
24
- "latitude", # latitude in decimal degrees (wgs84)
25
- "longitude", # longitude in decimal degrees (wgs84)
26
- "feature_class", # see http://www.geonames.org/export/codes.html, char(1)
27
- "feature_code", # see http://www.geonames.org/export/codes.html, varchar(10)
28
- "country_code", # ISO-3166 2-letter country code, 2 characters
29
- "cc2",
30
- # alternate country codes, comma separated, ISO-3166 2-letter country code, 200 characters
31
- "admin1_code",
32
- # fipscode (subject to change to iso code), see exceptions below, see file admin1Codes.txt for display names of this code; varchar(20)
33
- "admin2_code",
34
- # code for the second administrative division, a county in the US, see file admin2Codes.txt; varchar(80)
35
- "admin3_code", # code for third level administrative division, varchar(20)
36
- "admin4_code", # code for fourth level administrative division, varchar(20)
37
- "population", # bigint (8 byte int)
38
- "elevation", # in meters, integer
39
- "dem",
40
- # digital elevation model, srtm3 or gtopo30, average elevation of 3''x3'' (ca 90mx90m) or 30''x30'' (ca 900mx900m) area in meters, integer. srtm processed by cgiar/ciat.
41
- "timezone", # the iana timezone id (see file timeZone.txt) varchar(40)
42
- "modification_date", # date of last modification in yyyy-MM-dd format"
43
- ]
44
-
45
-
46
- class GeonamesDataset(datasets.GeneratorBasedBuilder):
47
- """GeonamesDataset dataset."""
48
-
49
- @staticmethod
50
- def load(data_name_config: str = "geonames") -> DatasetDict:
51
- ds = load_dataset(__file__, data_name_config)
52
- return ds
53
-
54
- def _info(self):
55
- return datasets.DatasetInfo(
56
- description="",
57
- features=datasets.Features(
58
- {
59
- "geonameid": datasets.Value("string"),
60
- "name": datasets.Value("string"),
61
- "asciiname": datasets.Value("string"),
62
- "alternatenames": datasets.Value("string"),
63
- "latitude": datasets.Value("string"),
64
- "longitude": datasets.Value("string"),
65
- "feature_class": datasets.Value("string"),
66
- "feature_code": datasets.Value("string"),
67
- "country_code": datasets.Value("string"),
68
- "cc2": datasets.Value("string"),
69
- "admin1_code": datasets.Value("string"),
70
- "admin2_code": datasets.Value("string"),
71
- "admin3_code": datasets.Value("string"),
72
- "admin4_code": datasets.Value("string"),
73
- "population": datasets.Value("string"),
74
- "elevation": datasets.Value("string"),
75
- "dem": datasets.Value("string"),
76
- "timezone": datasets.Value("string"),
77
- "modification_date": datasets.Value("string"),
78
- }
79
- ),
80
- supervised_keys=None,
81
- homepage="https://download.geonames.org/export/zip/",
82
- citation="",
83
- )
84
-
85
- def _split_generators(self, dl_manager):
86
- root_paths = {
87
- "geonames": Path(dl_manager.download_and_extract(AVAILABLE_DATASETS["geonames"]))/'allCountries.txt',
88
- "alternateNames": Path(dl_manager.download_and_extract(AVAILABLE_DATASETS["alternateNames"]))/'alternateNames.txt',
89
- }
90
- return [
91
- datasets.SplitGenerator(
92
- name=datasets.Split.TRAIN,
93
- gen_kwargs={
94
- "root_path": root_paths, "split": "train"
95
- },
96
- ),
97
- ]
98
-
99
- def _generate_examples(self, root_path, split):
100
- data_file = str(root_path["geonames"])
101
- data = pd.read_csv(
102
- data_file, sep="\t", header=None,
103
- encoding='utf-8', usecols=list(range(len(FIELDS))), names=FIELDS
104
- )
105
- # data_file = str(root_path["alternateNames"])
106
- # alt_data = pd.read_csv(
107
- # data_file, sep="\t", header=None,
108
- # encoding='utf-8', names=["id", "geonameid", "altname"], nrows=100
109
- # )
110
- # data = data.merge(alt_data, on="geonameid", how="left")
111
- for idx, sample in data.iterrows():
112
- yield idx, dict(sample)
113
-