Query the Data Delivery Network
Query the DDNThe easiest way to query any data on Splitgraph is via the "Data Delivery Network" (DDN). The DDN is a single endpoint that speaks the PostgreSQL wire protocol. Any Splitgraph user can connect to it at data.splitgraph.com:5432
and query any version of over 40,000 datasets that are hosted or proxied by Splitgraph.
For example, you can query the development_notif_letters_edmonton_insight
table in this repository, by referencing it like:
"edmonton-ca/development-notif-letters-edmonton-insight-yvag-fjzv:latest"."development_notif_letters_edmonton_insight"
or in a full query, like:
SELECT
":id", -- Socrata column ID
"fsa_study_profiling_questionnaire_2014", -- Forward Sortation Area (first 3 characters of postal code)
"q15_household_income_study_profiling_questionnaire_2014", -- Profiling question, one response selected by respondent. - Which of the following categories best describes your total household income in 2014 before taxes? || Possible Answers: Under $20,000/$20,000 to $29,999/$30,000 to $39,999/$40,000 to $49,999/$50,000 to $59,999/$60,000 to $79,999/$80,000 to $99,999/$100,000 to $149,000/$150,000 and over/Prefer not to answer
"q19_development_different", -- Three different words are used in describing a shift away from the standard regulations provided in the Edmonton Zoning Bylaw. These words are found in applicable legislation, the Edmonton Zoning Bylaw and in the current notification letters. In your opinion what word is most appropriate to use in describing a shift away from the standard regulations? || vary - variance to the regulation\relax - relaxation of the regulation\reduce - reduction to the regulation\Other\None of these
"q18_development_helpful_plain_language_to_explain_key_legal_ter", -- Using a scale of 1 to 5, where 5 means "very helpful" and 1 means "not at all helpful" , let us now how helpful you would find these items - Plain language to explain key legal terms or jargon || Possible Answers: 5 Very Helpful\4 Somewhat Helpful\3 Neutral\2 Not Helpful\1 Not at all Helpful
"q18_development_helpful_how_to_view_the_plans_and_or_permit", -- Using a scale of 1 to 5, where 5 means "very helpful" and 1 means "not at all helpful" , let us now how helpful you would find these items - How to view the plans and/or permit || Possible Answers: 5 Very Helpful\4 Somewhat Helpful\3 Neutral\2 Not Helpful\1 Not at all Helpful
"q18_development_helpful_direct_city_staff_contact_to_discuss_th", -- Using a scale of 1 to 5, where 5 means "very helpful" and 1 means "not at all helpful" , let us now how helpful you would find these items - Direct City staff contact to discuss the permit || Possible Answers: 5 Very Helpful\4 Somewhat Helpful\3 Neutral\2 Not Helpful\1 Not at all Helpful
"q14_development_important_none_of_these_are_important", -- Respondents were asked to select all that apply. Question: We would like to know which parts of the letter you think are important. We have broken the letter into labelled sections (shown below)To view a bigger document, download here: Sample-Notification-Letter-Labelled.pdf. Please select the most important pieces of information in this letter - None of these are important || Possible Answers: 0(No)/1(Yes)
"q14_development_important_all_are_important", -- Respondents were asked to select all that apply. Question: We would like to know which parts of the letter you think are important. We have broken the letter into labelled sections (shown below)To view a bigger document, download here: Sample-Notification-Letter-Labelled.pdf. Please select the most important pieces of information in this letter - All are important || Possible Answers: 0(No)/1(Yes)
"q14_development_important_r", -- Respondents were asked to select all that apply. Question: We would like to know which parts of the letter you think are important. We have broken the letter into labelled sections (shown below)To view a bigger document, download here: Sample-Notification-Letter-Labelled.pdf. Please select the most important pieces of information in this letter - R || Possible Answers: 0(No)/1(Yes)
"q14_development_important_o", -- Respondents were asked to select all that apply. Question: We would like to know which parts of the letter you think are important. We have broken the letter into labelled sections (shown below)To view a bigger document, download here: Sample-Notification-Letter-Labelled.pdf. Please select the most important pieces of information in this letter - O || Possible Answers: 0(No)/1(Yes)
"completiondate", -- Date/Time the respondent finished the survey.
"responsedate", -- Date/Time the respondent first opened/started the survey.
"gender_study_profiling_questionnaire_2014", -- Profiling question, one response selected by respondent. - Are you…? || Possible Answers: Male/Female/Other/I prefer not to answer
"q10_development_q1", -- Response were asked to select a response. Question: In your opinion, what is the purpose of this letter? || Possible Answers: To inform me of my right to appeal an approved development permit in my neighbourhood/To inform me of an approved development permit in my neighbourhood/To inform me of variances to the regulations required to approve a development permit in my neighbourhood/To inform me of development in my neighbourhood/All of the above/Other
"q9a_edmonton_study_profiling_questionnaire_2014", -- Profiling question, one response selected by respondent. - How long have you lived in Edmonton? || Possible Answers: Less than 1 year/Between 1 to 2 years/Between 3 to 5 years/Greater than 5 years/I do not live in Edmonton
"q14_development_important_b", -- Respondents were asked to select all that apply. Question: We would like to know which parts of the letter you think are important. We have broken the letter into labelled sections (shown below)To view a bigger document, download here: Sample-Notification-Letter-Labelled.pdf Please select the most important pieces of information in this letter - B || Possible Answers: 0(No)/1(Yes)
"q14_development_important_l", -- Respondents were asked to select all that apply. Question: We would like to know which parts of the letter you think are important. We have broken the letter into labelled sections (shown below)To view a bigger document, download here: Sample-Notification-Letter-Labelled.pdf. Please select the most important pieces of information in this letter - L || Possible Answers: 0(No)/1(Yes)
"q14_development_important_h", -- Respondents were asked to select all that apply. Question: We would like to know which parts of the letter you think are important. We have broken the letter into labelled sections (shown below)To view a bigger document, download here: Sample-Notification-Letter-Labelled.pdf. Please select the most important pieces of information in this letter - H || Possible Answers: 0(No)/1(Yes)
"q14_development_important_q", -- Respondents were asked to select all that apply. Question: We would like to know which parts of the letter you think are important. We have broken the letter into labelled sections (shown below)To view a bigger document, download here: Sample-Notification-Letter-Labelled.pdf. Please select the most important pieces of information in this letter - Q || Possible Answers: 0(No)/1(Yes)
"q14_development_important_f", -- Respondents were asked to select all that apply. Question: We would like to know which parts of the letter you think are important. We have broken the letter into labelled sections (shown below)To view a bigger document, download here: Sample-Notification-Letter-Labelled.pdf. Please select the most important pieces of information in this letter - F || Possible Answers: 0(No)/1(Yes)
"q14_development_important_e", -- Respondents were asked to select all that apply. Question: We would like to know which parts of the letter you think are important. We have broken the letter into labelled sections (shown below)To view a bigger document, download here: Sample-Notification-Letter-Labelled.pdf. Please select the most important pieces of information in this letter - E || Possible Answers: 0(No)/1(Yes)
"q14_development_important_a", -- Respondents were asked to select all that apply. Question: We would like to know which parts of the letter you think are important. We have broken the letter into labelled sections (shown below)To view a bigger document, download here: Sample-Notification-Letter-Labelled.pdf. Please select the most important pieces of information in this letter - A || Possible Answers: 0(No)/1(Yes)
"q17_city_employee_study_profiling_questionnaire_2014", -- Profiling question, one response selected by respondent. - Do you work for the City of Edmonton? || Possible Answers: Yes/No
"q12_employment_status_study_profiling_questionnaire_2014", -- Profiling question, one response selected by respondent. - What is your current employment status? || Possible Answers: Employed full-time (30+ hours a week)/Employed part-time (0-30 hours a week)/Homemaker/Post-secondary student/High School Student/Unemployed/Permanently unable to Work/Retired/Other (Specify)
"q14_development_important_n", -- Respondents were asked to select all that apply. Question: We would like to know which parts of the letter you think are important. We have broken the letter into labelled sections (shown below)To view a bigger document, download here: Sample-Notification-Letter-Labelled.pdf. Please select the most important pieces of information in this letter - N || Possible Answers: 0(No)/1(Yes)
"q11_development_q2", -- Response were asked to select a response. Question: Do you clearly understand what this notification letter is saying? || Possible Answers: Yes/No
"q10_own_business_study_profiling_questionnaire_2014", -- Profiling question, one response selected by respondent. - Do you own a business in the City of Edmonton? || Possible Answers: Yes/No
"q18_development_helpful_more_information_on_the_appeal_process", -- Using a scale of 1 to 5, where 5 means "very helpful" and 1 means "not at all helpful" , let us now how helpful you would find these items - More information on the appeal process || Possible Answers: 5 Very Helpful\4 Somewhat Helpful\3 Neutral\2 Not Helpful\1 Not at all Helpful
"age_rollup_detailed_study_profiling_questionnaire_2014", -- Profiling question, Based on birthdate entered by Respondent. System Determined. Question: Age Rollup? - || Possible Answers: Under 15/15-17/18-24/25-29/30-34/35-39/40-44/45-49/50-54/55-59/60-64/65-69/70-74/75-79/80 and over
"q7_children_study_profiling_questionnaire_2014", -- Profiling question, one response selected by respondent. - Do you have children 18 or under living at home? || Possible Answers: Yes/No
"q18_development_helpful_visual_aid_map", -- Using a scale of 1 to 5, where 5 means "very helpful" and 1 means "not at all helpful" , let us now how helpful you would find these items - Visual aid - map || Possible Answers: 5 Very Helpful\4 Somewhat Helpful\3 Neutral\2 Not Helpful\1 Not at all Helpful
"q14_development_important_d", -- Respondents were asked to select all that apply. Question: We would like to know which parts of the letter you think are important. We have broken the letter into labelled sections (shown below)To view a bigger document, download here: Sample-Notification-Letter-Labelled.pdf. Please select the most important pieces of information in this letter - D || Possible Answers: 0(No)/1(Yes)
"q14_development_important_g", -- Respondents were asked to select all that apply. Question: We would like to know which parts of the letter you think are important. We have broken the letter into labelled sections (shown below)To view a bigger document, download here: Sample-Notification-Letter-Labelled.pdf. Please select the most important pieces of information in this letter - G || Possible Answers: 0(No)/1(Yes)
"q14_development_important_j", -- Respondents were asked to select all that apply. Question: We would like to know which parts of the letter you think are important. We have broken the letter into labelled sections (shown below)To view a bigger document, download here: Sample-Notification-Letter-Labelled.pdf. Please select the most important pieces of information in this letter - J || Possible Answers: 0(No)/1(Yes)
"q18_development_helpful_visual_aid_to_explain_key_legal_terms_o", -- Using a scale of 1 to 5, where 5 means "very helpful" and 1 means "not at all helpful" , let us now how helpful you would find these items - Visual aid - to explain key legal terms or jargon || Possible Answers: 5 Very Helpful\4 Somewhat Helpful\3 Neutral\2 Not Helpful\1 Not at all Helpful
"q14_development_important_k", -- Respondents were asked to select all that apply. Question: We would like to know which parts of the letter you think are important. We have broken the letter into labelled sections (shown below)To view a bigger document, download here: Sample-Notification-Letter-Labelled.pdf. Please select the most important pieces of information in this letter - K || Possible Answers: 0(No)/1(Yes)
"q14_development_important_m", -- Respondents were asked to select all that apply. Question: We would like to know which parts of the letter you think are important. We have broken the letter into labelled sections (shown below)To view a bigger document, download here: Sample-Notification-Letter-Labelled.pdf. Please select the most important pieces of information in this letter - M || Possible Answers: 0(No)/1(Yes)
"q15_development_important_desktop", -- Response were asked to select a response. Question: Would you like to use the highlighter tool to provide specific feedback on which parts of the LABELLED letter you think are important? || Possible Answers: Yes/No
"q18_development_helpful_cost_to_file_an_appeal", -- Using a scale of 1 to 5, where 5 means "very helpful" and 1 means "not at all helpful" , let us now how helpful you would find these items - Cost to file an appeal || Possible Answers: 5 Very Helpful\4 Somewhat Helpful\3 Neutral\2 Not Helpful\1 Not at all Helpful
"q13_volunteer_study_profiling_questionnaire_2014", -- Profiling question, one response selected by respondent. - In the last 12 months, did you do any activities without pay on behalf of a group or an organization as a volunteer? || Possible Answers: Yes/No
"ostype", -- System Captured, OS used by the respondent. Question: OS Type? - OSType || Possible Answers: Mac (OS X)/Linux/Windows/iOS/Android/BlackBerry/Unknown
"devicetype", -- System Captured, Device used by the respondent. Question: Device Type? - DeviceType || Possible Answers: Tablet/Desktop/Phone
"q18_development_helpful_visual_aid_bird_s_eye_view_of_the_devel", -- Using a scale of 1 to 5, where 5 means "very helpful" and 1 means "not at all helpful" , let us now how helpful you would find these items - Visual aid - bird’s eye view of the development (site plan) || Possible Answers: 5 Very Helpful\4 Somewhat Helpful\3 Neutral\2 Not Helpful\1 Not at all Helpful
"browsertype", -- System Captured, Browser used by the respondent. Question: Browser Type? - BrowserType || Possible Answers: Internet Explorer/Firefox/Safari/Google Chrome/Opera/Android/BlackBerry/Unknown
"q3_own_rent_study_profiling_questionnaire_2014", -- Profiling question, one response selected by respondent. - Do you own or rent your primary residence in the City of Edmonton? || Possible Answers: Own/Rent
"q14a_primary_transportation_study_profiling_questionnaire_2014", -- Profiling question, one response selected by respondent. - What is your primary mode of transportation? || Possible Answers: Car/truck/Van as DRIVER/Car/truck/van as PASSENGER/Public Transit/Walk/Bicycle/Other (Specify)
"q16_education_study_profiling_questionnaire_2014", -- Profiling question, one response selected by respondent. - What is the highest level of education you have completed? || Possible Answers: Elementary/grade school graduate/High school graduate/College / technical school graduate/University undergraduate degree/Post-graduate degree/Professional school graduate (e.g. medicine, dentistry, veterinary medicine, optometry)
"q14_development_important_p", -- Respondents were asked to select all that apply. Question: We would like to know which parts of the letter you think are important. We have broken the letter into labelled sections (shown below)To view a bigger document, download here: Sample-Notification-Letter-Labelled.pdf. Please select the most important pieces of information in this letter - P || Possible Answers: 0(No)/1(Yes)
"q20_development_newspaper", -- In addition to the notification letter the Edmonton Zoning Bylaw requires notice to be provided in the newspaper. An example of the current newspaper notice is shown below. The newspaper notice is intended to notify the broader community.Have you ever looked for this type of information in the newspaper? || Possible Answers: Yes\No\Don't know
"q14b_secondary_transportation_study_profiling_questionnaire_201", -- Profiling question, one response selected by respondent. - What is your secondary mode of transportation? || Possible Answers: Car/truck/Van as DRIVER/Car/truck/van as PASSENGER/Public Transit/Walk/Bicycle/Only have one mode of transportation/Other (Specify)
"q8_born_canada_study_profiling_questionnaire_2014", -- Profiling question, one response selected by respondent. - Were you born in Canada? || Possible Answers: Yes/No
"q17_development_would_you_be_concerned_about_a_development_if_y", -- Response were asked to select a response. Question: Would you be concerned about a development if you received a notification letter? || Possible Answers: 5 Very Likely\4 Likely\3 Neither Likely or Unlikely\2 Unlikely\1 Not at all Likely
"q11_home_language_study_profiling_questionnaire_2014", -- Profiling question, one response selected by respondent. - What is the primary language spoken in your household? || Possible Answers: English/Arabic/Cantonese/Spanish/Panjabi (Punjabi)/French/German/Mandarin/Tagalog (Pilipino, Filipino)/Ukrainian/Other (Specify)
"q14_development_important_i", -- Respondents were asked to select all that apply. Question: We would like to know which parts of the letter you think are important. We have broken the letter into labelled sections (shown below)To view a bigger document, download here: Sample-Notification-Letter-Labelled.pdf. Please select the most important pieces of information in this letter - I || Possible Answers: 0(No)/1(Yes)
"q14_development_important_c" -- Respondents were asked to select all that apply. Question: We would like to know which parts of the letter you think are important. We have broken the letter into labelled sections (shown below)To view a bigger document, download here: Sample-Notification-Letter-Labelled.pdf. Please select the most important pieces of information in this letter - C || Possible Answers: 0(No)/1(Yes)
FROM
"edmonton-ca/development-notif-letters-edmonton-insight-yvag-fjzv:latest"."development_notif_letters_edmonton_insight"
LIMIT 100;
Connecting to the DDN is easy. All you need is an existing SQL client that can connect to Postgres. As long as you have a SQL client ready, you'll be able to query edmonton-ca/development-notif-letters-edmonton-insight-yvag-fjzv
with SQL in under 60 seconds.
Query Your Local Engine
bash -c "$(curl -sL https://github.com/splitgraph/splitgraph/releases/latest/download/install.sh)"
Read the installation docs.
Splitgraph Cloud is built around Splitgraph Core (GitHub), which includes a local Splitgraph Engine packaged as a Docker image. Splitgraph Cloud is basically a scaled-up version of that local Engine. When you query the Data Delivery Network or the REST API, we mount the relevant datasets in an Engine on our servers and execute your query on it.
It's possible to run this engine locally. You'll need a Mac, Windows or Linux system to install sgr
, and a Docker installation to run the engine. You don't need to know how to actually use Docker; sgr
can manage the image, container and volume for you.
There are a few ways to ingest data into the local engine.
For external repositories, the Splitgraph Engine can "mount" upstream data sources by using sgr mount
. This feature is built around Postgres Foreign Data Wrappers (FDW). You can write custom "mount handlers" for any upstream data source. For an example, we blogged about making a custom mount handler for HackerNews stories.
For hosted datasets (like this repository), where the author has pushed Splitgraph Images to the repository, you can "clone" and/or "checkout" the data using sgr clone
and sgr checkout
.
Cloning Data
Because edmonton-ca/development-notif-letters-edmonton-insight-yvag-fjzv:latest
is a Splitgraph Image, you can clone the data from Spltgraph Cloud to your local engine, where you can query it like any other Postgres database, using any of your existing tools.
First, install Splitgraph if you haven't already.
Clone the metadata with sgr clone
This will be quick, and does not download the actual data.
sgr clone edmonton-ca/development-notif-letters-edmonton-insight-yvag-fjzv
Checkout the data
Once you've cloned the data, you need to "checkout" the tag that you want. For example, to checkout the latest
tag:
sgr checkout edmonton-ca/development-notif-letters-edmonton-insight-yvag-fjzv:latest
This will download all the objects for the latest
tag of edmonton-ca/development-notif-letters-edmonton-insight-yvag-fjzv
and load them into the Splitgraph Engine. Depending on your connection speed and the size of the data, you will need to wait for the checkout to complete. Once it's complete, you will be able to query the data like you would any other Postgres database.
Alternatively, use "layered checkout" to avoid downloading all the data
The data in edmonton-ca/development-notif-letters-edmonton-insight-yvag-fjzv:latest
is 0 bytes. If this is too big to download all at once, or perhaps you only need to query a subset of it, you can use a layered checkout.:
sgr checkout --layered edmonton-ca/development-notif-letters-edmonton-insight-yvag-fjzv:latest
This will not download all the data, but it will create a schema comprised of foreign tables, that you can query as you would any other data. Splitgraph will lazily download the required objects as you query the data. In some cases, this might be faster or more efficient than a regular checkout.
Read the layered querying documentation to learn about when and why you might want to use layered queries.
Query the data with your existing tools
Once you've loaded the data into your local Splitgraph Engine, you can query it with any of your existing tools. As far as they're concerned, edmonton-ca/development-notif-letters-edmonton-insight-yvag-fjzv
is just another Postgres schema.