usaid-gov/feed-the-future-nepal-baseline-household-survey-h8u5-uvnp
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_future_nepal_baseline_household_survey table in this repository, by referencing it like:

"usaid-gov/feed-the-future-nepal-baseline-household-survey-h8u5-uvnp:latest"."feed_the_future_nepal_baseline_household_survey"

or in a full query, like:

SELECT
    ":id", -- Socrata column ID
    "he",
    "e07_c", -- G4 05 Are you an active member of this forest user s group
    "zid_fuel_src_2",
    "modd_missing", -- Missing all elements from module D
    "c05_h",
    "c12_c", -- G3 09 Who makes the decision about what to do with the money item borrowed from formal lender
    "c04_h",
    "c04_j",
    "g404_b", -- Is there a GROUP in your community B Water users group
    "c09_i",
    "e07_b", -- G4 05 Are you an active member of this water user s group
    "c04_l",
    "c11_c", -- G3 08 Who made the decision to borrow from formal lender
    "modf_missing", -- Missing all elements from module F
    "c04_n",
    "country",
    "g404_a", -- Is there a GROUP in your community A Agricultural livestock fisheries producer s group including marketing groups
    "ci",
    "zid_toilet_tp_obsrv", -- D05 b ENUMERATOR OBSERVE DO NOT ASK Is there a toilet
    "g05_d", -- G5 05 Regarding taking crops to the market or not I do what I do because I personally think it is the right thing to do
    "c06_n",
    "npoor_z105",
    "gpi",
    "g02_c", -- To what extent do you feel you can make your own personal decisions regarding these aspects of household life if you want ed to B The types of crops to grow for agricultural production
    "c09_h",
    "c06_j",
    "raiprod_any",
    "zia_region_cd", -- A06 Region
    "a06", -- Type of household
    "zid_toilet_tp_2", -- What kind of toilet facility does the household have
    "c06_m",
    "zia_visit2_yn", -- Was a second visit necessary to complete the interview
    "a04",
    "ci_above",
    "c06_h",
    "c05_m",
    "zia_int_outcome", -- A21 Final outcome of interview enter code
    "c01b_g", -- How many of ITEM does your household currently have G Farm equipment mechanized
    "c01b_e", -- How many of ITEM does your household currently have E Fish pond or fishing equipment
    "zig1_respondent_id",
    "c04_d", -- G3 03 Who would you say can decide whether to sell chickens ducks turkeys or pigeons most of the time
    "jown_count",
    "speakpublic_any",
    "g404_d", -- Is there a GROUP in your community D Credit or microfinance group including SACCOs merry go rounds VSLAs
    "zid_fuel_src_oth_sp",
    "hp",
    "g01_i", -- When decisions are made regarding the following aspects of household life who is it that normally takes the decision G Minor household expenditures such as food for daily consumption or other household needs
    "c06_i",
    "c10_c", -- Has anyone in your household taken any loans or borrowed cash in kind from SOURCE in the past 12 months C Formal lender bank financial institution
    "b03_4", -- G2 03 How much input did you have in decisions on the use of income generated from non farm activities
    "g404_h", -- Is there a GROUP in your community H Local government
    "c02_n", -- G3 02 Who would you say owns most of the means of transportation
    "b01_3", -- Did you singular participate in ACTIVITY in the past 12 months that is during the last one two cropping seasons C Livestock raising
    "c09_l",
    "g03_d", -- G5 03 My actions in taking crops to the market or not are partly because I will get in trouble with someone if I act differently
    "zid_ext_wall_tp_oth_sp",
    "g03_e", -- G5 03 My actions in livestock raising are partly because I will get in trouble with someone if I act differently
    "g404_f", -- Is there a GROUP in your community F Trade and business association
    "zid_toilet_tp_oth_sp",
    "c09_n",
    "g03_b", -- G5 03 My actions in getting inputs for agricultural production are partly because I will get in trouble with someone if I act differently
    "g02_i", -- To what extent do you feel you can make your own personal decisions regarding these aspects of household life if you want ed to G Minor household expenditures such as food for daily consumption or other household needs
    "f03", -- In the past 4 weeks 30 days did you or any household member go to sleep at night hungry because there was not enough food
    "c05_e", -- G3 04 Who would you say can decide whether to give away fish pond or fishing equipment most of the time
    "ci_gap",
    "c01a_i", -- Does anyone in your household currently have any ITEM I House and other structures
    "credjanydec_any",
    "c05_l",
    "c06_e", -- G3 05 Who would you say can decide to mortgage or rent out fish pond or fishing equipment most of the time
    "b01_5", -- Did you singular participate in ACTIVITY in the past 12 months that is during the last one two cropping seasons E Wage and salary employment in kind or monetary work both agriculture and other wage work
    "c05_f", -- G3 04 Who would you say can decide whether to give away non mechanized farm equipment most of the time
    "zid_roof_tp_oth_sp",
    "d01", -- Roof top material outer covering
    "c10_a", -- Has anyone in your household taken any loans or borrowed cash in kind from SOURCE in the past 12 months A Non governmental organization NGO
    "f05", -- In the past 4 weeks 30 days did you or any household member go a whole day and night without eating anything at all because there was not enough food
    "e07_k", -- G4 05 Are you an active member of this grp exst spec
    "c12_b", -- G3 09 Who makes the decision about what to do with the money item borrowed from informal lender
    "c05_k",
    "c09_j",
    "b03_1", -- G2 03 How much input did you have in decisions on the use of income generated from food crop farming
    "c01a_b", -- Does anyone in your household currently have any ITEM B Large livestock oxen cattle
    "c05_i",
    "g404_j", -- Is there a GROUP in your community J Other women s group only if it does not fit into one of the other categories
    "aa",
    "c01a_c", -- Does anyone in your household currently have any ITEM C Small livestock goats pigs sheep
    "zid_drink_water_src_other_1",
    "c05_j",
    "b01_4", -- Did you singular participate in ACTIVITY in the past 12 months that is during the last one two cropping seasons D Non farm economic activities Small business self employment buy and sell
    "f01", -- In the past 4 weeks 30 days was there ever no food to eat of any kind in your house because of lack of resources to get food
    "c04_m",
    "c01b_f", -- How many of ITEM does your household currently have F Farm equipment non mechanized
    "c02_b", -- G3 02 Who would you say owns most of the large livestock
    "c02_g", -- G3 02 Who would you say owns most of the mechanized farm equipment
    "c02_k", -- G3 02 Who would you say owns most of the small consumer durables
    "c04_c", -- G3 03 Who would you say can decide whether to sell small livestock most of the time
    "c05_a", -- G3 04 Who would you say can decide whether to give away agricultural land most of the time
    "c05_g", -- G3 04 Who would you say can decide whether to give away mechanized farm equipment most of the time
    "c05_n",
    "c02_m", -- G3 02 Who would you say owns most of the other non agricultural land
    "c04_i",
    "g05_c", -- G5 05 Regarding the types of crops to grow I do what I do because I personally think it is the right thing to do
    "zid_feces_present", -- Is there human feces in the house compound or rightoutside the compound
    "f02", -- How often did this happen in the past 4 weeks 30 days
    "leisuretime",
    "b02_6", -- G2 02 How much input did you have in making decisions about Fishing or fishpond culture
    "g04_d", -- G5 04 Regarding taking crops to the market or not I do what I do so others don t think poorly of me
    "c04_a", -- G3 03 Who would you say can decide whether to sell agricultural land most of the time
    "g02_e", -- To what extent do you feel you can make your own personal decisions regarding these aspects of household life if you want ed to D Livestock raising
    "g02_d", -- To what extent do you feel you can make your own personal decisions regarding these aspects of household life if you want ed to C Taking crops to the market or not
    "c06_c", -- G3 05 Who would you say can decide to mortgage or rent out small livestock most of the time
    "c06_k",
    "c09_f", -- G3 06 Who contributes most to decisions regarding a new purchase of non mechanized farm equipment
    "c09_k",
    "c09_m",
    "c10_b", -- Has anyone in your household taken any loans or borrowed cash in kind from SOURCE in the past 12 months B Informal lender
    "c10_d", -- Has anyone in your household taken any loans or borrowed cash in kind from SOURCE in the past 12 months D Friends or relatives
    "c10_e", -- Has anyone in your household taken any loans or borrowed cash in kind from SOURCE in the past 12 months E Group based micro finance or lending including VSLAs SACCOs merry go rounds
    "c11_b", -- G3 08 Who made the decision to borrow from informal lender
    "c11_d", -- G3 08 Who made the decision to borrow from friends or relatives
    "c12_e", -- G3 09 Who makes the decision about what to do with the money item borrowed from group based micro finance or lending
    "e02_b", -- Do you feel comfortable speaking up in public to ensure proper payment of wages for public works or other similar programs
    "e02_c", -- G4 03 Do you feel comfortable speaking up in public to protest the misbehavior of authorities or elected officials
    "g404_e", -- Is there a GROUP in your community E Mutual help or insurance group including burial societies
    "g404_k", -- Is there a GROUP in your community K Other specify
    "c02_l", -- G3 02 Who would you say owns most of the cell phones
    "d06", -- D06 aWhat is the main source of drinking water formembers of your household
    "d04", -- D04 How many rooms are there in this dwelling
    "c06_g", -- G3 05 Who would you say can decide to mortgage or rent out mechanized farm equipment most of the time
    "zia_cluster_cd", -- A02 Cluster number
    "c06_f", -- G3 05 Who would you say can decide to mortgage or rent out non mechanized farm equipment most of the time
    "a17", -- A17 Team and interviewer s code number
    "g01_g", -- When decisions are made regarding the following aspects of household life who is it that normally takes the decision E Your own singular wage or salary employment
    "c09_b", -- G3 06 Who contributes most to decisions regarding a new purchase of large livestock
    "c05_c", -- G3 04 Who would you say can decide whether to give away small livestock most of the time
    "c01a_h", -- Does anyone in your household currently have any ITEM H Nonfarm business equipment blacksmith cobbler tailor auto repair shop
    "e07_g", -- G4 05 Are you an active member of these civic groups
    "e07_j", -- G4 05 Are you an active member of this other women s group
    "g03_c", -- G5 03 My actions in the types of crops to grow are partly because I will get in trouble with someone if I act differently
    "e02_a", -- Do you feel comfortable speaking up in public to help decide on infrastructure like small wells roads water supplies to be built in your community
    "wt_weai_2",
    "urbrur", -- Urban rural
    "e07_a", -- G4 05 Are you an active member of this agricultural livestock fisheries producer s group
    "c01a_f", -- Does anyone in your household currently have any ITEM F Farm equipment non mechanized
    "d05", -- D05 a What is the main type of toilets your household uses
    "g04_e", -- G5 04 Regarding livestock raising I do what I do so others don t think poorly of me
    "c06_b", -- G3 05 Who would you say can decide to mortgage or rent out large livestock most of the time
    "wt_weai_1",
    "zia_district_cd", -- A05 District
    "f04b", -- G6 02 How satisfied are you with your available time for leisure activities like visiting neighbors watching TV listening to the radio seeing movies or doing sports
    "incdec_count",
    "b01_1", -- Did you singular participate in ACTIVITY in the past 12 months that is during the last one two cropping seasons A Food crop farming crops that are grown primarily for household food consumption
    "b02_3", -- G2 02 How much input did you have in making decisions about livestock raising
    "b02_4", -- G2 02 How much input did you have in making decisions about non farm activities
    "b03_5", -- G2 03 How much input did you have in decisions on the use of income generated from wage and salary employment
    "c01a_a", -- Does anyone in your household currently have any ITEM A Agricultural land pieces plots
    "g04_b", -- G5 04 Regarding getting inputs for agricultural production I do what I do so others don t think poorly of me
    "g02_g", -- To what extent do you feel you can make your own personal decisions regarding these aspects of household life if you want ed to E Your own singular wage or salary employment
    "c01a_e", -- Does anyone in your household currently have any ITEM E Fish pond or fishing equipment
    "c01a_j", -- Does anyone in your household currently have any ITEM J Large consumer durables fridge TV sofa
    "c01a_l", -- Does anyone in your household currently have any ITEM L Cell phone
    "c01a_m", -- Does anyone in your household currently have any ITEM M Other land not used for agricultural purposes pieces residential or commercial land
    "g01_h", -- When decisions are made regarding the following aspects of household life who is it that normally takes the decision F Major household expenditures such as a large appliance for the house like refrigerator
    "g01_d", -- When decisions are made regarding the following aspects of household life who is it that normally takes the decision C Taking crops to the market or not
    "g01_e", -- When decisions are made regarding the following aspects of household life who is it that normally takes the decision D Livestock raising
    "g01_c", -- When decisions are made regarding the following aspects of household life who is it that normally takes the decision B The types of crops to grow for agricultural production
    "e07_d", -- G4 05 Are you an active member of this credit or microfinance group
    "a12", -- G1 06 Ability to be interviewed alone
    "a05", -- G1 03 Sex of respondent
    "c12_d", -- G3 09 Who makes the decision about what to do with the money item borrowed from friends or relatives
    "c12_a", -- G3 09 Who makes the decision about what to do with the money item borrowed from non governmental organization
    "c11_e", -- G3 08 Who made the decision to borrow from group based micro finance or lending
    "c11_a", -- G3 08 Who made the decision to borrow from non governmental organization
    "c09_e", -- G3 06 Who contributes most to decisions regarding a new purchase of fish pond or fishing equipment
    "c09_d", -- G3 06 Who contributes most to decisions regarding a new purchase of chickens ducks turkeys or pigeons
    "c05_b", -- G3 04 Who would you say can decide whether to give away large livestock most of the time
    "c04_b", -- G3 03 Who would you say can decide whether to sell large livestock most of the time
    "c02_j", -- G3 02 Who would you say owns most of the large consumer durables
    "c02_h", -- G3 02 Who would you say owns most of the nonfarm business equipment
    "c02_f", -- G3 02 Who would you say owns most of the non mechanized farm equipment
    "c02_d", -- G3 02 Who would you say owns most of the chickens ducks turkeys or pigeons
    "c02_c", -- G3 02 Who would you say owns most of the small livestock
    "c01b_m", -- How many of ITEM does your household currently have M Other land not used for agricultural purposes pieces residential or commercial land
    "c01b_l", -- How many of ITEM does your household currently have L Cell phone
    "c01b_j", -- How many of ITEM does your household currently have J Large consumer durables fridge TV sofa
    "c01b_i", -- How many of ITEM does your household currently have I House and other structures
    "c01b_h", -- How many of ITEM does your household currently have H Nonfarm business equipment blacksmith cobbler tailor auto repair shop
    "c01b_d", -- How many of ITEM does your household currently have D Chickens Ducks Turkeys Pigeons
    "c01b_c", -- How many of ITEM does your household currently have C Small livestock goats pigs sheep
    "c01a_k", -- Does anyone in your household currently have any ITEM K Small consumer durables radio cookware
    "c01a_d", -- Does anyone in your household currently have any ITEM D Chickens Ducks Turkeys Pigeons
    "b03_6", -- G2 03 How much input did you have in decisions on the use of income generated from Fishing or fishpond culture
    "b03_2", -- G2 03 How much input did you have in decisions on the use of income generated from cash crop farming
    "b02_1", -- G2 02 How much input did you have in making decisions about food crop farming
    "b01_6", -- Did you singular participate in ACTIVITY in the past 12 months that is during the last one two cropping seasons F Fishing or fishpond culture
    "b01_2", -- Did you singular participate in ACTIVITY in the past 12 months that is during the last one two cropping seasons B Cash crop farming crops that are grown primary for sale in the market
    "e07_i", -- G4 05 Are you an active member of this religious group
    "g404_i", -- Is there a GROUP in your community I Religious group
    "ea_20p",
    "c06_l",
    "zia_location_cd", -- A03 Ward
    "c01b_a", -- How many of ITEM does your household currently have A Agricultural land pieces plots
    "c02_a", -- G3 02 Who would you say owns most of the agricultural land
    "d02", -- Floor material
    "zid_drink_water_src_other", -- Please specify drinking water source
    "zid_water_src_seasonal", -- D06 bDo you use the main drinking water source allyear or only part of the year
    "groupmember_any",
    "ch_20p",
    "b02_2", -- G2 02 How much input did you have in making decisions about cash crop farming
    "b02_5", -- G2 02 How much input did you have in making decisions about wage and salary employment
    "b03_3", -- G2 03 How much input did you have in decisions on the use of income generated from livestock raising
    "c01a_g", -- Does anyone in your household currently have any ITEM G Farm equipment mechanized
    "c01a_n", -- Does anyone in your household currently have any ITEM N Means of transportation bicycle motorcycle car
    "c01b_b", -- How many of ITEM does your household currently have B Large livestock oxen cattle
    "c01b_k", -- How many of ITEM does your household currently have K Small consumer durables radio cookware
    "c01b_n", -- How many of ITEM does your household currently have N Means of transportation bicycle motorcycle car
    "c02_e", -- G3 02 Who would you say owns most of the fish ponds or fishing equipment
    "c02_i", -- G3 02 Who would you say owns most of the houses and other structures
    "c04_e", -- G3 03 Who would you say can decide whether to sell fish pond or fishing equipment most of the time
    "c04_f", -- G3 03 Who would you say can decide whether to sell non mechanized farm equipment most of the time
    "c04_g", -- G3 03 Who would you say can decide whether to sell mechanized farm equipment most of the time
    "c04_k",
    "c05_d", -- G3 04 Who would you say can decide whether to give away chickens ducks turkeys or pigeons most of the time
    "c06_a", -- G3 05 Who would you say can decide to mortgage or rent out agricultural land most of the time
    "c06_d", -- G3 05 Who would you say can decide to mortgage or rent out chickens ducks turkeys or pigeons most of the time
    "c09_a", -- G3 06 Who contributes most to decisions regarding a new purchase of agricultural land
    "c09_c", -- G3 06 Who contributes most to decisions regarding a new purchase of small livestock
    "c09_g", -- G3 06 Who contributes most to decisions regarding a new purchase of mechanized farm equipment
    "g404_g", -- Is there a GROUP in your community G Civic groups improving community or charitable group helping others
    "g404_c", -- Is there a GROUP in your community C Forest users group
    "e07_h", -- G4 05 Are you an active member of this local government
    "e07_e", -- G4 05 Are you an active member of this mutual help or insurance group
    "e07_f", -- G4 05 Are you an active member of this trade and business association
    "g01_b", -- When decisions are made regarding the following aspects of household life who is it that normally takes the decision A Getting inputs for agricultural production
    "g02_b", -- To what extent do you feel you can make your own personal decisions regarding these aspects of household life if you want ed to A Getting inputs for agricultural production
    "g02_h", -- To what extent do you feel you can make your own personal decisions regarding these aspects of household life if you want ed to F Major household expenditures such as a large appliance for the house like refrigerator
    "g04_c", -- G5 04 Regarding the types of crops to grow I do what I do so others don t think poorly of me
    "g05_b", -- G5 05 Regarding getting inputs for agricultural production I do what I do because I personally think it is the right thing to do
    "g05_e", -- G5 05 Regarding livestock raising I do what I do because I personally think it is the right thing to do
    "zia_visit2_dt", -- A19 Date of second visit dd mm yyyy
    "zi_start_dt",
    "zid_floor_tp_oth_sp",
    "d03", -- Exterior Walls
    "d07", -- D07 Does this household have electricity
    "d08", -- D08 What is the main source of cooking fuel for your household
    "f04", -- How often did this happen in the past 4 weeks 30 days
    "pbs_id", -- Unique household ID
    "weaiwght",
    "feelinputdecagr",
    "jrightanyagr",
    "rp",
    "zia_supervisor_cd", -- A22 Name code of supervisor
    "f06" -- How often did this happen in the past 4 weeks 30 days
FROM
    "usaid-gov/feed-the-future-nepal-baseline-household-survey-h8u5-uvnp:latest"."feed_the_future_nepal_baseline_household_survey"
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-future-nepal-baseline-household-survey-h8u5-uvnp 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-future-nepal-baseline-household-survey-h8u5-uvnp: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-future-nepal-baseline-household-survey-h8u5-uvnp

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-future-nepal-baseline-household-survey-h8u5-uvnp:latest

This will download all the objects for the latest tag of usaid-gov/feed-the-future-nepal-baseline-household-survey-h8u5-uvnp 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-future-nepal-baseline-household-survey-h8u5-uvnp: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-future-nepal-baseline-household-survey-h8u5-uvnp: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-future-nepal-baseline-household-survey-h8u5-uvnp is just another Postgres schema.

Related Documentation:

Loading...