usaid-gov/ethiopia-pastoralist-areas-resilience-improvement-wre8-4xcy
Icon for Socrata external plugin

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

"usaid-gov/ethiopia-pastoralist-areas-resilience-improvement-wre8-4xcy:latest"."ethiopia_pastoralist_areas_resilience_improvement"

or in a full query, like:

SELECT
    ":id", -- Socrata column ID
    "q501c5", -- Number own now Wooden bed
    "q501p15", -- Number own now Modern Beehive
    "q3061", -- To what extent were you and your household able to recover from 1
    "asset_poor", -- DERIVED: Asset poor corresponds to USD 1.25 poverty threshold
    "q503p17", -- Number owned two years ago Mechanical water pump
    "q502p5", -- Number owned a year ago Leather tie for plough
    "q501p16", -- Number own now Knapsack chemical sprayer
    "q503c8", -- Number owned two years ago Radio
    "q3039", -- During the past one year did your household experience any 9
    "q30110", -- During the last five years (since 2008) did your household experience any 10
    "q502p10", -- Number owned a year ago Pruning Cutting shears
    "q30411", -- How many times did you experience Loss of land due to conflict in the last year?
    "q502c4", -- Number owned a year ago Leather bed
    "q3034", -- During the past one year did your household experience any 4
    "q501c2", -- Number own now Kerosene stove
    "q504c18", -- Did you purchase or pay for any of these Bicycle in the last 12 months
    "q504c10", -- Did you purchase or pay for any of these Television in the last 12 months
    "q3047", -- How many times did you experience Theft of crops in the last year?
    "q30216", -- How many times experience Incr price agricultural livestock inputs last 5 yrs
    "q3035", -- During the past one year did your household experience any 5
    "q3067", -- To what extent were you and your household able to recover from 7
    "q502p9", -- Number owned a year ago Axe
    "q307i", -- 307i. Move to less expensive housing
    "q501p12", -- Number own now Spade or shovel
    "q503p12", -- Number owned two years ago Spade or shovel
    "q502c3", -- Number owned a year ago Sofa
    "q504c14", -- Did you purchase or pay for any of these Firearms in the last 12 months
    "q505c14", -- How much did you pay for these Firearms all together (total) in last 12 months
    "q505c7", -- How much did you pay for these Telephone apparatus all together in last 12 mons
    "q501c17", -- Number own now Wheelbarrow
    "q504c5", -- Did you purchase or pay for any of these Wooden bed in the last 12 months
    "q501p17", -- Number own now Mechanical water pump
    "pastor_status", -- DERIVED: Pastoralist Status
    "q30514", -- How severe was impact of Unavailability..inputs on your income food consumption
    "q502c16", -- Number owned a year ago Modern Table
    "q307u", -- 307u. Receive food aid from an NGO
    "q30316", -- During the past one year did your household experience any 16
    "q501p22", -- Number own now Small tractor
    "q503p7", -- Number owned two years ago Sickle
    "q505c19", -- How much did you pay for these Cart (animal drawn) all together in last 12 mons
    "q501p14", -- Number own now Traditional beehive
    "q3054", -- How severe was impact of Very bad harvets on your income and food consumption
    "q505c4", -- How much did you pay for all these Leather bed all together in last 12 months
    "q3018", -- During the last five years (since 2008) did your household experience any 8
    "q30111", -- During the last five years (since 2008) did your household experience any 11
    "q307b", -- 307b. Sell livestock
    "q3051", -- How severe was the impact of Excessive rains on your income and food consumption
    "q30215", -- How many times experience No demand agricultural livestock products last 5 yrs
    "pf30p", -- DERIVED: Percent females 30 years of age
    "q503p10", -- Number owned two years ago Pruning Cutting shears
    "q405", -- 405. Latrine type
    "q3016", -- During the last five years (since 2008) did your household experience any 6
    "q30511", -- How severe was impact of Loss of land..conflict on your income food consumption
    "q504c17", -- Did you purchase or pay for any of these Wheelbarrow in the last 12 months
    "q3064", -- To what extent were you and your household able to recover from 4
    "q503c17", -- Number owned two years ago Wheelbarrow
    "q502p1", -- Number owned a year ago Plough yoke
    "q30211", -- How many times experience Loss of land due to conflict in the last 5 years
    "q30612", -- To what extent were you and your household able to recover from 12
    "q502c14", -- Number owned a year ago Firearms
    "q30513", -- How severe was impact of Sharp food price incre on your income food consumption
    "q3013", -- During the last five years (since 2008) did your household experience any 3
    "q502p11", -- Number owned a year ago Hoe
    "tlu", -- DERIVED: Tropical Livestock Unit
    "q505c16", -- How much did you pay for all these Modern Table all together in last 12 months
    "q30611", -- To what extent were you and your household able to recover from 11
    "q503p1", -- Number owned two years ago Plough yoke
    "q505c10", -- How much did you pay for these Television all together (total) in last 12 mons
    "q501p18", -- Number own now Motorized water pump (diesel)
    "q30312", -- During the past one year did your household experience any 12
    "q503c1", -- Number owned two years ago Improved charcoal wood stove
    "q503c6", -- Number owned two years ago Metal bed
    "q502p14", -- Number owned a year ago Traditional beehive
    "q501p10", -- Number own now Pruning Cutting shears
    "q501c14", -- Number own now Firearms
    "q502p8", -- Number owned a year ago Pick axe
    "q502c7", -- Number owned a year ago Telephone apparatus
    "q3058", -- How severe was the impact of Theft...assets on your income and food consumption
    "q503c19", -- Number owned two years ago Cart (animal drawn)
    "q3032", -- During the past one year did your household experience any 2
    "q307o", -- 307o. Take out a loan from a bank
    "q503c14", -- Number owned two years ago Firearms
    "q30115", -- During the last five years (since 2008) did your household experience any 15
    "q3017", -- During the last five years (since 2008) did your household experience any 7
    "edmax_none", -- DERIVED: Highest education level in hh: none
    "q30412", -- How many times experience Violence against HH members in the last year
    "q505c23", -- How much did you pay for all these Micro-energy all together in last 12 months
    "q403", -- 403. What materials have been used to construct the floor of the dwelling?
    "q407", -- 407. How long does it take you to fetch water for household use (round trip)?
    "q504c1", -- Did you purchase or pay for any of these Improved...stove in the last 12 months
    "q307a", -- 307a. Send livestock in search of pasture
    "q503c10", -- Number owned two years ago Television
    "q3041", -- How many times did you experience Excessive rains in the last year?
    "q502p22", -- Number owned a year ago Small tractor
    "q501p3", -- Number own now Plough lever
    "q30317", -- During the past one year did your household experience any 17
    "q3055", -- How severe was impact of Landslides erosion on your income and food consumption
    "q3014", -- During the last five years (since 2008) did your household experience any 4
    "q502c2", -- Number owned a year ago Kerosene stove
    "q307j", -- 307j. Reduce food consumption
    "q30613", -- To what extent were you and your household able to recover from 13
    "q502c5", -- Number owned a year ago Wooden bed
    "q502p23", -- Number owned a year ago Hand-held motorized tiller
    "q30217", -- How many times experience Drop price of agricultural livestock prod last 5 yrs
    "q3056", -- How severe was the impact of Theft of money on your income and food consumption?
    "q307p", -- 307p. Take out a loan from a money lender
    "q30416", -- How many times experience Incr price agricultural livestock inputs last yr
    "q30310", -- During the past one year did your household experience any 10
    "q3044", -- How many times did you experience Very bad harvets in the last year?
    "q504c6", -- Did you purchase or pay for any of these Metal bed in the last 12 months
    "q3011", -- During the last five years (since 2008) did your household experience any 1
    "q3024", -- How many times did you experience Very bad harvets in the last 5 years
    "q504c2", -- Did you purchase or pay for any of these Kerosene stove in the last 12 months
    "q502c10", -- Number owned a year ago Television
    "q501c20", -- Number own now Passenger car or truck
    "q501p2", -- Number own now Plough beam
    "q503c3", -- Number owned two years ago Sofa
    "q502p2", -- Number owned a year ago Plough beam
    "q401", -- 401. What type of dwelling do you have?
    "q501p23", -- Number own now Hand-held motorized tiller
    "edmax_none_f", -- DERIVED: Highest education level of females in hh: none
    "q502c1", -- Number owned a year ago Improved charcoal wood stove
    "q504c9", -- Did you purchase or pay for any of these Tape player in the last 12 months
    "q503c16", -- Number owned two years ago Modern Table
    "q505c20", -- How much did you pay for these Passenger...truck all together in last 12 months
    "q30415", -- How many times experience No demand agricultural livestock products last yr
    "q501p20", -- Number own now Motorized grain mill (diesel)
    "q501c12", -- Number own now Jewelry, silver
    "q307e", -- 307e. Migrate (only some family members)
    "q3057", -- How severe was the impact of Theft of crops on your income and food consumption?
    "q3046", -- How many times did you experience Theft of money in the last year?
    "q503p6", -- Number owned two years ago Metal-Plough
    "q307w", -- 307w. Use money from savings
    "q504c20", -- Did you purchase or pay for any of these Passenger car or truck in last 12 mons
    "q30616", -- To what extent were you and your household able to recover from 16
    "q307d", -- 307d. Lease out land
    "q30313", -- During the past one year did your household experience any 13
    "q505c15", -- How much did you pay for all these Modern Chair all together in last 12 months
    "q504c23", -- Did you purchase or pay for any of these Micro-energy...in the last 12 months
    "q501c9", -- Number own now Tape player
    "q503c21", -- Number owned two years ago Generator
    "q30410", -- How many times experience Destruction damage of house due to violience last yr
    "q30112", -- During the last five years (since 2008) did your household experience any 12
    "q501p1", -- Number own now Plough yoke
    "q502c8", -- Number owned a year ago Radio
    "q501c23", -- Number own now Micro-energy (Solar, Hydro, etc)
    "q501p4", -- Number own now Pair of plough blade
    "q505c18", -- How much did you pay for all these Bicycle all together in the last 12 months
    "q502p19", -- Number owned a year ago Stone grain mill
    "q505c17", -- How much did you pay for all these Wheelbarrow all together in last 12 months
    "q505c11", -- How much did you pay for all these Jewelry, gold all together in last 12 months
    "q502c15", -- Number owned a year ago Modern Chair
    "q30414", -- How many times experience Unavailability of agricultural livestock last yr
    "q30213", -- How many times did you experience Sharp food price increase in the last 5 years
    "pm16_30", -- DERIVED: Percent males 16-30 years of age
    "hhsize", -- DERIVED: Number of household members
    "q503p15", -- Number owned two years ago Modern Beehive
    "q503c5", -- Number owned two years ago Wooden bed
    "q3021", -- How many times did you experience Excessive rains in the last 5 years
    "asset_ind_p", -- DERIVED: Total production assets owned
    "q503p16", -- Number owned two years ago Knapsack chemical sprayer
    "q503c20", -- Number owned two years ago Passenger car or truck
    "edmax_prim_f", -- DERIVED: Highest education level of females in hh: primary
    "q30116", -- During the last five years (since 2008) did your household experience any 16
    "pf16_30", -- DERIVED: Percent females 16-30 years of age
    "q307c", -- 307c. Slaughter livestock
    "q505c6", -- How much did you pay for all these Metal bed all together in the last 12 months
    "q501c4", -- Number own now Leather bed
    "q30314", -- During the past one year did your household experience any 14
    "q504c3", -- Did you purchase or pay for any of these Sofa in the last 12 months
    "q30118", -- During the last five years (since 2008) did your household experience any 18
    "asset_ind_p_01", -- DERIVED: Total consumption assets owned, 0-100 scale
    "q3026", -- How many times did you experience Theft of money in the last 5 years
    "q30615", -- To what extent were you and your household able to recover from 15
    "q503c11", -- Number owned two years ago Jewelry, gold
    "asset_ind_c", -- DERIVED: Total consumption assets owned
    "q30418", -- How many times did you experience Death of household member in the last year?
    "q505c12", -- How much did you pay for these Jewelry, silver all together in last 12 months
    "q501p24", -- Number own now Agricultural land (hectares)
    "q30413", -- How many times did you experience Sharp food price increase in the last year?
    "asset_ind_c_01", -- DERIVED: Total consumption assets owned, 0-100 scale
    "q3036", -- During the past one year did your household experience any 6
    "q502p12", -- Number owned a year ago Spade or shovel
    "q502p20", -- Number owned a year ago Motorized grain mill (diesel)
    "q30512", -- How severe was impact of Violence HH members on your income food consumption
    "q502c21", -- Number owned a year ago Generator
    "q501c6", -- Number own now Metal bed
    "q502p4", -- Number owned a year ago Pair of plough blade
    "q503c7", -- Number owned two years ago Telephone apparatus
    "stratum", -- Survey strata
    "q3066", -- To what extent were you and your household able to recover from 6
    "q504c15", -- Did you purchase or pay for any of these Modern Chair in the last 12 months
    "int_group", -- Intervention group
    "q501c16", -- Number own now Modern Table
    "q3022", -- How many times did you experience Too little rain drought in the last 5 years
    "q501c8", -- Number own now Radio
    "woreda", -- Woreda
    "q3062", -- To what extent were you and your household able to recover from 2
    "proj_area", -- DERIVED: Project Area (Zone)
    "q503c22", -- Number owned two years ago Solar lamp
    "q503p4", -- Number owned two years ago Pair of plough blade
    "q3049", -- How many times did you experience Theft or livestock (raids) in the last year?
    "q3033", -- During the past one year did your household experience any 3
    "q505c3", -- How much did you pay for all these Sofa all together (total) in last 12 months
    "q30617", -- To what extent were you and your household able to recover from 17
    "q504c16", -- Did you purchase or pay for any of these Modern Table in the last 12 months
    "q3029", -- How many times did you experience Theft or livestock (raids) in the last 5 years
    "q502c22", -- Number owned a year ago Solar lamp
    "q406", -- 406. What is the main source of drinking water for your household?
    "q307k", -- 307k. Take up new wage labor
    "q502p17", -- Number owned a year ago Mechanical water pump
    "q505c13", -- How much did you pay for these Jewelry, wristwatches together in last 12 months
    "q502c6", -- Number owned a year ago Metal bed
    "q30518", -- How severe was impact of Death of HH member on your income and food consumption
    "q501p8", -- Number own now Pick axe
    "q30311", -- During the past one year did your household experience any 11
    "q501p6", -- Number own now Metal-Plough
    "q3063", -- To what extent were you and your household able to recover from 3
    "q502c11", -- Number owned a year ago Jewelry, gold
    "q3065", -- To what extent were you and your household able to recover from 5
    "q504c22", -- Did you purchase or pay for any of these Solar lamp in the last 12 months
    "q501p21", -- Number own now Broad bed maker (oxen-pulled)
    "q501p13", -- Number own now Whip (leather)
    "q30516", -- How severe was impact of Increase...inputs on your income and food consumption
    "q504c12", -- Did you purchase or pay for any of these Jewelry, silver in the last 12 months
    "q503c2", -- Number owned two years ago Kerosene stove
    "hhae", -- DERIVED: Number of household adult equivalents
    "q3038", -- During the past one year did your household experience any 8
    "q3031", -- During the past one year did your household experience any 1
    "q501c1", -- Number own now Improved charcoal wood stove
    "q503c23", -- Number owned two years ago Micro-energy (Solar, Hydro, etc)
    "q504c13", -- Did you purchase or pay for any of these Jewelry, wristwatche in last 12 months
    "q404", -- 404. How many rooms are in the dwelling?
    "q307x", -- 307x. Get money from a relative that migrated (remittances)
    "q307l", -- 307l. Sell household items (e.g., radio, bed)
    "q307t", -- 307t. Receive food aid from the government
    "q3048", -- How many times experience Theft or destruction of assets in the last year
    "q503p14", -- Number owned two years ago Traditional beehive
    "q502c12", -- Number owned a year ago Jewelry, silver
    "q30614", -- To what extent were you and your household able to recover from 14
    "q30610", -- To what extent were you and your household able to recover from 10
    "q502c13", -- Number owned a year ago Jewelry, wristwatches
    "q30515", -- How severe was impact of No demand...products on your income food consumption
    "q3028", -- How many times experience Theft or destruction of assets in the last 5 years
    "q30212", -- How many times experience Violence against household members in the last 5 yrs
    "q503p11", -- Number owned two years ago Hoe
    "q502c18", -- Number owned a year ago Bicycle
    "q30618", -- To what extent were you and your household able to recover from 18
    "q503p5", -- Number owned two years ago Leather tie for plough
    "q3042", -- How many times did you experience Too little rain drought in the last year?
    "q504c19", -- Did you purchase or pay for any of these Cart (animal drawn) in last 12 months
    "q3015", -- During the last five years (since 2008) did your household experience any 5
    "q505c8", -- How much did you pay for all these Radio all together (total) in last 12 months
    "q501c11", -- Number own now Jewelry, gold
    "q505c21", -- How much did you pay for all these Generator all together in the last 12 months
    "edmax_prim", -- DERIVED: Highest education level in hh: primary
    "q502c19", -- Number owned a year ago Cart (animal drawn)
    "q503c15", -- Number owned two years ago Modern Chair
    "q501c7", -- Number own now Telephone apparatus
    "q307r", -- 307r. Send children to work for money (e.g., domestic service)
    "q505c2", -- How much did you pay for these Kerosene stove all together in last 12 months
    "q503c4", -- Number owned two years ago Leather bed
    "q502p6", -- Number owned a year ago Metal-Plough
    "q307g", -- 307g. Send children or an adult to stay with relatives
    "q504c21", -- Did you purchase or pay for any of these Generator in the last 12 months
    "q501c19", -- Number own now Cart (animal drawn)
    "q30417", -- How many times experience Drop price of agricultural livestock prod last yr
    "q501p19", -- Number own now Stone grain mill
    "income_poor", -- DERIVED: Total Per Capita Daily Expenditures USD 1.25
    "pm30p", -- DERIVED: Percent males 30 years of age
    "q30318", -- During the past one year did your household experience any 18
    "q503p9", -- Number owned two years ago Axe
    "asset_index", -- DERIVED: Total Asset Ownership Index
    "q307n", -- 307n. Take out a loan from an NGO
    "q502p18", -- Number owned a year ago Motorized water pump (diesel)
    "q503c18", -- Number owned two years ago Bicycle
    "q501p7", -- Number own now Sickle
    "q307s", -- 307s. Receive money or food from family members
    "q502p21", -- Number owned a year ago Broad bed maker (oxen-pulled)
    "q3043", -- How many times did you experience Livestock crop disease in the last year?
    "q3012", -- During the last five years (since 2008) did your household experience any 2
    "q307v", -- 307v. Participate in food-for-work or cash-for-work
    "q501c21", -- Number own now Generator
    "q503p8", -- Number owned two years ago Pick axe
    "pf0_16", -- DERIVED: Percent females 0-16 years of age
    "samplewt", -- DERIVED: sample weights
    "q501c10", -- Number own now Television
    "q3068", -- To what extent were you and your household able to recover from 8
    "kcal_req_l", -- DERIVED: Hh calorie req: light
    "q503c13", -- Number owned two years ago Jewelry, wristwatches
    "q501p5", -- Number own now Leather tie for plough
    "q3023", -- How many times did you experience Livestock crop disease in the last 5 years
    "q3059", -- How severe was impact of Theft or livestock on your income and food consumption
    "q501p9", -- Number own now Axe
    "q501c15", -- Number own now Modern Chair
    "q503p2", -- Number owned two years ago Plough beam
    "q402", -- 402. What materials have been used to construct the roof of the dwelling?
    "edmax_sec", -- DERIVED: Highest education level in hh: secondary or higher
    "q502p3", -- Number owned a year ago Plough lever
    "q501c18", -- Number own now Bicycle
    "q3052", -- How severe was impact of Too little...drought on your income food consumption
    "q505c1", -- How much did you pay for these Improved...stove all together in last 12 months
    "edmax_sec_f", -- DERIVED: Highest education level of females in hh: secondary or higher
    "q3027", -- How many times did you experience Theft of crops in the last 5 years
    "q502p15", -- Number owned a year ago Modern Beehive
    "q502p7", -- Number owned a year ago Sickle
    "q30210", -- How many times experience Destruction damage of house due to violience
    "q503c9", -- Number owned two years ago Tape player
    "q3069", -- To what extent were you and your household able to recover from 9
    "q504c8", -- Did you purchase or pay for any of these Radio in the last 12 months
    "pm0_16", -- DERIVED: Percent males 0-16 years of age
    "q3019", -- During the last five years (since 2008) did your household experience any 9
    "q3053", -- How severe was impact of Livestock crop disease on your income food consumption
    "q30218", -- How many times did you experience Death of household member in the last 5 years
    "q307m", -- 307m. Sell productive assets (e.g., plough, water pump)
    "q502c17", -- Number owned a year ago Wheelbarrow
    "q502p16", -- Number owned a year ago Knapsack chemical sprayer
    "q3037", -- During the past one year did your household experience any 7
    "q505c9", -- How much did you pay for all these Tape player all together in last 12 months
    "q501c22", -- Number own now Solar lamp
    "q30315", -- During the past one year did your household experience any 15
    "q503c12", -- Number owned two years ago Jewelry, silver
    "q505c5", -- How much did you pay for all these Wooden bed all together in last 12 months
    "q505c22", -- How much did you pay for all these Solar lamp all together in the last 12 mons
    "q30117", -- During the last five years (since 2008) did your household experience any 17
    "q30114", -- During the last five years (since 2008) did your household experience any 14
    "q3025", -- How many times did you experience Landslides erosion in the last 5 years
    "q502c20", -- Number owned a year ago Passenger car or truck
    "q504c4", -- Did you purchase or pay for any of these Leather bed in the last 12 months
    "q30214", -- How many times experience Unavailability of agricultural livestock last 5 yrs
    "q504c7", -- Did you purchase or pay for any of these Telephone apparatus in last 12 months
    "q502p13", -- Number owned a year ago Whip (leather)
    "q502c9", -- Number owned a year ago Tape player
    "q307f", -- 307f. Migrate (the whole family)
    "q501c3", -- Number own now Sofa
    "q3045", -- How many times did you experience Landslides erosion in the last year?
    "fem_only", -- DERIVED: Household with all adult females
    "q307q", -- 307q. Take out a loan from friends or relatives
    "q502p24", -- Number owned a year ago Agricultural land (hectares)
    "q30510", -- How severe was impact of Destruction..violience on your income food consumption
    "q504c11", -- Did you purchase or pay for any of these Jewelry, gold in the last 12 months
    "q502c23", -- Number owned a year ago Micro-energy (Solar, Hydro, etc)
    "q503p3", -- Number owned two years ago Plough lever
    "q503p13", -- Number owned two years ago Whip (leather)
    "q30113", -- During the last five years (since 2008) did your household experience any 13
    "q30517", -- How severe was impact of Drop in...products on your income and food consumption
    "q307h", -- 307h. Take children out of school
    "q501p11", -- Number own now Hoe
    "q501c13", -- Number own now Jewelry, wristwatches
    "q307y" -- 307y. Other
