Query the Data Delivery Network
Query the DDNThe 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
"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.
"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_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_state1", -- State in which the first 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_state2", -- State in which the second off-site facility is located.
"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_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_city1", -- Location of the first off-site facility to which chemicals were transferred.
"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.
"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.
"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_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_city2", -- Location 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.
"fac_mailcounty", -- County of the mailing address of the facility.
"fac_mailstreet2", -- Additional address information of the mailing address of the facility.
"cert_name", -- Name of the person certifying the report.
"riverpercent2", -- Percent of chemical amount to river2 caused by storm water
"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)
"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.
"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)
"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)
"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.
"off_state3", -- State in which the third off-site facility is located.
"fac_name", -- Name of the facility for which there is a report.
"fac_street1", -- Street name and number where facility is located.
"fac_city", -- City where facility is located.
"fac_county", -- County in which facility is located.
"tech_name", -- Name 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_e_address", -- Email address of the person who is the technical contact at the facility in the report.
"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/)
"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/)
"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/)
"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.
"revision", -- Revision code. A value of "1" indicates that some part of the original report for this chemical was revised.
"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)
"withdrawal", -- Withdrawal code. A value of "1" indicates that some part of the original report for this chemical was withdrawn.
"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)
"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.
"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.
"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.
"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.
"metal", -- Metal or metal compound indicator. A value of "1" indicates that the chemical is a metal or metal compound. Added by DNREC.
"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)
"off_state4", -- State in which the fourth off-site facility is located.
"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_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_state7", -- State in which the seventh off-site facility is located.
"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_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_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.
"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.
"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.
"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.
"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.
"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.
"cert_title", -- Title of the person certifying the report.
"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)
"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)
"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)
"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)
"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)
"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)
"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)
"potwstate1", -- State in which primary Publicly-Owned Treatment Works 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.
"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.
"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.
"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.
"off_state9", -- State in which the ninth off-site facility is located.
"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.
"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.
"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)
"repyr", -- Calendar year represented by data (i.e., 2009)
"report_num", -- Report number. Assigned by database and used as a unique identifier for the report.
"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)
"trifacid", -- Facility ID number. Assigned by EPA to identify facilities for which there are release reports.
"fac_zip", -- ZIP code of city or town where facility is located.
"cas_no", -- Chemical Abstracts Service (CAS) Registry identification number for chemical released. (See https://www.cas.org/)
"cont_phone", -- Phone number of the person who is the public contact at the facility in the report.
"cont_e_address", -- Email address of the person who is the public contact at the facility in the report.
"naics", -- Basic (3-digit) industry classification of the facility, derived from the NAICS1 field. Added by DNREC.
"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/)
"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/)
"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)
"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.
"river1", -- Name of the water body to which the release occurred.
"river2", -- Name of the additional water body to which the release occurred.
"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.
"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.
"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.
"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.
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.
Query Your Local Engine
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; sgr
can 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 clone
and sgr checkout
.
Cloning Data
Because delaware-gov/toxics-release-inventory-9bws-2xkb: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/toxics-release-inventory-9bws-2xkb
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/toxics-release-inventory-9bws-2xkb:latest
This will download all the objects for the latest
tag of delaware-gov/toxics-release-inventory-9bws-2xkb
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/toxics-release-inventory-9bws-2xkb: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/toxics-release-inventory-9bws-2xkb: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/toxics-release-inventory-9bws-2xkb
is just another Postgres schema.