usaid-gov/feed-the-futureethiopia-primeinterim-surveyoctober-6yx2-sfma
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 feed_the_futureethiopia_primeinterim_surveyoctober table in this repository, by referencing it like:

"usaid-gov/feed-the-futureethiopia-primeinterim-surveyoctober-6yx2-sfma:latest"."feed_the_futureethiopia_primeinterim_surveyoctober"

or in a full query, like:

SELECT
    ":id", -- Socrata column ID
    "q204t1", -- 204t1: Cope w stressful events? will you receive money food from community
    "q511", -- 511: Food 24 hours: any sugar, sugar cane, or honey?
    "q201_n", -- 201: In past 2 months did hh experience n. unavailability agr livestock inpt ?
    "q204m", -- 204m: Cope w stressful events? will you sell household items
    "q605a", -- 605a: How often did this happen?
    "q201_k", -- 201: In past 2 months did hh experience k. loss of land due to conflict ?
    "q701_j", -- 701: Number owned now j. axe
    "q401e", -- 401e: Not enough food money, how many days consume seed stock
    "q702_c", -- 702: Number owned now c. sheep
    "q602", -- 602: Past 4 wks, hh mem not able eat preferred foods bc lack resources
    "q704_d", -- 704: Number slaughtered for meat in last 2 months d. goats
    "q202_l", -- 202: Sevrty impct on income food consumption l. violence against household mem
    "q203_c2", -- 203: Confident will recover c2. crop disease
    "q202_b", -- 202: Sevrty impct on income food consumption b. too little rain drought
    "q401a", -- 401a: Not enough food money, how many days rely less preferred expensive food
    "q804", -- 804: In last two months, has your hh received assistance from gov your animals?
    "q704_b", -- 704: Number slaughtered for meat in last 2 months b. cattle
    "q204v", -- 204v: Cope w stressful events? will you receive food aid from an NGO
    "q803", -- 803: In last two months, has anyone in your hh participated in food...for-wk?
    "q204j", -- 204j: Cope w stressful events? will you move to less expensive housing
    "q703c_a", -- 703c: Number owned now who are normal a. oxen
    "q202_q2", -- 202: Sevrty impct on income food consumption q2. drop price livestock prod
    "q512", -- 512: Food 24 hours: any other foods, such as condiments, traditional beer
    "q702_b", -- 702: Number owned now b. cattle
    "q203_e", -- 203: Confident will recover e. landslides erosion
    "q201_c2", -- 201: In past 2 months did hh experience c2. crop disease ?
    "q206d", -- 206d: If yes, who provided... People outside your commu who are not relatives
    "q204c", -- 204c: Cope w stressful events? will you slaughter livestock
    "q301", -- 301: Do you own any livestock?
    "q204w", -- 204w: Cope w stressful events? will you participate in food or cash for work
    "q703d_e", -- 703d: Number owned now who are fat e. camels
    "q703b_a", -- 703b: Number owned now who are thin a. oxen
    "q202_k", -- 202: Sevrty impct on income food consumption k. loss of land due to conflict
    "q705_c", -- 705: Number with unplanned death in last 2 months c. sheep
    "q602a", -- 602a: How often did this happen?
    "q603a", -- 603a: How often did this happen?
    "q705_e", -- 705: Number with unplanned death in last 2 months e. camels
    "q705_d", -- 705: Number with unplanned death in last 2 months d. goats
    "q703d_c", -- 703d: Number owned now who are fat c. sheep
    "q703c_c", -- 703c: Number owned now who are normal c. sheep
    "q703b_d", -- 703b: Number owned now who are thin d. goats
    "q703b_c", -- 703b: Number owned now who are thin c. sheep
    "q604a", -- 604a: How often did this happen?
    "q508", -- 508: Food 24 hours: any foods made from beans (white, brown, horse), peas...
    "q604", -- 604: Past 4 wks, hh mem eat foods not want to eat bc lack resources for oth food
    "q102", -- 102: Zone
    "q401f", -- 401f: Not enough food money, how many days send hh members to eat elsewhere
    "q401d", -- 401d: Not enough food money, gather wild food, hunt, harvest immature crops
    "q203_q1", -- 203: Confident will recover q1. drop price of agricultural prod
    "q203_o", -- 203: Confident will recover o. no demand agr livestock prod
    "q202_j", -- 202: Sevrty impct on income food consumption j. destr damge house due violence
    "q601a", -- 601a: How often did this happen?
    "q201_e", -- 201: In past 2 months did hh experience e. landslides erosion ?
    "q202_e", -- 202: Sevrty impct on income food consumption e. landslides erosion
    "q605", -- 605: Past 4 wks, hh mem eat smaller meal than needed bc not enough food
    "q601", -- 601: Past 4 wks, worry hh would not have enough food
    "q205", -- 205: Have you provided money food other ass to other hhs in the past 2 months?
    "q101", -- 101: Region
    "q801", -- 801: In last two months, has your hh received any food aid from gov or an NGO?
    "q703a_c", -- 703a: Number owned now who are very thin c. sheep
    "q304", -- 304: In last two months, has there been any conflict...over access to fodder?
    "q401h", -- 401h: Not enough food money, restrict food for adults so children can eat
    "q802", -- 802: In last two months, has your hh received any cash from the gov or an NGO?
    "q705_f", -- 705: Number with unplanned death in last 2 months f. poultry
    "q703d_f", -- 703d: Number owned now who are fat f. poultry
    "q701_m", -- 701: Number owned now m. whip (leather)
    "q705_a", -- 705: Number with unplanned death in last 2 months a. oxen
    "q201_f", -- 201: In past 2 months did hh experience f. theft of money ?
    "q202_q1", -- 202: Sevrty impct on income food consumption q1. drop price agricultural prod
    "q201_q2", -- 201: In past 2 months did hh experience q2. drop price of livestock prod ?
    "q607", -- 607: Past 4 wks, no food to eat in your hh bc lack resources to get food
    "q703a_b", -- 703a: Number owned now who are very thin b. cattle
    "q202_h", -- 202: Sevrty impct on income food consumption h. theft destruction of assets
    "q704_c", -- 704: Number slaughtered for meat in last 2 months c. sheep
    "q701_d", -- 701: Number owned now d. radio
    "q303", -- 303: Is there enough water available for all of your animals?
    "q201_d", -- 201: In past 2 months did hh experience d. very bad harvest ?
    "q808", -- 808: In last two months, has anyone in your Kebele taken a child to...to eat?
    "q703b_b", -- 703b: Number owned now who are thin b. cattle
    "q203_q2", -- 203: Confident will recover q2. drop price of livestock prod
    "q703c_e", -- 703c: Number owned now who are normal e. camels
    "q606a", -- 606a: How often did this happen?
    "q703a_a", -- 703a: Number owned now who are very thin a. oxen
    "q609", -- 609: Past 4 wks, hh mem go whole day night without eating bc not enough food
    "q506", -- 506: Food 24 hours: Any eggs?
    "q201_l", -- 201: In past 2 months did hh experience l. violence against household mem ?
    "q703d_b", -- 703d: Number owned now who are fat b. cattle
    "q113", -- 113: Date of survey
    "ea", -- 105: EA
    "q701_g", -- 701: Number owned now g. plough
    "pbs_id",
    "q702_a", -- 702: Number owned now a. oxen
    "q206a", -- 206a: If yes, who provided any money... Relatives inside your community
    "q509", -- 509: Any cheese, yogurt, milk, powder milk, butter milk or other milk products ?
    "q701_k", -- 701: Number owned now k. hoe
    "q806", -- 806: In last two months, has anyone in your Kebele received assist...animals?
    "q203_d", -- 203: Confident will recover d. very bad harvest
    "q202_o", -- 202: Sevrty impct on income food consumption o. no demand agr livestock prod
    "q505", -- 505: Food 24 hours: any food made from beef, lamb, goat, rabbit, wild game
    "q204t", -- 204t: Cope w stressful events? will you receive money food from family mem
    "q203_n", -- 203: Confident will recover n. unavailability agr livestock inpt
    "q203_k", -- 203: Confident will recover k. loss of land due to conflict
    "q705_b", -- 705: Number with unplanned death in last 2 months b. cattle
    "q702_d", -- 702: Number owned now d. goats
    "q401g", -- 401g: Not enough food money, how many days limit portion size at mealtimes?
    "q204a", -- 204a: Cope w stressful events? will you send livestock in search of pasture
    "q701_i", -- 701: Number owned now i. pick axe
    "q703a_f", -- 703a: Number owned now who are very thin f. poultry
    "q701_b", -- 701: Number owned now b. bed
    "q202_c2", -- 202: Sevrty impct on income food consumption c2. crop disease
    "q203_j", -- 203: Confident will recover j. destr damage house due violence
    "q202_r", -- 202: Sevrty impct on income food consumption r. death of household member
    "q807", -- 807: Did your animals get some of this water?
    "q201_c1", -- 201: In past 2 months did hh experience c1. livestock disease ?
    "q805", -- 805: In last two months, has your hhs received assistance from gov...water?
    "q507", -- 507: Food 24 hours: any fresh fish, smoked fish, fish soup sauce or dried fish
    "q204b", -- 204b: Cope w stressful events? will you sell livestock
    "q206b", -- 206b: If yes, who provided... People in your community who are not relatives?
    "q203_g", -- 203: Confident will recover g. theft of crops
    "q701_n", -- 701: Number owned now n. traditional beehive
    "q703c_b", -- 703c: Number owned now who are normal b. cattle
    "q302", -- 302: Is there enough fodder available to feed all of your animals?
    "q201_b", -- 201: In past 2 months did hh experience b. too little rain drought ?
    "q703a_d", -- 703a: Number owned now who are very thin d. goats
    "q202_a", -- 202: Sevrty impct on income food consumption a. excessive rains
    "q201_r", -- 201: In past 2 months did hh experience r. death of household member ?
    "q203_h", -- 203: Confident will recover h. theft or destruction of assets
    "q703b_f", -- 703b: Number owned now who are thin f. poultry
    "q702_e", -- 702: Number owned now e. camels
    "q206c", -- 206c: If yes, who provided any money... Relatives outside your community
    "q203_b", -- 203: Confident will recover b. too little rain drought
    "q703b_e", -- 703b: Number owned now who are thin e. camels
    "q201_q1", -- 201: In past 2 months did hh experience q1. drop price of agricultural prod ?
    "q203_m", -- 203: Confident will recover m. food price inflation
    "q401j", -- 401j: Not enough food money, how many days reduce number meals eaten in day?
    "q201_p", -- 201: In past 2 months did hh experience p. incr price agr livestock inputs ?
    "q203_f", -- 203: Confident will recover f. theft of money
    "q701_a", -- 701: Number owned now a. improved charcoal wood stove
    "survey", -- Survey
    "q401k", -- 401k: Not enough food money, how many days skip entire days without eating
    "q203_i", -- 203: Confident will recover i. theft of livestock (raids)
    "q202_f", -- 202: Sevrty impct on income food consumption f. theft of money
    "q204r", -- 204r: Cope w stressful events? will you loan from friends or relatives
    "q202_m", -- 202: Sevrty impct on income food consumption m. food price inflation
    "q204g", -- 204g: Cope w stressful events? will you migrate (the whole family)
    "q204s", -- 204s: Cope w stressful events? will you send children to work for money
    "q201_j", -- 201: In past 2 months did hh experience j. destr damage house due violence ?
    "q204x", -- 204x: Cope w stressful events? will you use money from savings
    "outcome", -- Final outcome of interview
    "q502", -- 502: Food 24 hours: any foods made with potatoes, yams, sweet potatoes
    "q201_m", -- 201: In past 2 months did hh experience m. food price inflation ?
    "q704_a", -- 704: Number slaughtered for meat in last 2 months a. oxen
    "q204t2", -- 204t2: Cope w stressful events? will you rec money food from people elsewhere
    "q204k", -- 204k: Cope w stressful events? will you reduce food consumption
    "q202_g", -- 202: Sevrty impct on income food consumption g. theft of crops
    "q704_f", -- 704: Number slaughtered for meat in last 2 months f. poultry
    "q701_p", -- 701: Number owned now p. agricultural land (hectares)
    "q510", -- 510: Food 24 hours: any foods made with oil, margarine, fat, or butter?
    "woreda", -- 103: Woreda
    "q609a", -- 609a: How often did this happen?
    "q401c", -- 401c: Not enough food money, how many days purchase food on credit
    "q501", -- 501: Food 24 hours: any bread, rice, pasta, injera, biscuits, or other foods
    "q202_i", -- 202: Sevrty impct on income food consumption i. theft of livestock (raids)
    "q204q", -- 204q: Cope w stressful events? will you take out a loan from a money lender
    "q703d_a", -- 703d: Number owned now who are fat a. oxen
    "q201_o", -- 201: In past 2 months did hh experience o. no demand agr livestock prod ?
    "q606", -- 606: Past 4 wks, hh mem eat fewer meals in day bc not enough food
    "q701_f", -- 701: Number owned now f. modern Chair
    "q202_d", -- 202: Sevrty impct on income food consumption d. very bad harvest
    "round", -- Round
    "q203_a", -- 203: Confident will recover a. excessive rains
    "q701_h", -- 701: Number owned now h. sickle
    "q203_l", -- 203: Confident will recover l. violence against household mem
    "q305", -- 305: In last two months, has there been any conflict...over access to water?
    "q704_e", -- 704: Number slaughtered for meat in last 2 months e. camels
    "q204u", -- 204u: Cope w stressful events? will you receive food aid from the government
    "q204p", -- 204p: Cope w stressful events? will you take out an loan from a bank
    "q201_h", -- 201: In past 2 months did hh experience h. theft or destruction of assets ?
    "q703d_d", -- 703d: Number owned now who are fat d. goats
    "q703c_d", -- 703c: Number owned now who are normal d. goats
    "q607a", -- 607a: How often did this happen?
    "q703c_f", -- 703c: Number owned now who are normal f. poultry
    "q203_c1", -- 203: Confident will recover c1. livestock disease
    "q204h", -- 204h: Cope w stressful events? will you send child adult to stay w relatives
    "q701_o", -- 701: Number owned now o. stone grain mill
    "q204f", -- 204f: Cope w stressful events? will you migrate (only some family members)
    "q201_g", -- 201: In past 2 months did hh experience g. theft of crops ?
    "q701_e", -- 701: Number owned now e. jewelry
    "q706", -- 706: What has been most significant change in access...over the last two months?
    "q204l", -- 204l: Cope w stressful events? will you take up new wage labor
    "q203_r", -- 203: Confident will recover r. death of household member
    "q503", -- 503: Any food made with vegetables such as onions, cabbage, green leafy veg
    "q201_a", -- 201: In past 2 months did hh experience a. excessive rains ?
    "q202_c1", -- 202: Sevrty impct on income food consumption c1. livestock disease
    "kebele", -- 104: Kebele
    "q204o", -- 204o: Cope w stressful events? will you take out an loan from NGO
    "q504", -- 504: Food 24 hours: any food or fruit juices made from fruits such as mango
    "q203_p", -- 203: Confident will recover p. incr price agr livestock inputs
    "q204e", -- 204e: Cope w stressful events? will you lease out land
    "q204n", -- 204n: Cope w stressful events? will you dell productive assets
    "q401b", -- 401b: Not enough food money, borrow food, rely help from friend relative
    "q702_f", -- 702: Number owned now f. poultry
    "q608", -- 608: Past 4 wks, hh mem go to sleep hungry bc there was not enough food?
    "country", -- Country
    "q201_i", -- 201: In past 2 months did hh experience i. theft of livestock (raids) ?
    "q401i", -- 401i: Not enough food money, feed working HH at expense of non-working
    "q701_c", -- 701: Number owned now c. telephone apparatus
    "q202_n", -- 202: Sevrty impct on income food consumption n. unavailblty agr livestock inpt
    "q204y", -- 204y: Cope w stressful events? will you money from relative that migrated
    "q701_l", -- 701: Number owned now l. spade or shovel
    "q703a_e", -- 703a: Number owned now who are very thin e. camels
    "q603", -- 603: Past 4 wks, hh mem eat limited variety foods due lack resources
    "q202_p", -- 202: Sevrty impct on income food consumption p. incr price agr livestock input
    "q608a", -- 608a: How often did this happen?
    "q204i" -- 204i: Cope w stressful events? will you take children out of school
FROM
    "usaid-gov/feed-the-futureethiopia-primeinterim-surveyoctober-6yx2-sfma:latest"."feed_the_futureethiopia_primeinterim_surveyoctober"
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 usaid-gov/feed-the-futureethiopia-primeinterim-surveyoctober-6yx2-sfma 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 usaid-gov/feed-the-futureethiopia-primeinterim-surveyoctober-6yx2-sfma: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 usaid-gov/feed-the-futureethiopia-primeinterim-surveyoctober-6yx2-sfma

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 usaid-gov/feed-the-futureethiopia-primeinterim-surveyoctober-6yx2-sfma:latest

This will download all the objects for the latest tag of usaid-gov/feed-the-futureethiopia-primeinterim-surveyoctober-6yx2-sfma 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 usaid-gov/feed-the-futureethiopia-primeinterim-surveyoctober-6yx2-sfma: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 usaid-gov/feed-the-futureethiopia-primeinterim-surveyoctober-6yx2-sfma: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, usaid-gov/feed-the-futureethiopia-primeinterim-surveyoctober-6yx2-sfma is just another Postgres schema.

Related Documentation:

Loading...