usaid-gov/data-on-food-consumption-in-zinder-and-maradi-in-u5nz-v4bq
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 data_on_food_consumption_in_zinder_and_maradi_in table in this repository, by referencing it like:

"usaid-gov/data-on-food-consumption-in-zinder-and-maradi-in-u5nz-v4bq:latest"."data_on_food_consumption_in_zinder_and_maradi_in"

or in a full query, like:

SELECT
    ":id", -- Socrata column ID
    "h202_010", -- Did you buy or use any in the past 7 days
    "h303_002", -- How much did they cost FCFA
    "h302_003", -- Did you consume any in the past one month
    "h302_011", -- Did you consume any in the past one month
    "h303_011", -- How much did they cost FCFA
    "h303_023", -- How much did they cost FCFA
    "h403_003", -- How much did they cost FCFA
    "h402_006", -- Did you consume any in the past 12 months
    "h402_008", -- Did you consume any in the past 12 months
    "h403_008", -- How much did they cost FCFA
    "h403_010", -- How much did they cost FCFA
    "h401_015", -- 315 CODE for household linens and associated articles bath towels sheets etc
    "h401_016", -- 316 CODE for crockery plates knives etc
    "h402_019", -- Did you consume any in the past 12 months
    "h403_022", -- How much did they cost FCFA
    "h402_023", -- Did you consume any in the past 12 months
    "h403_023", -- How much did they cost FCFA
    "h402_024", -- Did you consume any in the past 12 months
    "h403_030", -- How much did they cost FCFA
    "h402_032", -- Did you consume any in the past 12 months
    "h403_033", -- How much did they cost FCFA
    "h403_034", -- How much did they cost FCFA
    "h402_051", -- Did you consume any in the past 12 months
    "h301_014", -- 214 CODE for Papier toilette
    "h302_012", -- Did you consume any in the past one month
    "h402_011", -- Did you consume any in the past 12 months
    "h401_029", -- 329 CODE for tickets to sporting events cinema concert theatre museum expositions etc
    "h301_001", -- 201 CODE for Gaz domestique
    "h402_037", -- Did you consume any in the past 12 months
    "h401_031", -- 331 CODE for other cultural services non school books comic strips ream of paper envelopes etc
    "h301_017", -- 217 CODE for Frais de communication t l phonique dans une cabine
    "h401_021", -- 321 CODE for material to maintain and repair the dwelling
    "h301_025", -- 225 CODE for Transport traction animale
    "h401_052", -- 415 CODE for housing taxes buildings and undeveloped taxes for garbage collection
    "h403_001", -- How much did they cost FCFA
    "h403_002", -- How much did they cost FCFA
    "h402_003", -- Did you consume any in the past 12 months
    "h403_004", -- How much did they cost FCFA
    "h401_005", -- 305 CODE for underclothes for women 15 yrs older
    "h403_005", -- How much did they cost FCFA
    "h403_006", -- How much did they cost FCFA
    "h403_007", -- How much did they cost FCFA
    "h402_009", -- Did you consume any in the past 12 months
    "h403_009", -- How much did they cost FCFA
    "h402_010", -- Did you consume any in the past 12 months
    "h403_011", -- How much did they cost FCFA
    "h403_012", -- How much did they cost FCFA
    "h403_013", -- How much did they cost FCFA
    "h403_014", -- How much did they cost FCFA
    "h403_015", -- How much did they cost FCFA
    "h402_016", -- Did you consume any in the past 12 months
    "h403_016", -- How much did they cost FCFA
    "h403_017", -- How much did they cost FCFA
    "h403_018", -- How much did they cost FCFA
    "h403_020", -- How much did they cost FCFA
    "h403_021", -- How much did they cost FCFA
    "h403_024", -- How much did they cost FCFA
    "h402_025", -- Did you consume any in the past 12 months
    "h401_026", -- 326 CODE for repair of electrical equipment iron fridge cooker oven etc
    "h403_027", -- How much did they cost FCFA
    "h403_028", -- How much did they cost FCFA
    "h403_031", -- How much did they cost FCFA
    "h403_032", -- How much did they cost FCFA
    "h402_034", -- Did you consume any in the past 12 months
    "h401_039", -- 402 CODE for professional training
    "h402_039", -- Did you consume any in the past 12 months
    "h401_040", -- 403 CODE for expenses for adult courses
    "h403_040", -- How much did they cost FCFA
    "h401_043", -- 406 CODE for dental prosthesis
    "h105_114", -- Haricot bouilli How much did you spend FCFA
    "h101_114", -- Haricot bouilli 814
    "h105_113", -- Autres preparation a base de mil sorgho mais How much did you spend FCFA
    "h102_113", -- Autres preparation a base de mil sorgho mais Did you eat any in the past 7 days
    "h101_113", -- Autres preparation a base de mil sorgho mais 813
    "h105_112", -- Preparation a base de mais How much did you spend FCFA
    "h105_111", -- Preparation a base de sorgho How much did you spend FCFA
    "h102_109", -- Boule de milsans lait Did you eat any in the past 7 days
    "h102_108", -- Boule de mil avec du lait Did you eat any in the past 7 days
    "h105_107", -- Boissons alcooliques How much did you spend FCFA
    "h104u_107", -- Boissons alcooliques How much came from purchases Unit
    "h103u_107", -- Boissons alcooliques How much did you eat in the past 7 days Unit
    "h401_017", -- 317 CODE for cooking utensils saucepan pot etc
    "h401_004", -- 304 CODE for clothing for women 15 yrs older
    "h401_011", -- 311 CODE for men s shoes
    "h302_008", -- Did you consume any in the past one month
    "h301_016", -- 216 CODE for Frais de timbre postaux etc
    "h302_026", -- Did you consume any in the past one month
    "h402_042", -- Did you consume any in the past 12 months
    "h202_006", -- Did you buy or use any in the past 7 days
    "h302_020", -- Did you consume any in the past one month
    "h102_107", -- Boissons alcooliques Did you eat any in the past 7 days
    "h401_053", -- 416 CODE for vehicle rental for personal use car moto velo etc
    "h106u_107", -- Boissons alcooliques How much came from your own production Unit
    "h102_117", -- Riz sauce tomate Did you eat any in the past 7 days
    "h402_017", -- Did you consume any in the past 12 months
    "h201_004", -- 104 CODE for Piles electriques bougies
    "h106q_106", -- Eau minerale autres boissons non alcoolisees How much came from your own production Quantity
    "h401_025", -- 325 CODE for furniture repair
    "h101_116", -- Riz avec sauce feuilles 816
    "h401_047", -- 410 CODE for expenses for health insurance travel insurance life insurance etc
    "h302_024", -- Did you consume any in the past one month
    "h101_123", -- Plat achete ou pris hors domicile 823
    "h302_005", -- Did you consume any in the past one month
    "h302_010", -- Did you consume any in the past one month
    "h202_008", -- Did you buy or use any in the past 7 days
    "h303_005", -- How much did they cost FCFA
    "h105_122", -- The en boisson chaude How much did you spend FCFA
    "h402_005", -- Did you consume any in the past 12 months
    "h107q_105", -- Boissons gazeuses How much came from gifts other sources Quantity
    "h101_125", -- Boissons alcooliques pris hors domicile 825
    "h302_007", -- Did you consume any in the past one month
    "h303_024", -- How much did they cost FCFA
    "h101_121", -- Cafe en boisson chaude 821
    "h302_018", -- Did you consume any in the past one month
    "h401_030", -- 330 CODE for other recreation services PMU tickets photographer services etc
    "h402_036", -- Did you consume any in the past 12 months
    "h401_045", -- 408 CODE for crutches
    "h104q_107", -- Boissons alcooliques How much came from purchases Quanity
    "h105_106", -- Eau minerale autres boissons non alcoolisees How much did you spend FCFA
    "h402_045", -- Did you consume any in the past 12 months
    "h302_017", -- Did you consume any in the past one month
    "h402_007", -- Did you consume any in the past 12 months
    "h104u_106", -- Eau minerale autres boissons non alcoolisees How much came from purchases Unit
    "h107u_105", -- Boissons gazeuses How much came from gifts other sources Unit
    "h401_049", -- 412 CODE for automobile moto tax disk
    "h403_048", -- How much did they cost FCFA
    "h401_048", -- 411 CODE for expenses for transportation insurance auto moto etc
    "h402_047", -- Did you consume any in the past 12 months
    "h401_028", -- 328 CODE for sports and relaxation equipment ball games etc
    "h401_012", -- 312 CODE for women s shoes
    "h401_033", -- 333 CODE for lodging services hotel rooms etc
    "h401_009", -- 309 CODE for expenses to make and repair women s clothing
    "h402_028", -- Did you consume any in the past 12 months
    "h102_123", -- Plat achete ou pris hors domicile Did you eat any in the past 7 days
    "h101_119", -- Riz avec sauve pate d arachide 819
    "h301_011", -- 211 CODE for Frais de coiffure homme et femme
    "h203_005", -- How much did they cost FCFA
    "h403_025", -- How much did they cost FCFA
    "h402_054", -- Did you consume any in the past 12 months
    "h401_036", -- 336 CODE for other personal articles suitcase handbag sunglasses umbrella etc
    "h102_116", -- Riz avec sauce feuilles Did you eat any in the past 7 days
    "h301_021", -- 221 CODE for Frais de ramassage des ordures m nag res
    "h401_042", -- 405 CODE for hearing device
    "h105_108", -- Boule de mil avec du lait How much did you spend FCFA
    "h102_112", -- Preparation a base de mais Did you eat any in the past 7 days
    "h402_020", -- Did you consume any in the past 12 months
    "h303_014", -- How much did they cost FCFA
    "h402_013", -- Did you consume any in the past 12 months
    "h402_050", -- Did you consume any in the past 12 months
    "h302_019", -- Did you consume any in the past one month
    "h401_034", -- 334 CODE for watches alarm clocks
    "h401_019", -- 319 CODE for food expenses for care expenses for vet services for household pets
    "h301_026", -- 226 CODE for Transport inter urbain en bus car taxi de brousse
    "h402_022", -- Did you consume any in the past 12 months
    "h202_002", -- Did you buy or use any in the past 7 days
    "h301_007", -- 207 CODE for Savon de toilette
    "h402_018", -- Did you consume any in the past 12 months
    "h402_027", -- Did you consume any in the past 12 months
    "h402_035", -- Did you consume any in the past 12 months
    "h403_046", -- How much did they cost FCFA
    "h403_047", -- How much did they cost FCFA
    "h301_008", -- 208 CODE for Lait lotion de toilette corporelle
    "h401_035", -- 335 CODE for earrings necklaces bracelets other articles of jewelry
    "h202_009", -- Did you buy or use any in the past 7 days
    "h401_010", -- 310 CODE for expenses to make and repair children s clothing
    "h403_041", -- How much did they cost FCFA
    "h402_041", -- Did you consume any in the past 12 months
    "h402_040", -- Did you consume any in the past 12 months
    "h402_038", -- Did you consume any in the past 12 months
    "h403_037", -- How much did they cost FCFA
    "id",
    "h302_021", -- Did you consume any in the past one month
    "h101_112", -- Preparation a base de mais 812
    "h402_002", -- Did you consume any in the past 12 months
    "h403_054", -- How much did they cost FCFA
    "h302_013", -- Did you consume any in the past one month
    "h401_020", -- 320 CODE for household tools electric lamps flashlight oil lamp hammer screwdriver garden tools etc
    "h403_029", -- How much did they cost FCFA
    "h301_005", -- 205 CODE for Savon de m nage lessive en poudre d tergents
    "h402_004", -- Did you consume any in the past 12 months
    "h403_055", -- How much did they cost FCFA
    "h402_015", -- Did you consume any in the past 12 months
    "h401_007", -- 307 CODE for other articles of clothing
    "h401_024", -- 324 CODE for small electronic materials for personal use cassettes CD DVD USB key etc
    "h402_021", -- Did you consume any in the past 12 months
    "h301_019", -- 219 CODE for Frais de l galisation confection de documents administratifs
    "h402_029", -- Did you consume any in the past 12 months
    "h401_008", -- 308 CODE for expenses to make and repair men s clothing
    "h101_118", -- Riz au gras poisson poulet 818
    "h202_004", -- Did you buy or use any in the past 7 days
    "h107q_106", -- Eau minerale autres boissons non alcoolisees How much came from gifts other sources Quantity
    "h401_041", -- 404 CODE for corrective lenses glasses frames
    "h403_019", -- How much did they cost FCFA
    "h403_036", -- How much did they cost FCFA
    "h403_035", -- How much did they cost FCFA
    "h302_006", -- Did you consume any in the past one month
    "h104q_106", -- Eau minerale autres boissons non alcoolisees How much came from purchases Quanity
    "h301_002", -- 202 CODE for Carburant pour v hicules
    "h107u_106", -- Eau minerale autres boissons non alcoolisees How much came from gifts other sources Unit
    "h303_019", -- How much did they cost FCFA
    "h303_021", -- How much did they cost FCFA
    "h401_027", -- 327 CODE for repair of electronic devices radio radio cassettes TV camera etc
    "h301_009", -- 209 CODE for Serviettes hygi niques couches jetables pour b b etc
    "h103q_107", -- Boissons alcooliques How much did you eat in the past 7 days Quantity
    "h403_045", -- How much did they cost FCFA
    "h402_031", -- Did you consume any in the past 12 months
    "h401_022", -- 322 CODE for labor and services for maintenance and repairs for the dwelling
    "h403_042", -- How much did they cost FCFA
    "h302_002", -- Did you consume any in the past one month
    "h403_038", -- How much did they cost FCFA
    "h301_004", -- 204 CODE for Services de r paration et d entretien
    "h403_026", -- How much did they cost FCFA
    "h403_052", -- How much did they cost FCFA
    "h401_014", -- 314 CODE for shoe repair resole polish etc
    "h107u_107", -- Boissons alcooliques How much came from gifts other sources Unit
    "h301_015", -- 215 CODE for Amploules lectriques
    "h301_023", -- 223 CODE for Salaire du personnel de maison
    "h401_054", -- 417 CODE for domestic and foreign air transport
    "h301_010", -- 210 CODE for Autres produits de toilettes
    "h102_118", -- Riz au gras poisson poulet Did you eat any in the past 7 days
    "h301_003", -- 203 CODE for Lubrifiants
    "h402_053", -- Did you consume any in the past 12 months
    "h401_023", -- 323 CODE for detachable parts for household transportation tires batteries etc
    "h107q_107", -- Boissons alcooliques How much came from gifts other sources Quantity
    "h101_120", -- Pates alimentares 820
    "h401_044", -- 407 CODE for wheelchair and handicapped bike with or without motor
    "h402_030", -- Did you consume any in the past 12 months
    "h401_038", -- 401 CODE for private courses
    "h402_044", -- Did you consume any in the past 12 months
    "h301_018", -- 218 CODE for frais d utilisation de l Internet dans un cybercaf
    "h401_006", -- 306 CODE for children s clothing 0 14 yrs
    "h303_020", -- How much did they cost FCFA
    "h403_039", -- How much did they cost FCFA
    "h101_117", -- Riz sauce tomate 817
    "h403_043", -- How much did they cost FCFA
    "h202_003", -- Did you buy or use any in the past 7 days
    "h102_106", -- Eau minerale autres boissons non alcoolisees Did you eat any in the past 7 days
    "h402_043", -- Did you consume any in the past 12 months
    "h402_001", -- Did you consume any in the past 12 months
    "h106u_106", -- Eau minerale autres boissons non alcoolisees How much came from your own production Unit
    "h106q_107", -- Boissons alcooliques How much came from your own production Quantity
    "h101_109", -- Boule de milsans lait 809
    "h105_109", -- Boule de milsans lait How much did you spend FCFA
    "h101_110", -- Preparation a base de mil 810
    "h105_110", -- Preparation a base de mil How much did you spend FCFA
    "h101_111", -- Preparation a base de sorgho 811
    "h102_111", -- Preparation a base de sorgho Did you eat any in the past 7 days
    "h105_116", -- Riz avec sauce feuilles How much did you spend FCFA
    "h102_119", -- Riz avec sauve pate d arachide Did you eat any in the past 7 days
    "h102_122", -- The en boisson chaude Did you eat any in the past 7 days
    "h105_123", -- Plat achete ou pris hors domicile How much did you spend FCFA
    "h105_124", -- Boissons non alcooliques pris hors domicile How much did you spend FCFA
    "h105_125", -- Boissons alcooliques pris hors domicile How much did you spend FCFA
    "h203_001", -- How much did they cost FCFA
    "h201_002", -- 102 CODE for Bois de chauffe
    "h101_115", -- Riz niebe 815
    "h302_022", -- Did you consume any in the past one month
    "h401_050", -- 413 CODE for fee to subscribe to the network of water distribution
    "h203_003", -- How much did they cost FCFA
    "h202_005", -- Did you buy or use any in the past 7 days
    "h201_007", -- 107 CODE for Cartes prepayees shap shap de telephone mobile
    "h202_007", -- Did you buy or use any in the past 7 days
    "h203_007", -- How much did they cost FCFA
    "h201_008", -- 108 CODE for Journaux et revues
    "h201_009", -- 109 CODE for Frais de moulure des cereales
    "h201_003", -- 103 CODE for Charbon de bois Charbon mineral
    "h302_014", -- Did you consume any in the past one month
    "h301_006", -- 206 CODE for Insecticide tortillon anti moustique
    "h301_013", -- 213 CODE for Brosse dents
    "h102_120", -- Pates alimentares Did you eat any in the past 7 days
    "h302_004", -- Did you consume any in the past one month
    "h103q_106", -- Eau minerale autres boissons non alcoolisees How much did you eat in the past 7 days Quantity
    "h402_046", -- Did you consume any in the past 12 months
    "h101_124", -- Boissons non alcooliques pris hors domicile 824
    "h105_119", -- Riz avec sauve pate d arachide How much did you spend FCFA
    "h401_037", -- 337 CODE for other services announcements on the radio in the newspaper on TV funeral director etc
    "h403_044", -- How much did they cost FCFA
    "h103u_106", -- Eau minerale autres boissons non alcoolisees How much did you eat in the past 7 days Unit
    "h301_024", -- 224 CODE for Transport en pirogue
    "h401_051", -- 414 CODE for fee for the subscription to the network for electricity distribution
    "h402_012", -- Did you consume any in the past 12 months
    "h201_005", -- 105 CODE for Petrole lampant
    "h402_052", -- Did you consume any in the past 12 months
    "h402_026", -- Did you consume any in the past 12 months
    "h401_003", -- 303 CODE for underclothes for men 15 yrs older
    "h302_015", -- Did you consume any in the past one month
    "h102_110", -- Preparation a base de mil Did you eat any in the past 7 days
    "h401_001", -- 301 CODE for cloth for clothing cloth fabric cloth weaver s cloth synthetic fabric etc
    "h303_026", -- How much did they cost FCFA
    "h303_025", -- How much did they cost FCFA
    "h302_025", -- Did you consume any in the past one month
    "h303_022", -- How much did they cost FCFA
    "h301_022", -- 222 CODE for Frais de blanchiment des v tements linge etc
    "h401_002", -- 302 CODE for clothing for men 15 yrs older
    "h101_108", -- Boule de mil avec du lait 808
    "h302_023", -- Did you consume any in the past one month
    "h402_033", -- Did you consume any in the past 12 months
    "h401_018", -- 318 CODE for for other household utensils bucket kettle baby bottle trash can cups etc
    "h402_014", -- Did you consume any in the past 12 months
    "h401_046", -- 409 CODE for other therapeutic or orthopedic devices
    "h301_020", -- 220 CODE for Frais de photocopies de document
    "h303_018", -- How much did they cost FCFA
    "h303_017", -- How much did they cost FCFA
    "h303_016", -- How much did they cost FCFA
    "h302_016", -- Did you consume any in the past one month
    "h303_015", -- How much did they cost FCFA
    "h303_013", -- How much did they cost FCFA
    "h303_012", -- How much did they cost FCFA
    "h301_012", -- 212 CODE for P te dentifrice
    "h303_010", -- How much did they cost FCFA
    "h303_009", -- How much did they cost FCFA
    "h302_009", -- Did you consume any in the past one month
    "h303_008", -- How much did they cost FCFA
    "h303_007", -- How much did they cost FCFA
    "h303_006", -- How much did they cost FCFA
    "h303_004", -- How much did they cost FCFA
    "h303_003", -- How much did they cost FCFA
    "h303_001", -- How much did they cost FCFA
    "h302_001", -- Did you consume any in the past one month
    "h203_010", -- How much did they cost FCFA
    "h201_010", -- 110 AUTRES
    "h203_009", -- How much did they cost FCFA
    "h203_008", -- How much did they cost FCFA
    "h203_006", -- How much did they cost FCFA
    "h201_006", -- 106 CODE for Transport urbain en taxi bus moto
    "h203_004", -- How much did they cost FCFA
    "h203_002", -- How much did they cost FCFA
    "h202_001", -- Did you buy or use any in the past 7 days
    "h200", -- Line Number from household roster
    "h102_125", -- Boissons alcooliques pris hors domicile Did you eat any in the past 7 days
    "h102_124", -- Boissons non alcooliques pris hors domicile Did you eat any in the past 7 days
    "h101_122", -- The en boisson chaude 822
    "h105_121", -- Cafe en boisson chaude How much did you spend FCFA
    "h102_121", -- Cafe en boisson chaude Did you eat any in the past 7 days
    "h105_120", -- Pates alimentares How much did you spend FCFA
    "h105_118", -- Riz au gras poisson poulet How much did you spend FCFA
    "h105_117", -- Riz sauce tomate How much did you spend FCFA
    "h105_115", -- Riz niebe How much did you spend FCFA
    "h102_114", -- Haricot bouilli Did you eat any in the past 7 days
    "h402_048", -- Did you consume any in the past 12 months
    "h403_049", -- How much did they cost FCFA
    "h403_050", -- How much did they cost FCFA
    "h403_051", -- How much did they cost FCFA
    "h403_053", -- How much did they cost FCFA
    "h402_055", -- Did you consume any in the past 12 months
    "h402_049", -- Did you consume any in the past 12 months
    "h401_055", -- 418 CODE for expenses for visas airport taxes
    "h401_013", -- 313 CODE for children s shoes
    "h201_001", -- 101 CODE for Allumettes
    "h401_032", -- 332 CODE for personal care articles perfume and toilette water beauty products etc
    "h102_115" -- Riz niebe Did you eat any in the past 7 days
FROM
    "usaid-gov/data-on-food-consumption-in-zinder-and-maradi-in-u5nz-v4bq:latest"."data_on_food_consumption_in_zinder_and_maradi_in"
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/data-on-food-consumption-in-zinder-and-maradi-in-u5nz-v4bq 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/data-on-food-consumption-in-zinder-and-maradi-in-u5nz-v4bq: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/data-on-food-consumption-in-zinder-and-maradi-in-u5nz-v4bq" \
  --handler-options '{
    "domain": "data.usaid.gov",
    "tables": {
        "data_on_food_consumption_in_zinder_and_maradi_in": "u5nz-v4bq"
    }
}'

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/data-on-food-consumption-in-zinder-and-maradi-in-u5nz-v4bq is just another Postgres schema.