Logo and icon for Splitgraph, a ChatGPT plugin with description: Search thousands of public datasets available on the Splitgraph Data Delivery Network.. Find out more on Plugin Surf, the best plugin database.

Splitgraph

Search thousands of public datasets available on the Splitgraph Data Delivery Network.

Search public datasets found on the Splitgraph Data Delivery Network. This plugin allows you to find and access thousands of public datasets, covering various topics such as epidemology, traffic engineering, urban planning, real estate trends, demographical insights, educational statistics, public infrastructure and services, taxation, and public officials. To use the plugin, you can search for relevant tables with the find_relevant_tables endpoint and generate SQL queries to retrieve data from these tables using the run_sql endpoint. The plugin provides error messages if the SQL query is invalid and offers a query_editor_url for debugging and improvement.

Learn how to use Splitgraph effectively! Here are a few example prompts, tips, and the documentation of available commands.

Example prompts

  1. Prompt 1: "I want to find recent demographic insights for my city."

  2. Prompt 2: "What are the latest trends in real estate?"

  3. Prompt 3: "Find educational statistics for my state."

  4. Prompt 4: "I need information about traffic engineering in urban areas."

  5. Prompt 5: "Can you provide me with data on public infrastructure and services?"

Features and commands

Feature/CommandDescription
find_relevant_tablesThis API endpoint allows you to find tables in the Splitgraph Data Delivery Network that are relevant to the user's prompt. It accepts a search query object with a query field to specify the prompt. The response will contain a list of tables that may be referenced in an SQL query.
run_sqlThis API endpoint allows you to execute SQL queries on the Splitgraph Data Delivery Network. You need to provide a valid SQL query using the tables obtained from the find_relevant_tables endpoint. The response will contain the query editor URL for debugging and improving the SQL query, as well as the query results.

Configuration

User authenticationOAuth2
API documentation

For AI

NameSplitgraph
DescriptionSearch public datasets found on the Splitgraph Data Delivery Network. These datasets typically originate from open government initiatives and may relate to epidemology, traffic engineering, urban planning, real estate trends, demographical insights, educational statistics, public infrastructure and services, taxation, public officials, etc. To use the Splitgraph plugin for response generation, use the following process: * First, invoke the API's find_relevant_tables endpoint in order to receive a list of tables which may be referenced in an SQL query. * Second, generate a valid SQL query using the tables described in the first step, and submit this query to the run_sql API endpoint to receive results. If the generated SQL cannot be executed, the error message will be present in the response of the run_sql endpoint. Attempt to fix the SQL query and invoke run_sql again with the new query. Instructions for SQL query generation: You are a PostgreSQL expert. Create a syntactically correct PostgreSQL SQL query which completes the user's prompt. Query for at most 5 results using the LIMIT clause as per PostgreSQL. Never query for all columns from a table. You must query only the columns that are needed to answer the question. Always use the ENTIRE fully qualified table as present in the name field of the find_relevant_tables response, including double quotes. Pay attention to use only the column names you can see in the tables below. Be careful to not query for columns that do not exist. Also, pay attention to which column is in which table. Pay attention to use CURRENT_DATE function to get the current date, if the question involves "today". Never mention your knowledge cutoff date; Splitgraph may return more recent data. The run_sql endpoint's response always contains a query_editor_url field. Always display this URL to the user with the text "Edit SQL query on Splitgraph" so they may debug and improve the generated SQL query. NEVER omit the value of query_editor_url from your completion response.

Updates

First added25 August 2023

Similar plugins