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 parking_edmonton_insight_community
table in this repository, by referencing it like:
"edmonton-ca/parking-edmonton-insight-community-y9sx-n6j7:latest"."parking_edmonton_insight_community"
or in a full query, like:
SELECT
":id", -- Socrata column ID
"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
"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/Prefer not to say
"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)
"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)
"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)
"devicetype", -- System Captured, Device used by the respondent. Question: Device Type? - DeviceType || Possible Answers: Tablet/Desktop/Phone
"q5b_parking_i_do_not_support_a_lower_parking_requirement_for_re", -- Respondents were asked to select the actions that would be required for you to support a lower restaurant parking amount compared to what you selected in the previous question. Question: Was located within easy walking distance from a public parking garage: Possible Answers: Yes (1)/No (0)
"q5b_parking_the_restaurant_is_within_easy_walking_distance__000", -- Respondents were asked to select the actions that would be required for you to support a lower restaurant parking amount compared to what you selected in the previous question. Question: The restaurant is within easy walking distance from a regular bus stop (30 minute frequency): Possible Answers: Yes (1)/No (0)
"q5b_parking_the_restaurant_is_within_easy_walking_distance__001", -- Respondents were asked to select the actions that would be required for you to support a lower restaurant parking amount compared to what you selected in the previous question. Question: The restaurant is within easy walking distance from a frequent transit service (such as LRT, or buses running every 15 minutes or less): Possible Answers: Yes (1)/No (0)
"q5a_parking", -- Respondents were asked to select the option that best applies. Question: select the amount of parking you think is appropriate if this restaurant was located in a main street area: Possible Answers: - 1 parking stall per 3.6m2 - 1 parking stall per 8.0m2 - 1 parking stall per 15.0m2 - 1 parking stall per 30.0m2 - 1 parking stall per 100.0m2 - No parking
"q4b_parking_current_parking_requirements_for_businesses_make_op", -- Respondents were asked to select the option that best applies. Question: Current parking requirements for businesses make opening new restaurants difficult: Possible Answers: 1 Strongly disagree 2 Somewhat disagree 3 Neither agree or disagree 4 Somewhat agree 5 Strongly agree
"q4a_parking_i_only_go_to_main_street_areas_when_they_have_free_", -- Respondents were asked to select the option that best applies. Question: I only go to main street areas when they have free parking: Possible Answers: 1 Strongly disagree 2 Somewhat disagree 3 Neither agree or disagree 4 Somewhat agree 5 Strongly agree
"q4a_parking_i_am_willing_to_pay_for_parking_if_it_is_close_to_m", -- Respondents were asked to select the option that best applies. Question: I am willing to pay for parking if it is close to my destination rather than drive around looking for a parking spot: Possible Answers: 1 Strongly disagree 2 Somewhat disagree 3 Neither agree or disagree 4 Somewhat agree 5 Strongly agree
"q4a_parking_i_am_willing_to_park_farther_away_and_walk_to_a_des", -- Respondents were asked to select the option that best applies. Question: I am willing to park farther away and walk to a destination if the parking farther away is free: Possible Answers: 1 Strongly disagree 2 Somewhat disagree 3 Neither agree or disagree 4 Somewhat agree 5 Strongly agree
"q4a_parking_it_is_difficult_to_find_a_place_to_park_my_car_for_", -- Respondents were asked to select the option that best applies. Question: It is difficult to find a place to park my car for free when I go to a main street area: Possible Answers: 1 Strongly disagree 2 Somewhat disagree 3 Neither agree or disagree 4 Somewhat agree 5 Strongly agree
"q3a_parking_driver_of_a_car_truck_or_motorcycle", -- Respondents were asked to select all that apply. Question: Regarding Which method do you use most often to arrive at a main street area: Driver of a Car, truck, or motorcycle: Possible Answers: Yes (1)/No (0)
"q1b_parking_5_p_m_9_p_m", -- Respondents were asked to select all that apply. Question: Regarding What time of day is it important to have activities and amenities available in a main street area: 5 p.m. - 9 p.m.: Possible Answers: Yes (1)/No (0)
"q1b_parking_9_a_m_5_p_m", -- Respondents were asked to select all that apply. Question: Regarding What time of day is it important to have activities and amenities available in a main street area: 9 a.m. - 5 p.m.: Possible Answers: Yes (1)/No (0)
"q1a_parking_street_improvements_decorative_light_poles_benches_", -- Respondents were asked to select all that apply. Question: Regarding qualities of a main street area: Street improvements (decorative light poles, benches, street trees, wide sidewalks): Possible Answers: Yes (1)/No (0)
"q1a_parking_pleasant_walking_window_shopping_experience_being_a", -- Respondents were asked to select all that apply. Question: Regarding qualities of a main street area: Pleasant walking & window shopping experience, being able to see into a storefront: Possible Answers: Yes (1)/No (0)
"q1a_parking_destination_for_entertainment_and_dining", -- Respondents were asked to select all that apply. Question: Regarding qualities of a main street area: Destination for entertainment and dining: Possible Answers: Yes (1)/No (0)
"q1a_parking_bicycle_parking", -- Respondents were asked to select all that apply. Question: Regarding qualities of a main street area: Bicycle parking: Possible Answers: Yes (1)/No (0)
"q1a_parking_a_variety_of_shops_and_goods_available", -- Respondents were asked to select all that apply. Question: Regarding qualities of a main street area: - select A variety of shops and goods available: Possible Answers: Yes (1)/No (0)
"responsedate", -- Date/Time the respondent first opened/started the survey.
"q5b_parking_other_please_specify", -- Respondents were asked to select the actions that would be required for you to support a lower restaurant parking amount compared to what you selected in the previous question. Question: Other (please specify): Possible Answers: Yes (1)/No (0) The free text description is not included in the data.
"q5b_parking_the_restaurant_is_located_on_the_ground_floor_of_a_", -- Respondents were asked to select the actions that would be required for you to support a lower restaurant parking amount compared to what you selected in the previous question. Question: The restaurant is located on the ground floor of a new high rise building in a main street area: Possible Answers: Yes (1)/No (0)
"q5b_parking_was_located_within_easy_walking_distance_from_a_pub", -- Respondents were asked to select the actions that would be required for you to support a lower restaurant parking amount compared to what you selected in the previous question. Question: Was located within easy walking distance from a public parking garage: Possible Answers: Yes (1)/No (0)
"q4b_parking_surface_parking_lots_should_be_located_behind_the_b", -- Respondents were asked to select the option that best applies. Question: Surface parking lots should be located behind the building in main street areas: Possible Answers: 1 Strongly disagree 2 Somewhat disagree 3 Neither agree or disagree 4 Somewhat agree 5 Strongly agree
"q4b_parking_paid_parking_garages_parkades_should_be_used_to_hel", -- Respondents were asked to select the option that best applies. Question: Paid parking garages (parkades) should be used to help provide parking in main street areas: Possible Answers: 1 Strongly disagree 2 Somewhat disagree 3 Neither agree or disagree 4 Somewhat agree 5 Strongly agree
"q4b_parking_lowering_parking_requirements_for_businesses_will_m", -- Respondents were asked to select the option that best applies. Question: Lowering parking requirements for businesses will make it more difficult for residents to find on-street parking in front of their homes: Possible Answers: 1 Strongly disagree 2 Somewhat disagree 3 Neither agree or disagree 4 Somewhat agree 5 Strongly agree
"q4a_parking_it_is_easy_to_find_a_place_to_park_my_car_when_i_go", -- Respondents were asked to select the option that best applies. Question: Regarding It is easy to find a place to park my car when I go to a main street area: Possible Answers: 1 Strongly disagree 2 Somewhat disagree 3 Neither agree or disagree 4 Somewhat agree 5 Strongly agree
"q3a_parking_other_specify", -- Respondents were asked to select all that apply. Question: Regarding Which method do you use most often to arrive at a main street area: Other (specify): Possible Answers: Yes (1)/No (0) The free text description is not included in the data.
"q1a_parking_other_please_describe", -- Respondents were asked to select all that apply. Question: Regarding qualities of a main street area: Other (please describe): Possible Answers: Yes (1)/No (0) The free text description is not included in the data.
"q1a_parking_easy_to_find_off_street_parking", -- Respondents were asked to select all that apply. Question: Regarding qualities of a main street area: Easy to find off-street parking: Possible Answers: Yes (1)/No (0)
"completiondate", -- Date/Time the respondent finished the survey.
"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
"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)
"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
"q5b_parking_the_restaurant_has_abundant_bicycle_parking", -- Respondents were asked to select the actions that would be required for you to support a lower restaurant parking amount compared to what you selected in the previous question. Question: The restaurant has abundant bicycle parking: Possible Answers: Yes (1)/No (0)
"q5b_parking_the_restaurant_reserves_parking_space_s_for_carshar", -- Respondents were asked to select the actions that would be required for you to support a lower restaurant parking amount compared to what you selected in the previous question. Question: The restaurant reserves parking space(s) for carsharing service(s) (Pogo, Car2Go, ZipCar): Possible Answers: Yes (1)/No (0)
"q5b_parking_off_street_restaurant_parking_is_shared_with_anothe", -- Respondents were asked to select the actions that would be required for you to support a lower restaurant parking amount compared to what you selected in the previous question. Question: Off-street restaurant parking is shared with another building that serves parkers at a different peak time of day (such as an office): Possible Answers: Yes (1)/No (0)
"q5b_parking_off_street_public_parking_is_located_within_easy_wa", -- Respondents were asked to select the actions that would be required for you to support a lower restaurant parking amount compared to what you selected in the previous question. Question: Off-street public parking is located within easy walking distance from the restaurant: Possible Answers: Yes (1)/No (0)
"q4b_parking_charging_a_fee_for_on_street_parking_in_residential", -- Respondents were asked to select the option that best applies. Question: Charging a fee for on-street parking in residential areas near a main street area is a fair way to manage the on-street parking supply: Possible Answers: 1 Strongly disagree 2 Somewhat disagree 3 Neither agree or disagree 4 Somewhat agree 5 Strongly agree
"q4a_parking_we_need_better_signs_to_tell_me_where_there_is_avai", -- Respondents were asked to select the option that best applies. Question: We need better signs to tell me where there is available parking in a main street area: Possible Answers: 1 Strongly disagree 2 Somewhat disagree 3 Neither agree or disagree 4 Somewhat agree 5 Strongly agree
"q3b_parking", -- Respondents were asked to select the one that applies. Question: Which method do you use most often to arrive at a main street area: Possible Answers: - Driver of a Car, truck, or motorcycle - Passenger of a Car, truck, or motorcycle or as passenger - Public transit (bus/lrt) - Taxi or ride-hailing service (e.g. Uber , Lyft) - Bike - Walk - Other
"q3a_parking_i_don_t_go_to_main_street_areas", -- Respondents were asked to select all that apply. Question: Regarding Which method do you use most often to arrive at a main street area: I don't go to main street areas: Possible Answers: Yes (1)/No (0)
"q3a_parking_walk", -- Respondents were asked to select all that apply. Question: Regarding Which method do you use most often to arrive at a main street area: Walk: Possible Answers: Yes (1)/No (0)
"q3a_parking_taxi_or_ride_hailing_service_e_g_uber_lyft", -- Respondents were asked to select all that apply. Question: Regarding Which method do you use most often to arrive at a main street area: Taxi or ride-hailing service (e.g. Uber , Lyft): Possible Answers: Yes (1)/No (0)
"q3a_parking_passenger_of_a_car_truck_or_motorcycle_or_as_passen", -- Respondents were asked to select all that apply. Question: Regarding Which method do you use most often to arrive at a main street area: Passenger of a Car, truck, or motorcycle or as passenger: Possible Answers: Yes (1)/No (0)
"q1b_parking_9_p_m_midnight", -- Respondents were asked to select all that apply. Question: Regarding What time of day is it important to have activities and amenities available in a main street area: 9 p.m. - midnight: Possible Answers: Yes (1)/No (0)
"q1a_parking_buildings_have_awnings_and_overhead_weather_protect", -- Respondents were asked to select all that apply. Question: Regarding qualities of a main street area: Buildings have awnings and overhead weather protection: Possible Answers: Yes (1)/No (0)
"q1a_parking_festivals_and_community_events", -- Respondents were asked to select all that apply. Question: Regarding qualities of a main street area: Festivals and community events: Possible Answers: Yes (1)/No (0)
"q1a_parking_places_for_lingering_and_social_gathering_people_wa", -- Respondents were asked to select all that apply. Question: Regarding qualities of a main street area: Places for lingering and social gathering (people watching, patios, plazas): Possible Answers: Yes (1)/No (0)
"q1a_parking_destination_for_shopping_and_businesses", -- Respondents were asked to select all that apply. Question: Regarding qualities of a main street area: Destination for shopping and businesses: Possible Answers: Yes (1)/No (0)
"q1a_parking_prices_that_are_the_same_or_better_than_shopping_ma", -- Respondents were asked to select all that apply. Question: Regarding qualities of a main street area: Prices that are the same or better than shopping malls and big box stores: Possible Answers: Yes (1)/No (0)
"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
"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
"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
"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
"browsertype", -- System Captured, Browser used by the respondent. Question: Browser Type? - BrowserType. Possible Answers: Internet Explorer/Firefox/Safari/Google Chrome/Opera/Android/BlackBerry/Unknown
"q5b_parking_paid_on_street_parking_is_located_adjacent_to_the_r", -- Respondents were asked to select the actions that would be required for you to support a lower restaurant parking amount compared to what you selected in the previous question. Question: Paid on-street parking is located adjacent to the restaurant : Possible Answers: Yes (1)/No (0)
"q3a_parking_public_transit_bus_lrt", -- Respondents were asked to select all that apply. Question: Regarding Which method do you use most often to arrive at a main street area: Public transit (bus/lrt): Possible Answers: Yes (1)/No (0)
"q1b_parking_midnight_3_a_m", -- Respondents were asked to select all that apply. Question: Regarding What time of day is it important to have activities and amenities available in a main street area: midnight - 3 a.m.: Possible Answers: Yes (1)/No (0)
"q3a_parking_bike", -- Respondents were asked to select all that apply. Question: Regarding Which method do you use most often to arrive at a main street area: Bike: Possible Answers: Yes (1)/No (0)
"q1a_parking_on_street_parking", -- Respondents were asked to select all that apply. Question: Regarding qualities of a main street area: On-street parking: Possible Answers: Yes (1)/No (0)
"q1a_parking_unique_or_locally_produced_goods", -- Respondents were asked to select all that apply. Question: Regarding qualities of a main street area: - select Unique or locally produced goods: Possible Answers: Yes (1)/No (0)
"ostype",
"q8_born_canada_study_profiling_questionnaire_2014", -- Profiling question, one response selected by respondent. - Were you born in Canada? || Possible Answers: Yes/No
"q1a_parking_good_public_transit_service", -- Respondents were asked to select all that apply. Question: Regarding qualities of a main street area:Good public transit service: Possible Answers: Yes (1)/No (0)
"q1a_parking_stores_caf_s_and_restaurants_open_past_6pm", -- Respondents were asked to select all that apply. Question: Regarding qualities of a main street area: - Stores, cafés, and restaurants open past 6pm: Possible Answers: Yes (1)/No (0)
"q1a_parking_a_major_thoroughfare_with_ease_of_transportation", -- Respondents were asked to select all that apply. Question: Regarding qualities of a main street area: A major thoroughfare with ease of transportation: Possible Answers: Yes (1)/No (0)
"gender_study_profiling_questionnaire_2014", -- Profiling question, one response selected by respondent. - Are you…? || Possible Answers: Male/Female/Other/I prefer not to answer
"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)
FROM
"edmonton-ca/parking-edmonton-insight-community-y9sx-n6j7:latest"."parking_edmonton_insight_community"
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/parking-edmonton-insight-community-y9sx-n6j7
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/parking-edmonton-insight-community-y9sx-n6j7: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/parking-edmonton-insight-community-y9sx-n6j7
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/parking-edmonton-insight-community-y9sx-n6j7:latest
This will download all the objects for the latest
tag of edmonton-ca/parking-edmonton-insight-community-y9sx-n6j7
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/parking-edmonton-insight-community-y9sx-n6j7: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/parking-edmonton-insight-community-y9sx-n6j7: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/parking-edmonton-insight-community-y9sx-n6j7
is just another Postgres schema.