Dataset Preview
Full Screen
The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
The dataset generation failed
Error code:   DatasetGenerationError
Exception:    UnicodeDecodeError
Message:      'utf-8' codec can't decode byte 0xa7 in position 4: invalid start byte
Traceback:    Traceback (most recent call last):
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1995, in _prepare_split_single
                  for _, table in generator:
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/packaged_modules/text/text.py", line 90, in _generate_tables
                  batch = f.read(self.config.chunksize)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/utils/file_utils.py", line 1104, in read_with_retries
                  out = read(*args, **kwargs)
                File "/usr/local/lib/python3.9/codecs.py", line 322, in decode
                  (result, consumed) = self._buffer_decode(data, self.errors, final)
              UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa7 in position 4: invalid start byte
              
              The above exception was the direct cause of the following exception:
              
              Traceback (most recent call last):
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1529, in compute_config_parquet_and_info_response
                  parquet_operations = convert_to_parquet(builder)
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1154, in convert_to_parquet
                  builder.download_and_prepare(
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1027, in download_and_prepare
                  self._download_and_prepare(
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1122, in _download_and_prepare
                  self._prepare_split(split_generator, **prepare_split_kwargs)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1882, in _prepare_split
                  for job_id, done, content in self._prepare_split_single(
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 2038, in _prepare_split_single
                  raise DatasetGenerationError("An error occurred while generating the dataset") from e
              datasets.exceptions.DatasetGenerationError: An error occurred while generating the dataset

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

text
string
CREATE TABLE public.tl_2023_us_state (
gid serial4 NOT NULL,
region varchar(2) NULL,
division varchar(2) NULL,
statefp varchar(2) NULL,
statens varchar(8) NULL,
geoid varchar(2) NULL,
geoidfq varchar(11) NULL,
stusps varchar(2) NULL,
"name" varchar(100) NULL,
lsad varchar(2) NULL,
mtfcc varchar(5) NULL,
funcstat varchar(1) NULL,
aland float8 NULL,
awater float8 NULL,
intptlat varchar(11) NULL,
intptlon varchar(12) NULL,
geom public.geometry(multipolygon, 4269) NULL,
CONSTRAINT tl_2023_us_state_pkey PRIMARY KEY (gid)
);
CREATE TABLE public.tl_2023_us_county (
gid serial4 NOT NULL,
statefp varchar(2) NULL,
countyfp varchar(3) NULL,
countyns varchar(8) NULL,
geoid varchar(5) NULL,
geoidfq varchar(14) NULL,
"name" varchar(100) NULL,
namelsad varchar(100) NULL,
lsad varchar(2) NULL,
classfp varchar(2) NULL,
mtfcc varchar(5) NULL,
csafp varchar(3) NULL,
cbsafp varchar(5) NULL,
metdivfp varchar(5) NULL,
funcstat varchar(1) NULL,
aland float8 NULL,
awater float8 NULL,
intptlat varchar(11) NULL,
intptlon varchar(12) NULL,
geom public.geometry(multipolygon, 4269) NULL,
CONSTRAINT tl_2023_us_county_pkey PRIMARY KEY (gid)
);
CREATE TABLE public.tl_2023_us_coastline (
gid serial4 NOT NULL,
"name" varchar(100) NULL,
mtfcc varchar(5) NULL,
geom public.geometry(multilinestring, 4269) NULL,
CONSTRAINT tl_2023_us_coastline_pkey PRIMARY KEY (gid)
);
--A single coastline is divided into different fragments which same name for fragments of the coastline.
CREATE TABLE public.tl_2023_us_cbsa (
gid serial4 NOT NULL,
csafp varchar(3) NULL,
cbsafp varchar(5) NULL,
geoid varchar(5) NULL,
geoidfq varchar(14) NULL,
"name" varchar(100) NULL,
namelsad varchar(100) NULL,
lsad varchar(2) NULL,
memi varchar(1) NULL,
mtfcc varchar(5) NULL,
aland float8 NULL,
awater float8 NULL,
intptlat varchar(11) NULL,
intptlon varchar(12) NULL,
geom public.geometry(multipolygon, 4269) NULL,
CONSTRAINT tl_2023_us_cbsa_pkey PRIMARY KEY (gid)
);
--This table contains data on both metropolitan and micropolitan areas.
--To filter metropolitan areas only you need to look at the entries where lsad='M1'
--To filter micropolitan areas only you need to look at the entries where lsad='M2'
CREATE TABLE public.tl_2023_us_primaryroads (
gid serial4 NOT NULL,
linearid varchar(22) NULL,
fullname varchar(100) NULL,
rttyp varchar(1) NULL,
mtfcc varchar(5) NULL,
geom public.geometry(multilinestring, 4269) NULL,
CONSTRAINT tl_2023_us_primaryroads_pkey PRIMARY KEY (gid)
);
--A single road is divided among multiple rows with same 'fullname' attribute.
CREATE TABLE public.tl_2023_us_mil (
gid serial4 NOT NULL,
areaid varchar(22) NULL,
fullname varchar(100) NULL,
mtfcc varchar(5) NULL,
aland float8 NULL,
awater float8 NULL,
intptlat varchar(11) NULL,
intptlon varchar(12) NULL,
geom public.geometry(multipolygon, 4269) NULL,
CONSTRAINT tl_2023_us_mil_pkey PRIMARY KEY (gid)
);
CREATE TABLE public.tl_2023_us_rails (
gid serial4 NOT NULL,
linearid varchar(22) NULL,
fullname varchar(100) NULL,
mtfcc varchar(5) NULL,
End of preview.

This is a dataset made for the purpose of evaluating Text-to-SQL systems for geography-based applications. Currently, we have only released 109 examples of natural_language, sql_query pairs.

Steps:

  1. First, unzip all the .shp files and load them into your postgres database instance.
  2. Load the text,sql pair from the .csv file into your desired program.
  3. Generate SQL for the questions using your own LLM and compare the results any way you like.

###REQUIREMENTS.

  1. You need postgres SQL installed with postgis extension enabled.
  2. You need to have tiger geocoder enabled only for Florida state. i.e., the geocoding done in this dataset is only on addresses from the Florida state. For more information on installing tiger geocoder, see the book Postgis in Action by R. Obe, L. Hsu Chapter 10: PostGIS TIGER geocoder

Copyright reAlpha Tech Corp, 2024

Made by: ML Team, Naamche

Downloads last month
52