delaware-gov/condition-of-nontidal-wetlands-w9vx-e6hd
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 condition_of_nontidal_wetlands table in this repository, by referencing it like:

"delaware-gov/condition-of-nontidal-wetlands-w9vx-e6hd:latest"."condition_of_nontidal_wetlands"

or in a full query, like:

SELECT
    ":id", -- Socrata column ID
    "hinv5", -- Invasive plants cover between 1% and 5% of Assessment Area.
    "wimp75", -- Weir/Dam/Road impounding water on between 10% and 75% of Assessment Area.
    "hfor2_2", -- Forestry within 15 years.
    "hfor2", -- Forest age 2 years or less. 
    "hgraz", -- Grazing in Assessment Area.
    "hfarm", -- Farming activity in Assessment Area.
    "hfor30", -- Forest age 16 to 30 years.
    "hcc10", -- Less than 10% of Assessment Area clear cut within 50 years.
    "harvest_50_clear_no_recov", -- Forest harvest more than 50% cleared not recovering.
    "hinv1", -- Invasive plants cover less than 1% of Assessment Area.
    "hcc100", -- More than 50% of Assessment Area clear cut within 50 years.
    "hnorecov", -- Cleared land not recovering.
    "hgm_class", -- Hydrogeomorphic wetland type. Based on the study of "the interaction and linkage of hydrologic processes with landforms or earth materials and the interaction of geomorphic processes with surface and subsurface water in temporal and spatial dimensions.” See http://www.dnrec.delaware.gov/Admin/DelawareWetlands/Documents/DERAP_Field_Protocol_v6%200_Aug2010.pdf#page=6
    "lfor", -- Forest harvesting within past 15 Years.
    "lagorch", -- Orchards.
    "hburn", -- Burned (prescribed).
    "wchan2_2", -- Dredge spoil bank both sides of stream.
    "classification", -- Specifies if wetland is natural or has been manipulated in some way by human activity to be restored, re-established, enhanced, or rehabilitated.
    "wdamdec", -- Weir/Dam/Road decreasing site flooding.
    "wditchm", -- Moderate Ditching; 3 shallow ditches in Assessment Area or 1 ditch more than 0.3 meter within 25m of edge of AA
    "wchan1", -- Dredge spoil bank on one or both sides of stream.
    "wchannm", -- Channelized stream not maintained.
    "hfor30_2", -- Forestry activity 30 to 50 years ago.
    "hydro_mod", -- Moderate alteration of the natural flow of water through a landscape (Hydromodification). 
    "lrd2pav", -- Two-lane paved road.
    "lrdgrav", -- Dirt or gravel road.
    "road_impeding_flow", -- Road present that is impeding flow of water.
    "ldevcom", -- Commercial or industrial development.
    "halgae", -- Nutrients dense algal mats.
    "hnutapp_a", -- Nutrients direct application/runoff.
    "hrdlog", -- Logging road in Assessment Area.
    "hinv50", -- Invasive plants cover between 6% and 50% of Assessment Area.
    "hinvdom", -- Invasive plants dominating Assessment Area.
    "hmow", -- Mowing in Assessment Area.
    "hforcc", -- Forestry activity clear cut within 2 years.
    "hpine", -- Forest managed or converted to pine.
    "hherb", -- Excessive Herbivory/Pinebark Beetle/Gypsy Moth.
    "nutrients_fert", -- Nutrients-application of fertilizer.
    "hinvless", -- Invasive plants not dominating Assessment Area.
    "forest_age_50_years", -- Forest age greater than 50 years.
    "harvest_50_recent", -- Forest harvest more than 50% recent.
    "harvest_50_recovering", -- Forest harvest more than 50% recovering.
    "basin", -- Major drainage basin the wetland site is within.
    "lgolf", -- Golf course.
    "wtidres", -- Tidal restriction from structure inhibiting natural tidal water flow.
    "wpoint", -- Point source (non-stormwater).
    "ldevres3", -- Residential development of more than 2 houses/acre.
    "wditchs", -- Slight Ditching; 1 to 3 shallow ditches (less than 0.3 meter deep) in Assessment Area.
    "hpave_or_hrdpav", -- Paved road in Assessment Area.
    "hfor15", -- Forest age 3 to 15 years.
    "lmoor", -- Boat moorings present.
    "lagrow", -- Row crops or nursery plants.
    "llndfil", -- Landfill or waste disposal.
    "hydro_sev", -- Severe alteration of the natural flow of water through a landscape (Hydromodification). 
    "lrd4pav", -- Paved road of 4 or more lanes.
    "soil_change_10", -- Drastic color change in soil of less than 10%.
    "hchem", -- Forest chemical defoliation.
    "hcc50", -- Between 11% and 50% of Assessment Area clear cut within 50 years.
    "hgarb", -- Garbage/Isolated dumping.
    "wchan1_2", -- Dredge spoil bank only one side of stream.
    "wstorm", -- Stormwater inputs.
    "wmic75", -- Microtopographic alterations on between 10% and 75% of Assessment Area. Microtopographic alterations are any alterations to the natural soil surface such as plowing, bedding for forestry operations, skidder or ATV ruts, etc. 
    "wmic100", -- Microtopographic alterations on more than 75% of Assessment Area. Microtopographic alterations are any alterations to the natural soil surface such as plowing, bedding for forestry operations, skidder or ATV ruts, etc. 
    "stormdrain", -- Stormwater drains present.
    "qdr", -- Qualitative Disturbance Rating. A rating of the level of disturbance of the Assessment Area. Ranging from minimal (1 or 2) to high (5 or 6). See http://www.dnrec.delaware.gov/Admin/DelawareWetlands/Documents/DERAP_Field_Protocol_v6%200_Aug2010.pdf#page=15
    "site_number", -- Unique numeric identifier for each site.
    "watershed", -- Watershed that the wetland site is within. Watersheds are mapped using the USGS HUC10 scale.
    "aa_moved", -- Indicates if the site center point and assessment area had to be moved from the original random location.
    "hfor10", -- Forest activity less than 10% of Assessment Area.
    "nutrients_ag", -- Nutrients-discharge from agriculture.
    "qcr", -- Qualitative Condition Rating. A rating of the level of disturbance of the Assessment Area. Ranging from minimal (1 or 2) to high (5 or 6). This was used in earlier versions of the wetland assessments for what is now known as QDR.
    "date", -- Date site was assessed.
    "derap_version", -- Version of protocol used to assess site. Not all metrics collected in the past are collected currently, and some metrics that are collected currently were not collected in the past. The current version is available at http://www.dnrec.delaware.gov/Admin/DelawareWetlands/Documents/DERAP_Field_Protocol_v6%200_Aug2010.pdf
    "hgm_sub_class", -- Hydrogeomorphic wetland sub-type. Based on the study of "the interaction and linkage of hydrologic processes with landforms or earth materials and the interaction of geomorphic processes with surface and subsurface water in temporal and spatial dimensions.” See http://www.dnrec.delaware.gov/Admin/DelawareWetlands/Documents/DERAP_Field_Protocol_v6%200_Aug2010.pdf#page=6
    "llww", -- Wetland classification code describing landscape, landform, water flow path, and waterbody type. See https://www.fws.gov/northeast/ecologicalservices/pdf/wetlands/DichotomousKeys_090611wcover.pdf#page=37
    "purpose", -- Reason for field visit (assessment or reference).
    "aa_size_and_shape", -- Size and shape of wetland assessment area.
    "hfor50", -- Forest age 31 to 50 years.
    "pct_aa_forested", -- Percent of assessment area forested.
    "hnis100", -- Nutrient indicator plant species cover more than 50% of Assessment Area. Nutrient indicator plants are those that have been identified as being indicators of nutrient enrichment of an area. See http://www.dnrec.delaware.gov/Admin/DelawareWetlands/Documents/DERAP_Field_Protocol_v6%200_Aug2010.pdf#page=20
    "hnis50", -- Nutrient indicator plant species cover less than 50% of Assessment Area. Nutrient indicator plants are those that have been identified as being indicators of nutrient enrichment of an area. See http://www.dnrec.delaware.gov/Admin/DelawareWetlands/Documents/DERAP_Field_Protocol_v6%200_Aug2010.pdf#page=20
    "nutrients_sew", -- Nutrients-discharge from septic/sewage.
    "ltrail", -- Trails.
    "total_score", -- Overall wetland score based on stressor weights. Note that total score calculations vary depending on the version of protocol used. See http://www.dnrec.delaware.gov/Admin/DelawareWetlands/Documents/DERAP_Field_Protocol_v6%200_Aug2010.pdf#page=26
    "pct_site_inundated", -- Percent site inundated.
    "htrail", -- Non-elevated road.
    "ldevres1_2", -- Residential less than 1 house per 2 acres.
    "lsew", -- Developed area is served by sewer.
    "wmic10", -- Microtopographic alterations on less than 10% of Assessment Area. Microtopographic alterations are any alterations to the natural soil surface such as plowing, bedding for forestry operations, skidder or ATV ruts, etc. 
    "wfill100", -- Filling or excavation on more than 75% of Assessment Area.
    "wimp100", -- Weir/Dam/Road impounding water on more than 75% of Assessment Area.
    "wsubsid", -- Soil subsidence or root exposure.
    "hforsc", -- Selective cutting forestry.
    "harvest_50_recovered", -- Forest harvest more than 50% recovered.
    "harvesting_w_in_50yrs", -- Forest Harvesting within 50 years.
    "hfor50_2", -- No forestry activity within 50 years.
    "htrail_2", -- Trails and roads.
    "hfor15_2", -- Forestry activity 15 to 30 years ago.
    "wfill75", -- Filling or excavation on between 10% and 75% of Assessment Area.
    "wsed_or_wsedwet", -- Excessive sedimentation on wetland surface.
    "ldevres1", -- Residential development of less than 1 house/acre.
    "soil_change_10_75", -- Drastic color change in soil of between 10% and 75%.
    "wincision", -- Natural stream channel incision.
    "sub_watershed", -- Sub-watershed that the wetland site is within. Sub-watersheds are mapped using the USGS HUC12 scale.
    "baf_10", -- Basal area factor of dominant forest using a 10 factor angle gauge. "Basal area" refers to the  cross sectional area of a tree at breast height.
    "ldock", -- Slips/docks/marinas present.
    "pct_site_perm_flood", -- Percent site permanently flooded.
    "wfill10", -- Filling or excavation on less than 10% of Assessment Area.
    "lsept", -- Developed area is served by septic.
    "wditchfloodplain", -- Ditching in floodplain (not including main channel).
    "hroad_or_hrdgrav", -- Dirt or gravel elevated road in Assessment Area.
    "wditchx", -- Severe Ditching. More than one ditch 0.3 to 0.6 meters deep or 1 ditch more than 0.6 meter deep within Assessment Area.
    "road_not_impeding_flow", -- Road present that is not impeding flow of water.
    "wchan2", -- Dredge spoil bank on same side of stream Assessment Area.
    "wimp10", -- Weir/Dam/Road impounding water on less than 10% of Assessment Area.
    "stream_order", -- Strahler stream order of stream associated with riverine wetland site. See http://www.dnrec.delaware.gov/Admin/DelawareWetlands/Documents/DERAP_Field_Protocol_v6%200_Aug2010.pdf#page=9
    "lag", -- Row crops, nursery plants, or orchards.
    "lagpoul", -- Poultry or livestock operation.
    "direct_runoff_erosion", -- Direct runoff/erosion.
    "lmine", -- Sand or gravel mining operation.
    "hydro_sl", -- Slight alteration of the natural flow of water through a landscape (Hydromodification). 
    "hnutapp_b", -- Nutrient indicator species dominating Assessment Area.
    "ldevres2", -- Residential of 2 or fewer houses/acre.
    "soil_change_75", -- Drastic color change in soil of more than 75%.
    "sed_dep", -- Sediment deposits.
    "hinv100", -- Invasive plants cover more than 50% of Assessment Area.
    "lchan", -- Channelized streams or ditches more than 0.6 meters deep.
    "lmow", -- Mowed area.
    "wsedchan", -- Excessive sedimentation in stream channel.
    "eroding_banks_slopes" -- Eroding banks/slopes.
FROM
    "delaware-gov/condition-of-nontidal-wetlands-w9vx-e6hd:latest"."condition_of_nontidal_wetlands"
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 delaware-gov/condition-of-nontidal-wetlands-w9vx-e6hd 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 delaware-gov/condition-of-nontidal-wetlands-w9vx-e6hd: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 delaware-gov/condition-of-nontidal-wetlands-w9vx-e6hd

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 delaware-gov/condition-of-nontidal-wetlands-w9vx-e6hd:latest

This will download all the objects for the latest tag of delaware-gov/condition-of-nontidal-wetlands-w9vx-e6hd 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 delaware-gov/condition-of-nontidal-wetlands-w9vx-e6hd: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 delaware-gov/condition-of-nontidal-wetlands-w9vx-e6hd: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, delaware-gov/condition-of-nontidal-wetlands-w9vx-e6hd is just another Postgres schema.

Related Documentation:

Loading...