FROM
    "usaid-gov/ethiopia-pastoralist-areas-resilience-improvement-wre8-4xcy:latest"."ethiopia_pastoralist_areas_resilience_improvement"
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/ethiopia-pastoralist-areas-resilience-improvement-wre8-4xcy with SQL in under 60 seconds.

This repository is an "external" repository. That means it's hosted elsewhere, in this case at data.usaid.gov. When you queryusaid-gov/ethiopia-pastoralist-areas-resilience-improvement-wre8-4xcy:latest on the DDN, we "mount" the repository using the socrata mount handler. The mount handler proxies your SQL query to the upstream data source, translating it from SQL to the relevant language (in this case SoQL).

We also cache query responses on the DDN, but we run the DDN on multiple nodes so a CACHE_HIT is only guaranteed for subsequent queries that land on the same node.

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 (like this repository), 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, where the author has pushed Splitgraph Images to the repository, you can "clone" and/or "checkout" the data using sgr cloneand sgr checkout.

Mounting Data

This repository is an external repository. It's not hosted by Splitgraph. It is hosted by data.usaid.gov, and Splitgraph indexes it. This means it is not an actual Splitgraph image, so you cannot use sgr clone to get the data. Instead, you can use the socrata adapter with the sgr mount command. Then, if you want, you can import the data and turn it into a Splitgraph image that others can clone.

First, install Splitgraph if you haven't already.

Mount the table with sgr mount

sgr mount socrata \
  "usaid-gov/ethiopia-pastoralist-areas-resilience-improvement-wre8-4xcy" \
  --handler-options '{
    "domain": "data.usaid.gov",
    "tables": {
        "ethiopia_pastoralist_areas_resilience_improvement": "wre8-4xcy"
    }
}'

That's it! Now you can query the data in the mounted table like any other Postgres table.

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/ethiopia-pastoralist-areas-resilience-improvement-wre8-4xcy is just another Postgres schema.