delaware-gov/toxics-release-inventory-9bws-2xkb
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 toxics_release_inventory table in this repository, by referencing it like:

"delaware-gov/toxics-release-inventory-9bws-2xkb:latest"."toxics_release_inventory"

or in a full query, like:

SELECT
    ":id", -- Socrata column ID
    "landfillbasis", -- Basis of the other landfills amount estimate. See Toxic Chemical Release Inventory Reporting Forms and Instructions, Revised 2014 Version, Appendix B. (https://www.epa.gov/sites/production/files/2015-01/documents/rfi_ry2014_111914.pdf#page=173)
    "basiscode2", -- Basis of the Water2 amount estimate. See Toxic Chemical Release Inventory Reporting Forms and Instructions, Revised 2014 Version, Appendix B. (https://www.epa.gov/sites/production/files/2015-01/documents/rfi_ry2014_111914.pdf#page=173)
    "stackbasis", -- Basis of the stack amount estimate. See Toxic Chemical Release Inventory Reporting Forms and Instructions, Revised 2014 Version, Appendix B. (https://www.epa.gov/sites/production/files/2015-01/documents/rfi_ry2014_111914.pdf#page=173)
    "fugitivebasis", -- Basis of the fugitive amount estimate. See Toxic Chemical Release Inventory Reporting Forms and Instructions, Revised 2014 Version, Appendix B. (https://www.epa.gov/sites/production/files/2015-01/documents/rfi_ry2014_111914.pdf#page=173)
    "cert_title", -- Title of the person certifying the report.
    "total_to_water", -- Total amount of chemical released to water. Measured in pounds, except for  dioxin and dioxin-like compounds, which are measured in grams. 
    "rel_81_c", -- Total amount of chemical disposed off-site to landfills. Measured in pounds, except for  dioxin and dioxin-like compounds, which are measured in grams. 
    "accid", -- Total of all on-site releases to the environment remaining in the environment at the end of the year due to remedial actions or any one-time event not associated with production processes. Measured in pounds, except for  dioxin and dioxin-like compounds, which are measured in grams.
    "off_rcy_b", -- Amount of chemical sent off-site for recycling during the reporting year.  (No accounting for losses by sending facility.) Measured in pounds, except for  dioxin and dioxin-like compounds, which are measured in grams.
    "on_rcy_b", -- Amount of chemical recycled on-site during the reporting year.  (only material reclaimed for sale or reuse) Measured in pounds, except for  dioxin and dioxin-like compounds, which are measured in grams.
    "chem_name", -- Name of the chemical released, as it appears in the Toxics Release Inventory list. (See https://www.epa.gov/toxics-release-inventory-tri-program/tri-listed-chemicals)
    "report_num", -- Report number. Assigned by database and used as a unique identifier for the report.
    "repyr", -- Calendar year represented by data (i.e., 2009)
    "off_er_b", -- Amount of chemical sent off-site for energy recovery during the reporting year.  (No accounting for losses by sending facility.) Measured in pounds, except for  dioxin and dioxin-like compounds, which are measured in grams.
    "off_ste_tre9", -- Code for the  type of disposal, treatment, energy recovery, or recycling methods used by the ninth off-site facility for the reported chemical. See Toxic Chemical Release Inventory Reporting Forms and Instructions, Revised 2014 Version, Appendix B. (https://www.epa.gov/sites/production/files/2015-01/documents/rfi_ry2014_111914.pdf#page=174)
    "off_ste_tre8", -- Code for the  type of disposal, treatment, energy recovery, or recycling methods used by the eighth off-site facility for the reported chemical. See Toxic Chemical Release Inventory Reporting Forms and Instructions, Revised 2014 Version, Appendix B. (https://www.epa.gov/sites/production/files/2015-01/documents/rfi_ry2014_111914.pdf#page=174)
    "off_state7", -- State in which the seventh off-site facility is located.
    "off_ste_tre7", -- Code for the  type of disposal, treatment, energy recovery, or recycling methods used by the seventh off-site facility for the reported chemical. See Toxic Chemical Release Inventory Reporting Forms and Instructions, Revised 2014 Version, Appendix B. (https://www.epa.gov/sites/production/files/2015-01/documents/rfi_ry2014_111914.pdf#page=174)
    "off_ste_tre5", -- Code for the  type of disposal, treatment, energy recovery, or recycling methods used by the fifth off-site facility for the reported chemical. See Toxic Chemical Release Inventory Reporting Forms and Instructions, Revised 2014 Version, Appendix B. (https://www.epa.gov/sites/production/files/2015-01/documents/rfi_ry2014_111914.pdf#page=174)
    "off_state4", -- State in which the fourth off-site facility is located.
    "off_ste_tre2", -- Code for the  type of disposal, treatment, energy recovery, or recycling methods used by the second off-site facility for the reported chemical. See Toxic Chemical Release Inventory Reporting Forms and Instructions, Revised 2014 Version, Appendix B. (https://www.epa.gov/sites/production/files/2015-01/documents/rfi_ry2014_111914.pdf#page=174)
    "metal", -- Metal or metal compound indicator. A value of "1" indicates that the chemical is a metal or metal compound. Added by DNREC.
    "landfarm", -- Amount of the chemical that was released to the land via land treatment or application farming. Measured in pounds, except for  dioxin and dioxin-like compounds, which are measured in grams.
    "rcra_rel", -- Amount of the chemical that was placed in an on-site RCRA Subtitle C landfill. (Those landfills which are authorized under the Resource Conservation and Recovery Act (RCRA) to accept hazardous waste for disposal.) Measured in pounds, except for  dioxin and dioxin-like compounds, which are measured in grams.
    "off_basis9", -- Basis of the estimate of amount sent to the ninth off-site facility to which chemicals were transferred.  See Toxic Chemical Release Inventory Reporting Forms and Instructions, Revised 2014 Version, Appendix B. (https://www.epa.gov/sites/production/files/2015-01/documents/rfi_ry2014_111914.pdf#page=173)
    "potwcity1", -- City in which primary Publicly-Owned Treatment Works facility is located.
    "potwfac1", -- Name of primary Publicly-Owned Treatment Works facility.
    "landimpbasis", -- Basis of the RCRA-C surface impoundments amount estimate. See Toxic Chemical Release Inventory Reporting Forms and Instructions, Revised 2014 Version, Appendix B. (https://www.epa.gov/sites/production/files/2015-01/documents/rfi_ry2014_111914.pdf#page=173)
    "landfarmbasis", -- Basis of the other land treatment/application/farming amount estimate. See Toxic Chemical Release Inventory Reporting Forms and Instructions, Revised 2014 Version, Appendix B. (https://www.epa.gov/sites/production/files/2015-01/documents/rfi_ry2014_111914.pdf#page=173)
    "riverpercent1", -- Percent of chemical amount to river1 caused by storm water
    "fac_mailzip", -- ZIP code of the mailing address of the facility.
    "fac_mailcity", -- City of the mailing address of the facility.
    "fac_mailstreet1", -- Street name and number of the mailing address of the facility.
    "total_to_land", -- Total amount of chemical released to land. Measured in pounds, except for  dioxin and dioxin-like compounds, which are measured in grams. 
    "total_to_air", -- Total amount of chemical released to the air, the sum of fugitive and stack amounts. Measured in pounds, except for  dioxin and dioxin-like compounds, which are measured in grams. 
    "rel_81_d", -- Total amount of chemical released off-site or disposed off-site other than to landfills. Measured in pounds, except for  dioxin and dioxin-like compounds, which are measured in grams. 
    "rel_81_b", -- Total amount of chemical disposed on-site other than to landfills. Measured in pounds, except for  dioxin and dioxin-like compounds, which are measured in grams. 
    "release_b", -- Total amount of chemical disposed of or released. Measured in pounds, except for  dioxin and dioxin-like compounds, which are measured in grams. Calculated by DNREC based on reported values from sections 8.1a-8.1d, Column B.
    "calc_off_rcy_b", -- Total amount of chemical transferred offsite for recycling. Measured in pounds, except for  dioxin and dioxin-like compounds, which are measured in grams. Calculated by DNREC based on reported values from sections 6.2 and 8.8.
    "calc_off_er_b", -- Total amount of chemical transferred offsite for energy recovery. Measured in pounds, except for  dioxin and dioxin-like compounds, which are measured in grams. Calculated by DNREC based on reported values from sections 6.2 and 8.8.
    "p_index", -- Production index (expressed as a ratio) indicating the relative activity between the current year and the prior year.
    "non_potw_off_tre", -- Total of off-site transfers of chemical sent for treatment at facilities other than Publicly-Owned Treatment Works. Measured in pounds, except for  dioxin and dioxin-like compounds, which are measured in grams. Added by DNREC.
    "on_tre_b", -- Amount of chemical that is s treated for destruction on-site during the reporting year. (Only material that is destroyed or transformed into another chemical). Measured in pounds, except for  dioxin and dioxin-like compounds, which are measured in grams.
    "off_city2", -- Location of the second off-site facility to which chemicals were transferred. 
    "off_city1", -- Location of the first off-site facility to which chemicals were transferred. 
    "potwstate1", -- State in which primary Publicly-Owned Treatment Works facility is located.
    "potwbasis1", -- Basis of the estimate of amount sent to the primary Publicly-Owned Treatment Works facility. See Toxic Chemical Release Inventory Reporting Forms and Instructions, Revised 2014 Version, Appendix B. (https://www.epa.gov/sites/production/files/2015-01/documents/rfi_ry2014_111914.pdf#page=173)
    "landothrbasis", -- Basis of the other disposal amount estimate. See Toxic Chemical Release Inventory Reporting Forms and Instructions, Revised 2014 Version, Appendix B. (https://www.epa.gov/sites/production/files/2015-01/documents/rfi_ry2014_111914.pdf#page=173)
    "landimp_othrbasis", -- Basis of the other surface impoundments amount estimate. See Toxic Chemical Release Inventory Reporting Forms and Instructions, Revised 2014 Version, Appendix B. (https://www.epa.gov/sites/production/files/2015-01/documents/rfi_ry2014_111914.pdf#page=173)
    "off_state9", -- State in which the ninth off-site facility is located.
    "potwbasis2", -- Basis of the estimate of amount sent to the secondary Publicly-Owned Treatment Works facility. See Toxic Chemical Release Inventory Reporting Forms and Instructions, Revised 2014 Version, Appendix B. (https://www.epa.gov/sites/production/files/2015-01/documents/rfi_ry2014_111914.pdf#page=173)
    "potwfac2", -- Name of secondary Publicly-Owned Treatment Works facility.
    "potwcity2", -- City in which secondary Publicly-Owned Treatment Works facility is located.
    "off_name9", -- Name of the ninth off-site facility to which chemicals were transferred. 
    "off_basis8", -- Basis of the estimate of amount sent to the eighth off-site facility to which chemicals were transferred.  See Toxic Chemical Release Inventory Reporting Forms and Instructions, Revised 2014 Version, Appendix B. (https://www.epa.gov/sites/production/files/2015-01/documents/rfi_ry2014_111914.pdf#page=173)
    "off_name8", -- Name of the eighth off-site facility to which chemicals were transferred. 
    "off_name7", -- Name of the seventh off-site facility to which chemicals were transferred. 
    "off_name5", -- Name of the fifth off-site facility to which chemicals were transferred. 
    "off_city3", -- Location of the third off-site facility to which chemicals were transferred. 
    "off_name2", -- Name of the second off-site facility to which chemicals were transferred. 
    "off_name1", -- Name of the first off-site facility to which chemicals were transferred. 
    "trifacid", -- Facility ID number. Assigned by EPA to identify facilities for which there are release reports.
    "calc_rel_b", -- Total amount of chemical released.  Measured in pounds, except for  dioxin and dioxin-like compounds, which are measured in grams. Calculated by DNREC based on reported values from sections 5, 6, and 8.8.
    "calc_off_dis", -- Total amount of chemical transferred offsite for disposal or release. Measured in pounds, except for  dioxin and dioxin-like compounds, which are measured in grams. Calculated by DNREC based on reported values from sections 8.1c + 8.1d.
    "rel_81_a", -- Total amount of chemical disposed on-site to landfills. Measured in pounds, except for  dioxin and dioxin-like compounds, which are measured in grams. 
    "on_er_b", -- Amount of chemical used during the reporting year for on-site energy recovery. (only material that is consumed in the energy recovery unit.  Losses are accounted for in on-site releases.) Measured in pounds, except for  dioxin and dioxin-like compounds, which are measured in grams.
    "rcra_relbasis", -- Basis of the RCRA amount estimate. See Toxic Chemical Release Inventory Reporting Forms and Instructions, Revised 2014 Version, Appendix B. (https://www.epa.gov/sites/production/files/2015-01/documents/rfi_ry2014_111914.pdf#page=173)
    "off_city8", -- Location of the eighth off-site facility to which chemicals were transferred. 
    "off_city9", -- Location of the ninth off-site facility to which chemicals were transferred. 
    "naics", -- Basic (3-digit) industry classification of the facility, derived from the NAICS1 field. Added by DNREC.
    "cont_e_address", -- Email address of the person who is the public contact at the facility in the report.
    "cont_phone", -- Phone number of the person who is the public contact at the facility in the report.
    "off_ste_rel9", -- Amount of chemical that is contained in waste transferred to a ninth off-site facility for the purposes of disposal, treatment, energy recovery, or recycling. Measured in pounds, except for  dioxin and dioxin-like compounds, which are measured in grams.
    "off_ste_rel7", -- Amount of chemical that is contained in waste transferred to a seventh off-site facility for the purposes of disposal, treatment, energy recovery, or recycling. Measured in pounds, except for  dioxin and dioxin-like compounds, which are measured in grams.
    "off_ste_rel6", -- Amount of chemical that is contained in waste transferred to a sixth off-site facility for the purposes of disposal, treatment, energy recovery, or recycling. Measured in pounds, except for  dioxin and dioxin-like compounds, which are measured in grams.
    "off_state5", -- State in which the fifth off-site facility is located.
    "off_ste_rel5", -- Amount of chemical that is contained in waste transferred to a fifth off-site facility for the purposes of disposal, treatment, energy recovery, or recycling. Measured in pounds, except for  dioxin and dioxin-like compounds, which are measured in grams.
    "off_ste_tre4", -- Code for the  type of disposal, treatment, energy recovery, or recycling methods used by the fourth off-site facility for the reported chemical. See Toxic Chemical Release Inventory Reporting Forms and Instructions, Revised 2014 Version, Appendix B. (https://www.epa.gov/sites/production/files/2015-01/documents/rfi_ry2014_111914.pdf#page=174)
    "off_ste_tre3", -- Code for the  type of disposal, treatment, energy recovery, or recycling methods used by the third off-site facility for the reported chemical. See Toxic Chemical Release Inventory Reporting Forms and Instructions, Revised 2014 Version, Appendix B. (https://www.epa.gov/sites/production/files/2015-01/documents/rfi_ry2014_111914.pdf#page=174)
    "off_ste_rel3", -- Amount of chemical that is contained in waste transferred to a third off-site facility for the purposes of disposal, treatment, energy recovery, or recycling. Measured in pounds, except for  dioxin and dioxin-like compounds, which are measured in grams.
    "off_state2", -- State in which the second off-site facility is located.
    "off_ste_rel2", -- Amount of chemical that is contained in waste transferred to a second off-site facility for the purposes of disposal, treatment, energy recovery, or recycling. Measured in pounds, except for  dioxin and dioxin-like compounds, which are measured in grams.
    "off_state1", -- State in which the first off-site facility is located.
    "off_ste_tre1", -- Code for the  type of disposal, treatment, energy recovery, or recycling methods used by the first off-site facility for the reported chemical. See Toxic Chemical Release Inventory Reporting Forms and Instructions, Revised 2014 Version, Appendix B. (https://www.epa.gov/sites/production/files/2015-01/documents/rfi_ry2014_111914.pdf#page=174)
    "off_ste_rel1", -- Amount of chemical that is contained in waste transferred to a first off-site facility for the purposes of disposal, treatment, energy recovery, or recycling. Measured in pounds, except for  dioxin and dioxin-like compounds, which are measured in grams.
    "off_tre", -- Total amount of off-site transfers chemicals sent for treatment, including Publicly-Owned Treatment Works facility and facilities that are not Publicly-Owned Treatment Works facilities. Measured in pounds, except for  dioxin and dioxin-like compounds, which are measured in grams.
    "potw2", -- Amount of chemicals that are transferred to a secondary Publicly-Owned Treatment Works facility, generally considered treated except for metals. Measured in pounds, except for  dioxin and dioxin-like compounds, which are measured in grams.
    "metal_to_potw", -- Amount of chemicals that are transferred to a primary Publicly-Owned Treatment Works facility, generally considered treated except for metals. Measured in pounds, except for  dioxin and dioxin-like compounds, which are measured in grams.
    "landothr", -- Amount of the chemical released to land that does not fit the categories of landfills, land treatment, or surface impoundment. Measured in pounds, except for  dioxin and dioxin-like compounds, which are measured in grams.
    "landimp_othr", -- Amount of the chemical that was released to a surface impoundment other than those permitted under RCRA Subtitle C. Measured in pounds, except for  dioxin and dioxin-like compounds, which are measured in grams.
    "river2", -- Name of the additional water body to which the release occurred.
    "river1", -- Name of the water body to which the release occurred.
    "water1", -- All releases of the chemical to a water body. Measured in pounds, except for  dioxin and dioxin-like compounds, which are measured in grams.
    "max_onsite", -- Code for the maximum amount of the chemical that was onsite at the facility at any one time during reporting year. Codes range from 0 to 11 (1,000,000,000+ pounds). See Toxic Chemical Release Inventory Reporting Forms and Instructions, Revised 2014 Version, Appendix B. (https://www.epa.gov/sites/production/files/2015-01/documents/rfi_ry2014_111914.pdf#page=173)
    "naics2", -- Detailed (6-digit) additional industry classification of the facility. Used if there is more than one classification for the facility. Uses the North American Industry Classification System (NAICS). (See http://www.census.gov/eos/www/naics/)
    "naics1", -- Detailed (6-digit) primary industry classification of the facility using the North American Industry Classification System (NAICS). (See http://www.census.gov/eos/www/naics/)
    "potwstate2", -- State in which secondary Publicly-Owned Treatment Works facility is located.
    "off_basis1", -- Basis of the estimate of amount sent to the first off-site facility to which chemicals were transferred.  See Toxic Chemical Release Inventory Reporting Forms and Instructions, Revised 2014 Version, Appendix B. (https://www.epa.gov/sites/production/files/2015-01/documents/rfi_ry2014_111914.pdf#page=173)
    "off_basis2", -- Basis of the estimate of amount sent to the second off-site facility to which chemicals were transferred.  See Toxic Chemical Release Inventory Reporting Forms and Instructions, Revised 2014 Version, Appendix B. (https://www.epa.gov/sites/production/files/2015-01/documents/rfi_ry2014_111914.pdf#page=173)
    "off_name3", -- Name of the third off-site facility to which chemicals were transferred. 
    "off_basis3", -- Basis of the estimate of amount sent to the third off-site facility to which chemicals were transferred.  See Toxic Chemical Release Inventory Reporting Forms and Instructions, Revised 2014 Version, Appendix B. (https://www.epa.gov/sites/production/files/2015-01/documents/rfi_ry2014_111914.pdf#page=173)
    "off_city4", -- Location of the fourth off-site facility to which chemicals were transferred. 
    "off_name4", -- Name of the fourth off-site facility to which chemicals were transferred. 
    "off_basis4", -- Basis of the estimate of amount sent to the fourth off-site facility to which chemicals were transferred.  See Toxic Chemical Release Inventory Reporting Forms and Instructions, Revised 2014 Version, Appendix B. (https://www.epa.gov/sites/production/files/2015-01/documents/rfi_ry2014_111914.pdf#page=173)
    "off_basis5", -- Basis of the estimate of amount sent to the fifth off-site facility to which chemicals were transferred.  See Toxic Chemical Release Inventory Reporting Forms and Instructions, Revised 2014 Version, Appendix B. (https://www.epa.gov/sites/production/files/2015-01/documents/rfi_ry2014_111914.pdf#page=173)
    "off_city6", -- Location of the sixth off-site facility to which chemicals were transferred. 
    "off_basis6", -- Basis of the estimate of amount sent to the sixth off-site facility to which chemicals were transferred.  See Toxic Chemical Release Inventory Reporting Forms and Instructions, Revised 2014 Version, Appendix B. (https://www.epa.gov/sites/production/files/2015-01/documents/rfi_ry2014_111914.pdf#page=173)
    "off_city7", -- Location of the seventh off-site facility to which chemicals were transferred. 
    "off_basis7", -- Basis of the estimate of amount sent to the seventh off-site facility to which chemicals were transferred.  See Toxic Chemical Release Inventory Reporting Forms and Instructions, Revised 2014 Version, Appendix B. (https://www.epa.gov/sites/production/files/2015-01/documents/rfi_ry2014_111914.pdf#page=173)
    "geocoded_column", -- Geocoded facility location used for mapping purposes.  Combination of facility street address, city, state and zip code.
    "cas_no", -- Chemical Abstracts Service (CAS) Registry identification number for chemical released. (See https://www.cas.org/)
    "fac_zip", -- ZIP code of city or town where facility is located.
    "geocoded_column_state",
    "geocoded_column_zip",
    "geocoded_column_address",
    "geocoded_column_city",
    "off_name6", -- Name of the sixth off-site facility to which chemicals were transferred. 
    "off_state6", -- State in which the sixth off-site facility is located.
    "off_state8", -- State in which the eighth off-site facility is located.
    "fac_mailstate", -- State of the mailing address of the facility.
    "off_city5", -- Location of the fifth off-site facility to which chemicals were transferred. 
    "water2", -- All releases of the chemical to an additional water body. Measured in pounds, except for  dioxin and dioxin-like compounds, which are measured in grams.
    "stack", -- All releases of the chemical to the air that are released through stacks, vents, ducts, pipes, or any other confined air stream. Measured in pounds, except for  dioxin and dioxin-like compounds, which are measured in grams.
    "withdrawalcode2", -- Second Withdrawal code, if needed, for the report. See Toxic Chemical Release Inventory Reporting Forms and Instructions, Revised 2014 Version, Appendix B. (https://www.epa.gov/sites/production/files/2015-01/documents/rfi_ry2014_111914.pdf#page=173)
    "withdrawal", -- Withdrawal code. A value of "1" indicates that some part of the  original report for this chemical was withdrawn.
    "revisioncode1", -- First Revision code for the report. See Toxic Chemical Release Inventory Reporting Forms and Instructions, Revised 2014 Version, Appendix B. (https://www.epa.gov/sites/production/files/2015-01/documents/rfi_ry2014_111914.pdf#page=173)
    "revision", -- Revision code. A value of "1" indicates that some part of the  original report for this chemical was revised.
    "form_a", -- FORM A (short form) indicator. A value of "1" indicates that the chemical was reported on the 2-page short FORM A. Added by DNREC.
    "naics6", -- Detailed (6-digit) additional industry classification of the facility. Used if there is more than one classification for the facility. Uses the North American Industry Classification System (NAICS). (See http://www.census.gov/eos/www/naics/)
    "naics5", -- Detailed (6-digit) additional industry classification of the facility. Used if there is more than one classification for the facility. Uses the North American Industry Classification System (NAICS). (See http://www.census.gov/eos/www/naics/)
    "naics3", -- Detailed (6-digit) additional industry classification of the facility. Used if there is more than one classification for the facility. Uses the North American Industry Classification System (NAICS). (See http://www.census.gov/eos/www/naics/)
    "tech_e_address", -- Email address of the person who is the technical contact at the facility in the report.
    "tech_phone", -- Phone number of the person who is the technical contact at the facility in the report.
    "tech_name", -- Name of the person who is the technical contact at the facility in the report. 
    "fac_county", -- County in which facility is located.
    "fac_city", -- City where facility is located.
    "fac_street1", -- Street name and number where facility is located.
    "fac_name", -- Name of the facility for which there is a report.
    "off_state3", -- State in which the third off-site facility is located.
    "landimp", -- Amount of the chemical that was released to a surface impoundment permitted under RCRA Subtitle C. Measured in pounds, except for  dioxin and dioxin-like compounds, which are measured in grams.
    "revisioncode2", -- Second Revision code, if needed, for the report. See Toxic Chemical Release Inventory Reporting Forms and Instructions, Revised 2014 Version, Appendix B. (https://www.epa.gov/sites/production/files/2015-01/documents/rfi_ry2014_111914.pdf#page=173)
    "withdrawalcode1", -- First Withdrawal code for the report. See Toxic Chemical Release Inventory Reporting Forms and Instructions, Revised 2014 Version, Appendix B. (https://www.epa.gov/sites/production/files/2015-01/documents/rfi_ry2014_111914.pdf#page=173)
    "form_r", -- FORM R (long form) indicator. A value of "1" indicates that the chemical was reported on the 2-page short FORM R. Added by DNREC.
    "basiscode1", -- Basis of the Water1 amount estimate. See Toxic Chemical Release Inventory Reporting Forms and Instructions, Revised 2014 Version, Appendix B. (https://www.epa.gov/sites/production/files/2015-01/documents/rfi_ry2014_111914.pdf#page=173)
    "riverpercent2", -- Percent of chemical amount to river2 caused by storm water
    "cert_name", -- Name of the person certifying the report.
    "fac_mailstreet2", -- Additional address information of the mailing address of the facility.
    "fac_mailcounty", -- County of the mailing address of the facility.
    "cont_name", -- Name of the person who is the public contact at the facility in the report. 
    "naics4", -- Detailed (6-digit) additional industry classification of the facility. Used if there is more than one classification for the facility. Uses the North American Industry Classification System (NAICS). (See http://www.census.gov/eos/www/naics/)
    "fugitive", -- All releases of the chemical to the air that are not released through stacks, vents, ducts, pipes, or any other confined air stream. Measured in pounds, except for  dioxin and dioxin-like compounds, which are measured in grams.
    "landfill", -- Amount of the chemical that was placed in on-site landfills other than RCRA Subtitle C landfills. (Those landfills which are authorized under the Resource Conservation and Recovery Act (RCRA) to accept hazardous waste for disposal.) Measured in pounds, except for  dioxin and dioxin-like compounds, which are measured in grams.
    "potw", -- Amount of chemicals that are transferred to a primary Publicly-Owned Treatment Works facility, generally considered treated except for metals. Measured in pounds, except for  dioxin and dioxin-like compounds, which are measured in grams.
    "off_ste_rel4", -- Amount of chemical that is contained in waste transferred to a fourth off-site facility for the purposes of disposal, treatment, energy recovery, or recycling. Measured in pounds, except for  dioxin and dioxin-like compounds, which are measured in grams.
    "off_ste_tre6", -- Code for the  type of disposal, treatment, energy recovery, or recycling methods used by the sixth off-site facility for the reported chemical. See Toxic Chemical Release Inventory Reporting Forms and Instructions, Revised 2014 Version, Appendix B. (https://www.epa.gov/sites/production/files/2015-01/documents/rfi_ry2014_111914.pdf#page=174)
    "off_ste_rel8" -- Amount of chemical that is contained in waste transferred to a eighth off-site facility for the purposes of disposal, treatment, energy recovery, or recycling. Measured in pounds, except for  dioxin and dioxin-like compounds, which are measured in grams.
FROM
    "delaware-gov/toxics-release-inventory-9bws-2xkb:latest"."toxics_release_inventory"
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/toxics-release-inventory-9bws-2xkb with SQL in under 60 seconds.

This repository is an "external" repository. That means it's hosted elsewhere, in this case at data.delaware.gov. When you querydelaware-gov/toxics-release-inventory-9bws-2xkb: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.delaware.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 \
  "delaware-gov/toxics-release-inventory-9bws-2xkb" \
  --handler-options '{
    "domain": "data.delaware.gov",
    "tables": {
        "toxics_release_inventory": "9bws-2xkb"
    }
}'

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, delaware-gov/toxics-release-inventory-9bws-2xkb is just another Postgres schema.