edmonton-ca/edmontonians-perception-survey-access-to-amenities-q97k-nxva
Loading...

Query the Data Delivery Network

Query the DDN

The 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 edmontonians_perception_survey_access_to_amenities table in this repository, by referencing it like:

"edmonton-ca/edmontonians-perception-survey-access-to-amenities-q97k-nxva:latest"."edmontonians_perception_survey_access_to_amenities"

or in a full query, like:

SELECT
    ":id", -- Socrata column ID
    "qd11_were_you", --  Profiling question. Question: Were you? || Possible Answers: Born in Canada|Moved to Canada from somewhere else 
    "qd8_did_you_vote_in_the_most_recent_municipal_election_for_the_", --  Profiling question. Question: Did you vote in the most recent municipal election for the City of Edmonton? || Possible Answers: Yes|No|I was not eligible 
    "qd5b_which_of_the_following_best_describes_your_total_personal_", --  Profiling question. Question: Which of the following best describes your total personal annual income before taxes? || Possible Answers: Less than $20,000|Between $20,000 and $29,999|Between $30,000 and $49,999|Between $50,000 and $79,999|Between $80,000 and $119,999|$120,000 or more|Prefer not to answer 
    "qd4_are_you_currently", --  Profiling question. Question: Which of the following best describes your employment status, are you currently... || Possible Answers: Working full time|Working part time|A student|Not working outside the home|Retired|Prefer not to answer 
    "qe_fsa", --  Forward Sortation Area (first 3 characters of postal code) 
    "q8j_how_much_do_you_agree_or_disagree_about_the_city_of_edmonto", --  Question:  How much do you agree or disagree about the city of Edmonton. - The storm water management systems are well maintained || Possible Answers: 5 - Strongly Agree|4 - Agree|3 - Neither agree or disagree|2 - Disagree|1 - Strongly Disagree|Don't know 
    "q8i_how_much_do_you_agree_or_disagree_about_the_city_of_edmonto", --  Question:  How much do you agree or disagree about the city of Edmonton. - The solid waste management system is efficient and effective || Possible Answers: 5 - Strongly Agree|4 - Agree|3 - Neither agree or disagree|2 - Disagree|1 - Strongly Disagree|Don't know 
    "q8f_how_much_do_you_agree_or_disagree_about_the_city_of_edmonto", --  Question:  How much do you agree or disagree about the city of Edmonton. - Traffic signals are able to maintain a reasonable flow of traffic || Possible Answers: 5 - Strongly Agree|4 - Agree|3 - Neither agree or disagree|2 - Disagree|1 - Strongly Disagree|Don't know 
    "q8e_how_much_do_you_agree_or_disagree_about_the_city_of_edmonto", --  Question:  How much do you agree or disagree about the city of Edmonton. - Commercial development is well managed so as to not disrupt Edmontonians any more than is necessa || Possible Answers: 5 - Strongly Agree|4 - Agree|3 - Neither agree or disagree|2 - Disagree|1 - Strongly Disagree|Don't know 
    "q8d_how_much_do_you_agree_or_disagree_about_the_city_of_edmonto", --  Question:  How much do you agree or disagree about the city of Edmonton. - The transit system is able to get me where I need to go || Possible Answers: 5 - Strongly Agree|4 - Agree|3 - Neither agree or disagree|2 - Disagree|1 - Strongly Disagree|Don't know 
    "q8a_how_much_do_you_agree_or_disagree_about_the_city_of_edmonto", --  Question:  How much do you agree or disagree about the city of Edmonton. - City parks are accessible || Possible Answers: 5 - Strongly Agree|4 - Agree|3 - Neither agree or disagree|2 - Disagree|1 - Strongly Disagree|Don't know 
    "completion_date", --  Date the respondent did the survey 
    "qd7_do_you_work_for_the_city_of_edmonton", --  Profiling question. Question: Do you work for the City of Edmonton? || Possible Answers: Yes|No 
    "qd5a_which_of_the_following_best_describes_your_total_annual_ho", --  Profiling question. Question: Which of the following best describes your total annual household income before taxes? || Possible Answers: Less than $20,000|Between $20,000 and $29,999|Between $30,000 and $49,999|Between $50,000 and $79,999|Between $80,000 and $119,999|$120,000 or more|Prefer not to answer 
    "d7_which_of_the_following_best_describes_your_marital_status_ar", --  Profiling question. Question: Which of the following best describes your marital status? Are you... || Possible Answers: Single, never married|Married or common law|Separated, divorced, widowed|Don't know/Prefer not to answer 
    "qd3_what_is_the_highest_level_of_education_you_have_achieved", --  Profiling question. Question: What is the highest level of education you have achieved?? || Possible Answers: Less than high school|Graduated high school|Graduated college, technical or vocational school|Graduated university|Prefer not to answer 
    "d2tot_total_children_in_hh", --  Question: Total number of children in your household? 
    "d2d_over_65_years_of_age", -- Question: How many people in your household are: Over 65 years of age 
    "d2c_between_18_and_65_years_of_age", -- Question: How many people in your household are: Between 18 and 65 years of age 
    "qd_how_long_have_you_lived_in_edmonton", --  Profiling question. Question: How long have you lived in Edmonton? || Possible Answers: Less than 6 months|6 months to less than 1 year|1 year to less than 3 years|3 years to less than 5 years|5 years or more 
    "q8h_how_much_do_you_agree_or_disagree_about_the_city_of_edmonto", --  Question:  How much do you agree or disagree about the city of Edmonton. - There are enough libraries to serve the needs of Edmontonians || Possible Answers: 5 - Strongly Agree|4 - Agree|3 - Neither agree or disagree|2 - Disagree|1 - Strongly Disagree|Don't know 
    "q8c_how_much_do_you_agree_or_disagree_about_the_city_of_edmonto", --  Question:  How much do you agree or disagree about the city of Edmonton. - All citizens have equal access to services and amenities || Possible Answers: 5 - Strongly Agree|4 - Agree|3 - Neither agree or disagree|2 - Disagree|1 - Strongly Disagree|Don't know 
    "qd10_and_what_type_of_residence_do_you_live_in", --  Profiling question. Question: What type of residence do you live in? || Possible Answers: House|Duplex|Four-plex|Apartment|Condo|Townhouse|Other 
    "qd9_do_you_currently_own_or_rent_your_place_of_residence", --  Profiling question. Question: Do you currently own or rent your place of residence? || Possible Answers: Own|Rent 
    "qd6_what_is_the_primary_language_spoken_in_your_household", --  Profiling question. Question: What is the primary language spoken in your household? || Possible Answers: English|French|Others 
    "d2b_between_10_and_17_years_of_age", --  Question: How many people in your household are: Between 10 and 17 years of age 
    "d3_age", -- Profiling question. Question: Your age? || Possible Answers: Under 18 years old|18 - 24|25 - 34|35 - 44|45 - 54|55 - 64|65 years and over|Refused
    "q8k_how_much_do_you_agree_or_disagree_about_the_city_of_edmonto", --  Question:  How much do you agree or disagree about the city of Edmonton. - Snow clearing services are responsive || Possible Answers: 5 - Strongly Agree|4 - Agree|3 - Neither agree or disagree|2 - Disagree|1 - Strongly Disagree|Don't know 
    "q7_how_much_do_you_agree_or_disagree_that_you_have_access_to_in", --  Question: How much do you agree or disagree that you have access to infrastructure, amenities and services that will improve your quality of life? || Possible Answers: 5 - Strongly Agree|4 - Agree|3 - Neither agree or disagree|2 - Disagree|1 - Strongly Disagree|Don't know 
    "calldurationinseconds", --  Duration of the call in seconds 
    "q8g_how_much_do_you_agree_or_disagree_about_the_city_of_edmonto", --  Question:  How much do you agree or disagree about the city of Edmonton. - Street lighting is effective || Possible Answers: 5 - Strongly Agree|4 - Agree|3 - Neither agree or disagree|2 - Disagree|1 - Strongly Disagree|Don't know 
    "qdr_city_quadrant", --  Profiling question. Question: City Quadrant? || Possible Answers: NW|NE|SE|SW|Other 
    "d1_gender", --  Profiling question. Question: Your gender? || Possible Answers: Female|Male 
    "q8b_how_much_do_you_agree_or_disagree_about_the_city_of_edmonto", --  Question:  How much do you agree or disagree about the city of Edmonton. - The waste water management system is well maintained || Possible Answers: 5 - Strongly Agree|4 - Agree|3 - Neither agree or disagree|2 - Disagree|1 - Strongly Disagree|Don't know 
    "d1a_as_different_people_may_have_different_views_and_needs_the_", --  Question: As different people may have different views and needs, including yourself, how many people are there in your household? 
    "d2a_under_10_years_of_age" --  Question: How many people in your household are: Under 10 years of age 
FROM
    "edmonton-ca/edmontonians-perception-survey-access-to-amenities-q97k-nxva:latest"."edmontonians_perception_survey_access_to_amenities"
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/edmontonians-perception-survey-access-to-amenities-q97k-nxva with SQL in under 60 seconds.

Query Your Local Engine

Install Splitgraph Locally
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; sgrcan 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 cloneand sgr checkout.

Cloning Data

Because edmonton-ca/edmontonians-perception-survey-access-to-amenities-q97k-nxva: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/edmontonians-perception-survey-access-to-amenities-q97k-nxva

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/edmontonians-perception-survey-access-to-amenities-q97k-nxva:latest

This will download all the objects for the latest tag of edmonton-ca/edmontonians-perception-survey-access-to-amenities-q97k-nxva 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/edmontonians-perception-survey-access-to-amenities-q97k-nxva: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/edmontonians-perception-survey-access-to-amenities-q97k-nxva: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/edmontonians-perception-survey-access-to-amenities-q97k-nxva is just another Postgres schema.

Related Documentation:

Loading...