epa 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. data/.autotest +1 -0
  2. data/.gemtest +0 -0
  3. data/.gitignore +41 -0
  4. data/.rspec +3 -0
  5. data/.yardopts +3 -0
  6. data/Gemfile +3 -0
  7. data/LICENSE.md +10 -0
  8. data/README.md +70 -0
  9. data/Rakefile +18 -0
  10. data/epa.gemspec +31 -0
  11. data/lib/epa.rb +18 -0
  12. data/lib/epa/client.rb +14 -0
  13. data/lib/epa/client/connection.rb +19 -0
  14. data/lib/epa/client/pcs.rb +647 -0
  15. data/lib/epa/client/rad_info.rb +384 -0
  16. data/lib/epa/client/request.rb +18 -0
  17. data/lib/epa/version.rb +3 -0
  18. data/spec/epa/client/connection.rb +0 -0
  19. data/spec/epa/client/pcs_spec.rb +282 -0
  20. data/spec/epa/client/rad_info_spec.rb +87 -0
  21. data/spec/epa/client/request_spec.rb +0 -0
  22. data/spec/epa/client_spec.rb +0 -0
  23. data/spec/epa_spec.rb +10 -0
  24. data/spec/fixtures/admin_penalty_order.xml +18 -0
  25. data/spec/fixtures/facility.xml +56 -0
  26. data/spec/fixtures/facility_type.xml +74 -0
  27. data/spec/fixtures/pcs_cmpl_schd_viol.xml +95 -0
  28. data/spec/fixtures/pcs_cmpl_sched.xml +609 -0
  29. data/spec/fixtures/pcs_code_desc.xml +10 -0
  30. data/spec/fixtures/pcs_dmr_measurement.xml +10144 -0
  31. data/spec/fixtures/pcs_effl_lim.xml +2503 -0
  32. data/spec/fixtures/pcs_effl_lim_concentr.xml +2839 -0
  33. data/spec/fixtures/pcs_effl_lim_qty.xml +1245 -0
  34. data/spec/fixtures/pcs_enfor_action.xml +160 -0
  35. data/spec/fixtures/pcs_evidentiary_hearing_event.xml +16 -0
  36. data/spec/fixtures/pcs_industrial_user_info.xml +173 -0
  37. data/spec/fixtures/pcs_inspect.xml +11 -0
  38. data/spec/fixtures/pcs_pci_audit.xml +54 -0
  39. data/spec/fixtures/pcs_permit_event.xml +22 -0
  40. data/spec/fixtures/pcs_permit_facility.xml +66 -0
  41. data/spec/fixtures/pcs_pipe_sched.xml +290 -0
  42. data/spec/fixtures/pcs_pipe_sched_lat_long.xml +526 -0
  43. data/spec/fixtures/pcs_pretreatment_perf_summary.xml +224 -0
  44. data/spec/fixtures/pcs_single_event_viol.xml +84 -0
  45. data/spec/fixtures/pcs_sludge.xml +144 -0
  46. data/spec/fixtures/rad_geo.xml +28 -0
  47. data/spec/fixtures/rad_reg_prog.xml +108 -0
  48. data/spec/fixtures/rad_regulation.xml +20 -0
  49. data/spec/helper.rb +48 -0
  50. metadata +257 -0
@@ -0,0 +1 @@
1
+ require 'autotest/bundler'
File without changes
@@ -0,0 +1,41 @@
1
+ !.gitignore
2
+ *.gem
3
+ *.rbc
4
+ *.sw[a-p]
5
+ *.tmproj
6
+ *.tmproject
7
+ *.un~
8
+ *~
9
+ .DS_Store
10
+ .Spotlight-V100
11
+ .Trashes
12
+ ._*
13
+ .bundle
14
+ .config
15
+ .directory
16
+ .elc
17
+ .redcar
18
+ .yardoc
19
+ /.emacs.desktop
20
+ /.emacs.desktop.lock
21
+ Desktop.ini
22
+ Gemfile.lock
23
+ Icon?
24
+ InstalledFiles
25
+ Session.vim
26
+ Thumbs.db
27
+ \#*\#
28
+ _yardoc
29
+ auto-save-list
30
+ coverage
31
+ doc/
32
+ lib/bundler/man
33
+ pkg
34
+ pkg/*
35
+ rdoc
36
+ spec/reports
37
+ test/tmp
38
+ test/version_tmp
39
+ tmp
40
+ tmtags
41
+ tramp
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --color
2
+ --format=nested
3
+ --backtrace
@@ -0,0 +1,3 @@
1
+ --markup markdown
2
+ -
3
+ LICENSE.md
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source 'http://rubygems.org'
2
+
3
+ gemspec
@@ -0,0 +1,10 @@
1
+ Copyright (c) 2011, Code for America
2
+ All rights reserved.
3
+
4
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
5
+
6
+ * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
7
+ * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
8
+ * Neither the name of Code for America nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
9
+
10
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,70 @@
1
+ # EPA EnviroFacts Ruby Wrapper
2
+
3
+ A thin wrapper for the EPA EnviroFacts [API](http://www.epa.gov/enviro/facts/ef_restful.html)
4
+
5
+ Currently only RadInfo and PCS data supported
6
+
7
+ Installation
8
+ ------------
9
+ gem install epa
10
+
11
+ Usage Examples
12
+ --------------
13
+
14
+ require 'epa'
15
+
16
+ # List all the tables in the RadInfo database
17
+ EPA::Client::RadInfo.new.catalog()
18
+
19
+ # Get radiation facilities in Pasadena
20
+ EPA::Client::RadInfo.new.facility(:column => 'CITY_NAME', :value => 'PASADENA')
21
+
22
+ # List all the tables in the PCS database
23
+ EPA::Client::Pcs.new.catalog()
24
+
25
+
26
+ Contributing
27
+ ------------
28
+ In the spirit of [free software](http://www.fsf.org/licensing/essays/free-sw.html), **everyone** is encouraged to help improve this project.
29
+
30
+ Here are some ways *you* can contribute:
31
+
32
+ * by using alpha, beta, and prerelease versions
33
+ * by reporting bugs
34
+ * by suggesting new features
35
+ * by writing or editing documentation
36
+ * by writing specifications
37
+ * by writing code (**no patch is too small**: fix typos, add comments, clean up inconsistent whitespace)
38
+ * by refactoring code
39
+ * by resolving [issues](https://github.com/codeforamerica/epa_ruby/issues)
40
+ * by reviewing patches
41
+
42
+ Submitting an Issue
43
+ -------------------
44
+ We use the [GitHub issue tracker](https://github.com/codeforamerica/epa_ruby/issues) to track bugs and
45
+ features. Before submitting a bug report or feature request, check to make sure it hasn't already
46
+ been submitted. You can indicate support for an existing issuse by voting it up. When submitting a
47
+ bug report, please include a [Gist](https://gist.github.com/) that includes a stack trace and any
48
+ details that may be necessary to reproduce the bug, including your gem version, Ruby version, and
49
+ operating system. Ideally, a bug report should include a pull request with failing specs.
50
+
51
+ Submitting a Pull Request
52
+ -------------------------
53
+ 1. Fork the project.
54
+ 2. Create a topic branch.
55
+ 3. Implement your feature or bug fix.
56
+ 4. Add documentation for your feature or bug fix.
57
+ 5. Run <tt>bundle exec rake doc:yard</tt>. If your changes are not 100% documented, go back to step 4.
58
+ 6. Add specs for your feature or bug fix.
59
+ 7. Run <tt>bundle exec rake spec</tt>. If your changes are not 100% covered, go back to step 6.
60
+ 8. Commit and push your changes.
61
+ 9. Submit a pull request. Please do not include changes to the gemspec, version, or history file. (If you want to create your own version for some reason, please do so in a separate commit.)
62
+
63
+ Copyright
64
+ ---------
65
+ Copyright (c) 2010 Code for America Laboratories
66
+ See [LICENSE](https://github.com/codeforamerica/broadband_map_ruby/blob/master/LICENSE.md) for details.
67
+
68
+
69
+
70
+ [![Code for America Tracker](http://stats.codeforamerica.org/codeforamerica/epa_ruby.png)](http://stats.codeforamerica.org/projects/epa_ruby)
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env rake
2
+
3
+ require 'bundler'
4
+ Bundler::GemHelper.install_tasks
5
+
6
+ require 'rspec/core/rake_task'
7
+ RSpec::Core::RakeTask.new(:spec)
8
+
9
+ task :default => :spec
10
+ task :test => :spec
11
+
12
+ require 'yard'
13
+ namespace :doc do
14
+ YARD::Rake::YardocTask.new do |task|
15
+ task.files = ['LICENSE.md', 'lib/**/*.rb']
16
+ task.options = ['--markup', 'markdown']
17
+ end
18
+ end
@@ -0,0 +1,31 @@
1
+ # -*- encoding: utf-8 -*-
2
+ require File.expand_path('../lib/epa/version', __FILE__)
3
+
4
+ Gem::Specification.new do |gem|
5
+ gem.name = 'epa'
6
+ gem.version = EPA::VERSION
7
+ gem.author = "blakeshall"
8
+ gem.email = 'blake@codeforamerica.org'
9
+ gem.homepage = ''
10
+ gem.summary = %q{A Ruby wrapper for the EPA envirofacts api}
11
+ gem.description = %q{Currently only supports PCS and RADSInfo databases}
12
+
13
+ gem.files = `git ls-files`.split("\n")
14
+ gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
15
+ gem.executables = `git ls-files -- bin/*`.split("\n").map{|f| File.basename(f)}
16
+ gem.require_paths = ['lib']
17
+
18
+ gem.add_development_dependency 'ZenTest', '~> 4.5'
19
+ gem.add_development_dependency 'maruku', '~> 0.6'
20
+ gem.add_development_dependency 'rake', '~> 0.9'
21
+ gem.add_development_dependency 'rspec', '~> 2.6'
22
+ gem.add_development_dependency 'simplecov', '~> 0.4'
23
+ gem.add_development_dependency 'yard', '~> 0.7'
24
+ gem.add_development_dependency 'webmock', '~> 1.6'
25
+
26
+ gem.add_runtime_dependency 'faraday', '~> 0.6.1'
27
+ gem.add_runtime_dependency 'faraday_middleware', '~> 0.6.3'
28
+ gem.add_runtime_dependency 'hashie', '~> 1.0.0'
29
+ gem.add_runtime_dependency 'multi_xml', '~> 0.2.2'
30
+ gem.add_runtime_dependency 'rash', '~> 0.3.0'
31
+ end
@@ -0,0 +1,18 @@
1
+ require 'epa/client'
2
+
3
+ module EPA
4
+
5
+ def self.client(options={})
6
+ EPA::Client.new(options)
7
+ end
8
+
9
+ def self.method_missing(method, *args, &block)
10
+ return super unless client.respond_to?(method)
11
+ client.send(method, *args, &block)
12
+ end
13
+
14
+ def self.respond_to?(method, include_private=false)
15
+ client.respond_to?(method, include_private) || super(method, include_private)
16
+ end
17
+
18
+ end
@@ -0,0 +1,14 @@
1
+ require 'epa/client'
2
+ require 'epa/client/connection'
3
+ require 'epa/client/request'
4
+ require 'epa/client/rad_info'
5
+ require 'epa/client/pcs'
6
+
7
+ module EPA
8
+ class Client
9
+ include EPA::Client::Connection
10
+ include EPA::Client::Request
11
+ #include EPA::Client::RadInfo
12
+
13
+ end
14
+ end
@@ -0,0 +1,19 @@
1
+ require 'faraday_middleware'
2
+
3
+ module EPA
4
+ class Client
5
+ module Connection
6
+ private
7
+
8
+ def connection
9
+ Faraday.new(:url => 'http://iaspub.epa.gov/enviro/efservice/') do |connection|
10
+ connection.use Faraday::Request::UrlEncoded
11
+ connection.use Faraday::Response::RaiseError
12
+ connection.use Faraday::Response::Rashify
13
+ connection.use Faraday::Response::ParseXml
14
+ connection.adapter(Faraday.default_adapter)
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,647 @@
1
+ module EPA
2
+ class Client
3
+ class Pcs
4
+ @@lookup_table ={
5
+ "ADMIN_PENALTY_ORDER"=> {
6
+ "JUDICIAL_APPEAL_FILED_DATE"=> "A 6 digit field that represents the date on which the respondent filed an appeal to an Administrative Penalty Order in district court (Class I), or a U.S. Court of Appeals (Class II) and provided notice of the appeal to an EPA administrator. This date may be obtained from the hearing clerks' records or the Office of Regional Counsel.",
7
+ "ENFOR_ACTION_CODE"=> "Code describing an enforcement action taken in response to a violation.",
8
+ "ENFOR_ACTION_TYPE"=> "Indicates whether an enforcement action was issued by a state or EPA.",
9
+ "HEARING_REQUEST"=> "A 1 character field that represents whether the respondent requests a hearing to contest an administrative penalty. If requested, the hearing must be requested within a designated time period (30 days for Class I and 20 days for Class II administrative penalties).",
10
+ "NPDES"=> "A National Pollutant Discharge Elimination System (NPDES) code used to uniquely identify a permitted NPDES facility.",
11
+ "PROPOSED_ORDER_ISSUED_DATE"=> "The 6 digit field that represents the date a proposed administrative penalty order (compliance) was signed by an appropriate EPA official.",
12
+ "PENALTY_AMOUNT_ASSESSED"=> "A 6 digit field that represents the dollar amount of the assessed administrative penalty, as identified in the final order.",
13
+ "FINAL_ORDER_DATE"=> "A 6 digit field that represents the date that the final administrative penalty order was entered (issued) and the administrative penalty amount was assessed. The final order will be issued by the appropriate EPA official. NOTE=> In the case of a Class II administrative penalty order which is contested, the final order will be issued by the law judge or the judicial officer where appealed.",
14
+ "CLASS_II_APPEAL_FILED"=> "A 1 character field that represents that an \"appeal\" of the decision of the administrative law judge in a Class II action was filed. An appeal to the EPA judicial officer may be made by either the agency (EPA), or the respondent.",
15
+ "PENALTY_COLLECTED_DATE"=> "A 6 digit field that represents the date that verificiation of full (i.e., Final, in the case of multiple payments) payment of the Administrative Penalty amount was received. Verification is usually a copy of the check provided by the regional hearing clerk.",
16
+ "ADMINISTRATIVE_PENALTY_CLASS"=> "A 1 digit field that represents the classification for an administrativepenalty. Class is defined by a statutory maximum penalty amount, the length of the period to request a hearing (comment period), and the nature of the hearing. For a Class I Administrative Order, the maximum penalty is $25,000. For a Class II Administrative Order, the maximum penalty is $125,000 and the hearing is held before an EPA Administrative Law Judge.",
17
+ "ENFOR_ACTION_DATE"=> "The date of the enforcement action."
18
+ },
19
+ "PERMIT_EVENT"=> {
20
+ "EVENT_ACTUAL_DATE"=> "The actual date the permit tracking event was completed.",
21
+ "TRACKING_EVENT_CODE"=> "Code which describes the permit tracking milestone event.",
22
+ "NPDES"=> "A National Pollutant Discharge Elimination System (NPDES) code used to uniquely identify a permitted NPDES facility."
23
+ },
24
+ "PIPE_SCHED_LAT_LONG"=> {
25
+ "PIPE_LAT_LONG_METHOD"=> "Describes the procedure used to determine the pipe latitude and longitude coordinates.",
26
+ "PIPE_LAT_LONG_DESC"=> "Describes the exact place where the pipe latitude and longitude coordinates were collected.",
27
+ "PIPE_LONG"=> "Longitude describing the pipe's location.",
28
+ "NPDES"=> "A National Pollutant Discharge Elimination System (NPDES) code used to uniquely identify a permitted NPDES facility.",
29
+ "PIPE_SCHED_STREAM_SEGMENT"=> "A four-character code assigned for facilities by EPA to identify stret ches of water from one significant event to another, where 'significant event' represents the mouth of a body of water, the confl uence of two streams, etc.",
30
+ "PIPE_RECEIVING_STR_CLASS_CODE"=> "A two-character field containing a code which describes the related outfall stream segment type.",
31
+ "PIPE_USGS_HYDRO_BASIN_CODE"=> "A code assigned by the United States Geological Survey to identify dra inage water basins for facilities by their geographic location. Also referred to as Cataloging Unit and as HUC by frequent users of Reach information.",
32
+ "PIPE_LAT_LONG_ACCURACY"=> "Code to describe the technical accuracy of the pipe's longitude and latitude characteristics.",
33
+ "DISCHARGE_NUM"=> "A three-digit code assigned for each point of discharge. Links a measurement record to the related limit record.",
34
+ "PIPE_LAT"=> "Latitude describing the pipe's location.",
35
+ "REPORT_DESIG"=> "A one-character code used to designate a particular grouping of parameters for reporting purposes. Links a measurement/violation record to the related limit record.",
36
+ "PIPE_LAT_LONG_DATUM"=> "Describes the datum used to determine the pipe latitude and longitude coordinates. A datum is a network of monuments and reference points defining a mathematical surface from which geographic computations can be made (see EPA Locational Data Policy Implementation Guidance).",
37
+ "PIPE_LAT_LONG_SCALE"=> "Describes the scale used to determine the pipe latitude and longitude coordinates.",
38
+ "PIPE_SCHED_MILEAGE_IND"=> "A five-character field giving the length of a particular facility stre am segment in miles downstream from the beginning of the stream segment.",
39
+ "PIPE_SET_QUALIFIER"=> "A one-digit code used to provide unique linkage between Pipe Schedules, Parameter Limits, and Measurement/Violations."
40
+ },
41
+ "DMR_MEASUREMENT"=> {
42
+ "NO_DISCHARGE_IND"=> "Indicates the reason that \"No Discharge\" or \"No Data\" was reported in place of the measurement on the DMR.",
43
+ "QNCR_MV_DET_DATE"=> "The actual date of reportable noncompliance (RNC) for a particular measurement or DMR nonreceipt violation.",
44
+ "REPORT_DESIG"=> "A one-character code used to designate a particular grouping of parameters for reporting purposes. Links a measurement/violation record to the related limit record.",
45
+ "MONITORING_LOC"=> "The location where the measurement sample was taken.",
46
+ "QNCR_MV_RESOL_CODE"=> "Indicates resolution of reportable noncompliance (RNC) for a particular measurement or DMR nonreceipt violation.",
47
+ "QNCR_MV_DET_CODE"=> "Indicates reportable noncompliance (RNC) for a particular measurement or DMR nonreceipt violation.",
48
+ "QTY_MAX"=> "The reported value for quantity maximum.",
49
+ "PARAM_CODE"=> "The parameter code of the measurement violation.",
50
+ "PIPE_SET_QUALIFIER"=> "A one-digit code used to provide unique linkage between Pipe Schedules, Parameter Limits, and Measurement/Violations.",
51
+ "MONITORING_PERIOD_END_DATE"=> "For effluent measurements violations=> the monitoring period end date as stated on the DMR.",
52
+ "MODIF_NUM"=> "The modification number on the measurement/violation record that matches the corresponding parameter limit record.",
53
+ "LIMIT_TYPE"=> "The limit type of a Measurement/Violation record.",
54
+ "SEASON_NUM"=> "The effluent season number of the measurement or violation.",
55
+ "QNCR_MV_RESOL_DATE"=> "The actual date of resolution of reportable noncompliance (RNC) for a particular measurement or DMR nonreceipt violation.",
56
+ "CONCENTR_AVG"=> "The reported value for concentration average.",
57
+ "MEAS_VIOL_CODE"=> "The effluent violation code describing the worst violation detected for this report parameter's measurements.",
58
+ "CONCENTR_MIN"=> "The reported value for concentration minimum.",
59
+ "NPDES"=> "A National Pollutant Discharge Elimination System (NPDES) code used to uniquely identify a permitted NPDES facility.",
60
+ "CONCENTR_MAX"=> "The reported value for concentration maximum.",
61
+ "QTY_AVG"=> "The reported value for quantity average.",
62
+ "DISCHARGE_NUM"=> "A three-digit code assigned for each point of discharge. Links a measurement record to the related limit record.",
63
+ "QUANTITY_UNIT_CODE"=> "The quantity unit code as reported on the returned DMR. During the update, the system will compare the entered value to the limited value and print warning messages identifying all differences.",
64
+ "CONCENTRATION_UNIT_CODE"=> "The concentration unit code as reported on the returned DMR. During the update, the system will compare the entered value to the limited value and print warning messages identifying all differences."
65
+ },
66
+ "INSPECTION"=> {
67
+ "INSP_CODE"=> "Identifies the type of inspector who performed the inspection.",
68
+ "INSP_TYPE"=> "Identifies the type of inspection performed.",
69
+ "INSP_DATE"=> "The date of the actual inspection.",
70
+ "NPDES"=> "A National Pollutant Discharge Elimination System (NPDES) code used to uniquely identify a permitted NPDES facility."
71
+ },
72
+ "ENFOR_ACTION"=> {
73
+ "EA_STAT_DATE"=> "Date of the latest enforcement action status.",
74
+ "NPDES"=> "A National Pollutant Discharge Elimination System (NPDES) code used to uniquely identify a permitted NPDES facility.",
75
+ "EA_TYPE"=> "Indicates whether an enforcement action was issued by a state or EPA.",
76
+ "EA_STAT_CODE"=> "Current status of an enforcement action for a particular violation or group of violations.",
77
+ "EA_DATE"=> "The date of the enforcement action.",
78
+ "EA_DOCKET_NUMBER"=> "The file number, usually the docket number, used by the regional/state office for a formal enforcement action.",
79
+ "EA_DATA_SRC_CODE"=> "For violations of compliance schedule events, the data source code of the schedule being violated.",
80
+ "EA_CODE"=> "Code describing an enforcement action taken in response to a violation.",
81
+ "EA_RESP_DUE_DATE"=> "Date permittee is due to respond to the Agency (EPA or State) in accordance with the action taken. For example, this could be the date the permittee promised a telephone caller the DMR would be submitted or a date by which compliance is required by the Administrative order."
82
+ },
83
+ "PERMIT_FACILITY"=> {
84
+ "NAME_2"=> "The next 30 characters of the official name of the facility which appears on the NPDES permit application. See NAME_1.",
85
+ "INACTIVE_CODE"=> "Code which indicates whether the facility is currently active.",
86
+ "SCALE"=> "Describes the scale used to determine the latitude and longitude coordinates.",
87
+ "USGS_HYDRO_BASIN_CODE"=> "A code assigned by the United States Geological Survey to identify drainage water basins for facilities by their geographic location. Also referred to as Cataloging Unit and as HUC by frequent users of Reach information.",
88
+ "NMP_FINAN_STAT_CODE"=> "Indicates the financial fitness of the Publicly Owned Treatment Works (POTW) to comply with the municipal compliance plan (MCP) schedule and meet the statutory requirements in accordance with the National Municipal Policy (NMP).",
89
+ "FEDERAL_GRANT_IND"=> "Used to identify a publicly owned waste treatment works (POTW) with a SIC code of 4952 which obtained federal grant money to construct. The only value, '$', is to be entered as soon as a permittee who constructed using P.L. 92500 funding is completed and operational, and the final inspection is approved.",
90
+ "CURR_YEAR_AUTO_QNCR_STAT"=> "Automatically set to indicate the status of reportable non-compliance as it appeared on the quarterly non-compliance report (QNCR) for the current year.",
91
+ "LOC_STREET_2"=> "The second of two lines of street information in the location address.",
92
+ "LOC_STATE"=> "State or territory in which the facility is physically located.",
93
+ "INDUSTRY_CLASS"=> "Identifies the industrial classification of a facility.",
94
+ "NAME_1"=> "The first 30 characters of the official name of the facility which appears on the National Pollutant Discharge Elimination System (NPDES) permit application.",
95
+ "FLOW_RATE"=> "The average flow, in millions of gallons per day, that a permitted facility was designed to accommodate.",
96
+ "MAILING_NAME"=> "The facility mailing name.",
97
+ "CITY_NAME"=> "The name of the city where the facility is located. Each city name is defined with its corresponding city code in the system's city/state code table.",
98
+ "COUNTY_CODE"=> "The standard three digit Federal Information Processing Standards (FIPS) code which defines the county in which the facility is located.",
99
+ "COGN_OFFICIAL_TELE_NUMBER"=> "The telephone number of the permittee representative responsible for administration of the DMRs.",
100
+ "ORIGINL_PERMIT_ISSUE_DATE"=> "The date the first permit was issued for a facility.",
101
+ "MAILING_STREET_2"=> "The second line of street information in the primary facility mailing address.",
102
+ "MAILING_STREET_1"=> "The first of two lines of street information in the primary facility mailing address.",
103
+ "LOC_CITY"=> "Name of the city or town in which the facility is physically located.",
104
+ "PRETREATMENT_CODE"=> "A one-character code which indicates if the permitted municipality is required to develop a pretreatment program.",
105
+ "MAILING_STATE"=> "The state in the primary facility mailing address.",
106
+ "DESCRIPT"=> "A text description of a code, such as a permit tracking event code.",
107
+ "PERMIT_ISSUED_DATE"=> "The date the current permit was issued/signed.",
108
+ "SOURCE"=> "A text field explaining the source of the Albers latitude and longitude values in the same row.",
109
+ "STREAM_SEGMENT"=> "A four-character code assigned for facilities by EPA to identify stretches of water from one significant event to another, where 'significant event' represents the mouth of a body of water, the confluence of two streams, etc.",
110
+ "COUNTY_NAME"=> "The county name is the name of the county where the facility is located.",
111
+ "LOC_NAME"=> "Name of entity located at the facility's physical address.",
112
+ "RIVER_BASIN"=> "A six-digit field used to identify the river basin in which the facility lies.",
113
+ "METHOD"=> "Code describing the procedure used to determine the latitude and longitude coordinates.",
114
+ "CITY_CODE"=> "The five digit code defined in the city master file and maintained by EPA, Monitoring and Data Support Division. The codes are unique for each city and place in a particular state or territory.",
115
+ "RECVNG_STREAM_CLASS_CODE"=> "A two-character field containing a code which describes the related facility stream segment type.",
116
+ "DRAFT_PERM_PUB_NOTIF_DATE"=> "The date on which public notification is given, indicating a National Pollutant Discharge Elimination System (NPDES) permit will be issued to a facility.",
117
+ "TYPE_OF_PERMIT_ISSUED"=> "A one-character code indicating whether EPA or a state has issued the permit.",
118
+ "MAJOR_DISCHARGE_INDICATOR"=> "A one character code designating that the facility has been identified as a major or minor discharger.",
119
+ "NMP_QUARTER"=> "Indicates the fiscal quarter during which the final enforceable municipal compliance plan (MCP) schedule is anticipated to be or was established.",
120
+ "RECEIVING_WATERS"=> "The name of the river, stream, tributary, lake or other body of water into which the effluent is discharged.",
121
+ "FAC_ID"=> "The facility identification code controlled and issued by the EPA Facility Index System (FINDS), as required by the EPA Facility Identification Data Standard (FIDS). The FINDS_ID is derived by Envirofacts from the most recent FINDS system extracts and is used as an identifier to cross-reference facility data maintained by different EPA programs.",
122
+ "LONGITUDE"=> "Longitude describing facility location.",
123
+ "PREV_YEAR_AUTO_QNCR_STAT"=> "Automatically set to indicate the status of reportable non-compliance as it appeared on the quarterly non-compliance report for the previous year.",
124
+ "LOC_PHONE_NUM"=> "Telephone number of the facility.",
125
+ "FINAL_LIMITS_IND"=> "A facility is considered to be on final effluent limits when the permittee has completed all necessary construction to achieve the ultimate effluent limitation in the permit reflecting secondary treatment, best practicable control technology (BPT), best available technology (BAT), or more stringent limitations, such as state required limitations or water quality based limitations, or less stringent limitations established by a variance or a waiver. Refer to the Office of Water Evaluation Guide for the complete definition.",
126
+ "INACTIVE_DATE"=> "Date on which the facility became inactive or active.",
127
+ "TYPE_OF_OWNERSHIP"=> "A three digit code describing ownership classification.",
128
+ "MAILING_ZIP_CODE"=> "The zip code in the primary facility mailing address.",
129
+ "SIC_CODE"=> "The four digit code for the principal activity causing the discharge at the facility as defined by the 1987 Standard Industrial Classification (SIC) Manual.",
130
+ "APPL_RECEIVED_DATE"=> "The date on which the application for a National Pollutant Discharge Elimination System (NPDES) permit was received.",
131
+ "LOC_ZIP_CODE"=> "Zone Improvement Plan (ZIP) Code for the address of the physical location of the facility.",
132
+ "CODE_OF_ACCURACY"=> "Code describing technical accuracy of latitude and longitude data.",
133
+ "CURR_YEAR_MANL_QNCR_STAT"=> "Manually set to indicate the status of reportable noncompliance as it appeared on the quarterly noncompliance report for the current year for major facilities. May be used for reportable noncompliance indication for minor facilities.",
134
+ "REGION"=> "A two-digit code, 01 through 10, used to identify the EPA region in which the facility is located.",
135
+ "NPDES"=> "A National Pollutant Discharge Elimination System (NPDES) code used to uniquely identify a permitted NPDES facility.",
136
+ "DATUM"=> "Describes the datum used to determine the latitude and longitude coord inates. A datum is a network of monuments and reference points defining a mathematical surface from which geographic computations can be made (see EPA Locational Data Policy Implementation Guidance).",
137
+ "PERMIT_EXPIRED_DATE"=> "The date the current permit will expire.",
138
+ "COGN_OFFICIAL"=> "The name and/or department of the permittee's representative responsible for completing Discharge Monitoring Reports (DMR); also referred to as Facility Contact Person.",
139
+ "MAILING_CITY"=> "The city in the primary facility mailing address.",
140
+ "MILEAGE_IND"=> "A five-character field giving the length of a particular facility stream segment in miles downstream from the beginning of the stream segment.",
141
+ "NMP_FINAL_SCHED"=> "Indicates whether a final and enforceable Municipal Compliance Plan (MCP) schedule has been established to meet all statutory requirements in accordance with the National Municipal Policy (NMP). If a schedule has not been established, indicates reason for delay.",
142
+ "LATITUDE"=> "Latitude describing facility location.",
143
+ "LOC_STREET_1"=> "The first of two lines of street information in the location address.",
144
+ "PREV_YEAR_MANL_QNCR_STAT"=> "Manually set to indicate the status of reportable non-compliance as it appeared on the quarterly non-compliance report for the previous year for major facilities. May be used for reportable non-compliance for minor facilities."
145
+ },
146
+ "PCI_AUDIT"=> {
147
+ "INSP_TYPE"=> "Identifies the type of inspection performed.",
148
+ "PERMIT_MOD_FOR_PRETR_DATE"=> "A six-character date field representing the date when pretreatment con trol authority's NPDES permit was modified to require pretreatment implementation.",
149
+ "NPDES"=> "A National Pollutant Discharge Elimination System (NPDES) code used to uniquely identify a permitted NPDES facility.",
150
+ "SLUDGE_DISPOSAL_METHOD"=> "A variable-length character field representing the sludge disposal met hods utilized by any of the POTWs covered by the pretreatment control authority.",
151
+ "TECH_EVAL_LOCAL_LIMIT"=> "A one-character field indicating whether the pretreatment control auth ority has technically evaluated the need for local limits for all of the following pollutants=> cadmium, chromium, copper, lead, nick el, zinc, and any others required by the pretreatment approval authority (i.e., EPA Region or State).",
152
+ "INSP_DATE"=> "The date of the actual inspection.",
153
+ "ADOPT_LOCAL_LIMITS"=> "A one character field, related to TECH_EVAL_LOCAL_LIMIT, indicating whether the pretreatment control authority has adopted local limits for certain pollutants, if a technical evaluation indicated the need for such local limits. These pollutants include cadmium, chromium, copper, lead, nickel, and zinc."
154
+ },
155
+ "EFFL_LIM_QTY"=> {
156
+ "QTY_AVG_LIM_STAT_BASE"=> "The statistical base code for the quantity average limit.",
157
+ "QTY_MAX_LIM_STAT_BASE"=> "The statistical base code for the quantity maximum limit.",
158
+ "MODIF_NUM"=> "The modification number on the measurement/violation record that matches the corresponding parameter limit record.",
159
+ "NPDES"=> "A National Pollutant Discharge Elimination System (NPDES) code used to uniquely identify a permitted NPDES facility.",
160
+ "PARAM_CODE"=> "The parameter code of the measurement violation.",
161
+ "LIMIT_TYPE"=> "The limit type of a Measurement/Violation record.",
162
+ "MONITORING_LOC"=> "The location where the measurement sample was taken.",
163
+ "SEASON_NUM"=> "The effluent season number of the measurement or violation.",
164
+ "QTY_MAX_LIMIT"=> "The numeric value of the quantity maximum for the associated parameter as entered by the user.",
165
+ "DISCHARGE_NUM"=> "A three-digit code assigned for each point of discharge. Links a measurement record to the related limit record.",
166
+ "PIPE_SET_QUALIFIER"=> "A one-digit code used to provide unique linkage between Pipe Schedules, Parameter Limits, and Measurement/Violations.",
167
+ "REPORT_DESIG"=> "A one-character code used to designate a particular grouping of parameters for reporting purposes. Links a measurement/violation record to the related limit record.",
168
+ "QTY_AVG_LIMIT"=> "The numeric value of the quantity average for the associated parameter as entered by the user.",
169
+ "QTY_UNIT_CODE"=> "Code representing the unit of measure applicable to quantity limits and measurements as entered by the user."
170
+ },
171
+ "CMPL_SCHD_VIOL"=> {
172
+ "CMPL_SCHD_VIOL_CODE"=> "Violation code describing both automatic and manually detected compliance schedule violations.",
173
+ "CMPL_SCHD_VIOL_DATE"=> "The actual date of the compliance schedule violation. Ii is usually equal to CMPL_SCHD_EVT_SCHD_DATE.",
174
+ "NPDES"=> "A National Pollutant Discharge Elimination System (NPDES) code used to uniquely identify a permitted NPDES facility.",
175
+ "CS_RNC_DETECT_CODE"=> "Indicates reportable noncompliance (RNC) for a particular compliance schedule violation event.",
176
+ "CMPL_SCHD_NUM"=> "A two-character alphanumeric value assignd to each compliance schedule to uniquely identify it from other schedules imposed on the same permittee.",
177
+ "CS_RNC_DETECT_DATE"=> "The actual date of reportable noncompliance (RNC) for a particular compliance schedule violation event.",
178
+ "CMPL_SCHD_DATA_SRC_CODE"=> "Serves to uniquely identify the compliance schedule event. It may be a four-digit number where the first two digits are 07 and the last two digits are the FIPS state numeric code indicating the organization and the authority responsible for imposing the schedule.",
179
+ "CMPL_SCHD_EVT"=> "A five-digit code indicating the particular event that the permittee is scheduled to comply with.",
180
+ "CS_RNC_RESOL_DATE"=> "The actual date of resolution of reported noncompliance for a particular compliance event.",
181
+ "CS_RNC_RESOL_CODE"=> "Indicates resolution of reported noncompliance (RNC) for a particular compliance event."
182
+ },
183
+ "PRETREATMENT_PERF_SUMMARY"=> {
184
+ "NOVS_AND_AOS_AGAINST_SIUS"=> "A three-digit field representing the number of notices of violation, administrative orders, and equivalent actions which have been issued against significant industrial users by the pretreatment control authority in the past year.",
185
+ "CIVIL_OR_CRIM_JUDICIAL_ACTS"=> "A two-digit field representing the number of civil or criminal judicial suits filed in court by pretreatment control authorities against significant industrial users (SIUs) in the past year.",
186
+ "NPDES"=> "A National Pollutant Discharge Elimination System (NPDES) code used to uniquely identify a permitted NPDES facility.",
187
+ "SIUS_IN_SNC_COMPL_SCHED"=> "A three-digit field representing the total number of all significant industrial users (SIUs) in significant noncompliance (SNC) with pretreatment compliance schedules by violating compliance schedule milestones by 90 days or by violating compliance schedule reporting deadlines by 3 days. Until this definition appears in regulation (probably incorporated into the definition of significant violation), POTWs may use their existing criteria for SNC although use of the aforementioned definition in guidance is strongly encouraged. NOTE=> The PPS provides the number of SIUs not meeting compliance schedules; additional research may be needed to determine whether these violations constitute significant noncompliance.",
188
+ "SIUS_WITH_PUBLISHED_VIOLS"=> "A three-digit field representing the number of significant industrial users (SIUs) with significant violations (as defined in 40 CFR 403.8(f)(2)(vii)) in the past year published by the pretreatment control authority in the largest local daily newspaper located in the municipality services by the control authority.",
189
+ "REPORT_END_DATE"=> "A six digit date field representing the end date of the period that the Pretreatment Performance Summary covers.",
190
+ "IUS_THAT_PAID_PENALTIES"=> "A three-digit field representing the number of industrial users from which monetary penalties/fines (beyond typical user charges) have been collected by the pretreatment control authority in the past year.",
191
+ "REPORT_START_DATE"=> "A six digit date field representing the start date of the period that the Pretreatment Performance Summary covers."
192
+ },
193
+ "CODE_DESC"=> {
194
+ "TABLE_ID"=> "A three-digit code indicating the type of code that is being described. For example, 010 refers to COUNTY codes, while 110 refers to PERMIT TRACKING EVENT codes.",
195
+ "CODE"=> "A ten-digit (max) code indicating the code that is being described.",
196
+ "DESCRIPT"=> "A text description of a code, such as a permit tracking event code."
197
+ },
198
+ "EFFL_LIM"=> {
199
+ "MODIF_PERIOD_START_DATE"=> "Beginning of a period of time within a limits period during which the modified parametric limits are in effect. A basic parameter limit, by default, covers an entire limit period. Modifications to base limits can cover part or all of the limit period.",
200
+ "MODIF_NUM"=> "The modification number on the measurement/violation record that matches the corresponding parameter limit record.",
201
+ "NPDES"=> "A National Pollutant Discharge Elimination System (NPDES) code used to uniquely identify a permitted NPDES facility.",
202
+ "PARAM_CODE"=> "The parameter code of the measurement violation.",
203
+ "LIMIT_TYPE"=> "The limit type of a Measurement/Violation record.",
204
+ "MONITORING_LOC"=> "The location where the measurement sample was taken.",
205
+ "SEASON_NUM"=> "The effluent season number of the measurement or violation.",
206
+ "CONTESTED_PARAM_IND"=> "Indicates the parametric limit and/or other parametric requirements ar e currently in adjudication. Limits are stayed pending resolution of evidentiary hearing.",
207
+ "MODIF_PERIOD_END_DATE"=> "End of a time period within a limits period during which the modified parametric limits are in effect.",
208
+ "REPORT_DESIG"=> "A one-character code used to designate a particular grouping of parameters for reporting purposes. Links a measurement/violation record to the related limit record.",
209
+ "DISCHARGE_NUM"=> "A three-digit code assigned for each point of discharge. Links a measurement record to the related limit record.",
210
+ "DOCKET_NUMBER"=> "The file number, usually a docket number, used by the regional/state o ffice for a formal enforcement action that established the compliance schedule.",
211
+ "PIPE_SET_QUALIFIER"=> "A one-digit code used to provide unique linkage between Pipe Schedules, Parameter Limits, and Measurement/Violations.",
212
+ "CHANGE_OF_LIMIT_STAT"=> "Describes circumstances affecting limits such as through formal enforc ement actions or permit modifications. Any enforcement action coded here will cause violations to this limit to be considered as in Reportable Noncompliance (RNC), which must Quarterly Noncompliance Report (QNCR). May also be used to exclude measurement v iolations for a set of limits from being tracked for RNC."
213
+ },
214
+ "EFFL_LIM_CONCENTR"=> {
215
+ "CONC_MIN_LIMIT"=> "The numeric value of the concentration minimum for the associated parameter as entered by the user. Typically only used for pH, temperature and chlorine use.)",
216
+ "CONC_MIN_LIM_STAT_BASE"=> "The statistical base code for the concentration minimum limit.",
217
+ "CONC_UNIT_CODE"=> "Code representing the unit of measure applicable to concentration limits and measurements as entered by the user.",
218
+ "MODIF_NUM"=> "The modification number on the measurement/violation record that matches the corresponding parameter limit record.",
219
+ "NPDES"=> "A National Pollutant Discharge Elimination System (NPDES) code used to uniquely identify a permitted NPDES facility.",
220
+ "CONC_AVG_LIM_STAT_BASE"=> "The statistical base code for the concentration average limit.",
221
+ "STAT_LIM_AVG_OVERRIDE"=> "This field will override the concentration average field so that violation of the average field will be calculated as a percentage under the limit instead of a percentage over the limit. This applies to the concentration average field only.",
222
+ "REPORT_DESIG"=> "A one-character code used to designate a particular grouping of parameters for reporting purposes. Links a measurement/violation record to the related limit record.",
223
+ "LIMIT_TYPE"=> "The limit type of a Measurement/Violation record.",
224
+ "MONITORING_LOC"=> "The location where the measurement sample was taken.",
225
+ "SEASON_NUM"=> "The effluent season number of the measurement or violation.",
226
+ "CONC_AVG_LIMIT"=> "The numeric value of the concentration average, as limited in the permit, for the associated parameter, as entered by the user.",
227
+ "DISCHARGE_NUM"=> "A three-digit code assigned for each point of discharge. Links a measurement record to the related limit record.",
228
+ "CONC_MAX_LIM_STAT_BASE"=> "The statistical base code for the concentration maximum limit.",
229
+ "STAT_LIM_MIN_OVERRIDE"=> "This field will override the concentration minimum field so that viola tion of the minimum field will be calculated as a percentage under the limit instead of a percentage over the limit. This applies to the concentration minimum field only.",
230
+ "PARAM_CODE"=> "The parameter code of the measurement violation.",
231
+ "CONC_MAX_LIMIT"=> "The numeric value of the concentration average for the associated parameter, as entered by the user.",
232
+ "PIPE_SET_QUALIFIER"=> "A one-digit code used to provide unique linkage between Pipe Schedules, Parameter Limits, and Measurement/Violations."
233
+ },
234
+ "SINGLE_EVENT_VIOL"=> {
235
+ "NPDES"=> "A National Pollutant Discharge Elimination System (NPDES) code used to uniquely identify a permitted NPDES facility.",
236
+ "QNCR_RNC_RESOL_CODE"=> "Indicates type of resolution of non-compliance (RNC) for a particular single event violation.",
237
+ "QNCR_RNC_DET_DATE"=> "The actual detection date of reportable non-compliance (RNC) for a par ticular single event violation.",
238
+ "QNCR_RNC_DET_CODE"=> "Indicates type of reportable non-compliance (RNC) for a particular single event violation.",
239
+ "SINGLE_EVENT_VIOL_CODE"=> "Indicates the type of single event violation that has occurred.",
240
+ "QNCR_RNC_RESOL_DATE"=> "The actual resolution date of reportable non-compliance (RNC) for a particular single event violation.",
241
+ "SINGLE_EVENT_VIOL_DATE"=> "The date of the single event violation."
242
+ },
243
+ "SLUDGE"=> {
244
+ "HANDLER_STATE"=> "State of the primary commercial distributor/blender of sludge and/or sludge products.",
245
+ "SLUDGE_RELATED_PERMIT_NUM"=> "The associated Sludge/NPDES permit number for those facilities with different permits for their Sludge and Effluent discharges.",
246
+ "HANDLER_CITY"=> "City of the primary commercial distributor/blender of sludge and/or sludge products.",
247
+ "NPDES"=> "A National Pollutant Discharge Elimination System (NPDES) code used to uniquely identify a permitted NPDES facility.",
248
+ "SLUDGE_CLASS_FACILITY_IND"=> "The classification assigned to a facility according to CFR 122.2 Part 501.2. Any pretreatment POTW as well as any facility with known or expected sludge problems as determined by the permitting authority (incinerators primarily fall into this class).",
249
+ "SLUDGE_FACILITY_IND"=> "An indicator that identifies the type of sludge facility.",
250
+ "ANNUAL_DRY_SLUDGE_PROD"=> "The amount of sludge a facility produces in DMT/year on a dry weight basis.",
251
+ "SLUDGE_COMMERCIAL_HANDLER"=> "The facility name of primary commercial distributor/blender of sludge and/or sludge products.",
252
+ "HANDLER_STREET_2"=> "The second part of the street address of the primary commercial distributor/blender of sludge and/or sludge products.",
253
+ "HANDLER_STREET_1"=> "The first part of the street address of the primary commercial distributor/blender of sludge and/or sludge products.",
254
+ "HANDLER_ZIP_CODE"=> "Zip code of the primary commercial distributor/blender of sludge and/or sludge products."
255
+ },
256
+ "PIPE_SCHED"=> {
257
+ "INIT_STATE_SUBMISSION_DATE"=> "Date the first discharge monitoring report (or batch of reports) is due at the state office.",
258
+ "UNITS_IN_EPA_SUBM_PERIOD"=> "A two-digit number indicating the number of units, in months or days, in the submission period.",
259
+ "FINAL_LIMITS_START_DATE"=> "The date on which final limits begin for the discharge and report designator.",
260
+ "REPORTING_UNITS"=> "A one-character code used to designate that the reporting period is based on months ('M') or days ('D').",
261
+ "INIT_LIMITS_END_DATE"=> "The date on which initial limits ended for the discharge number and report designator.",
262
+ "INTERIM_LIMITS_START_DATE"=> "The date on which interim limits begin for the discharge number and report designator.",
263
+ "UNITS_IN_STATE_SUBM_PERIOD"=> "A two-digit number indicating the number of units, in months or days, in the submission period.",
264
+ "EPA_SUBMISSION_UNITS"=> "A one character code used to designate that the submission period for reports due at the EPA regional office is based on months ('M').",
265
+ "INIT_LIMITS_START_DATE"=> "The date on which initial limits began for the discharge number and report designator.",
266
+ "INTERIM_LIMITS_END_DATE"=> "The date on which interim limits end for the discharge number and report designator.",
267
+ "PIPE_INACTIVE_DATE"=> "The date on which the pipe became inactive.",
268
+ "FINAL_LIMITS_END_DATE"=> "The date on which final limits end for the discharge number and report designator; usually the same as the permit expiration date.",
269
+ "PIPE_SET_QUALIFIER"=> "A one-digit code used to provide unique linkage between Pipe Schedules, Parameter Limits, and Measurement/Violations.",
270
+ "PIPE_DESC"=> "The free-form description of a pipe (discharge/designator). This field appears on the preprinted Discharge Monitoring Report (DMR).",
271
+ "REPORT_DESIG"=> "A one-character code used to designate a particular grouping of parameters for reporting purposes. Links a measurement/violation record to the related limit record.",
272
+ "UNITS_IN_RPT_PERIOD"=> "A three-digit number indicating the number of units, in months or days, in the report period.",
273
+ "PIPE_INACTIVE_CODE"=> "Code specifying the active or inactive status of the pipe (discharge number and report designator).",
274
+ "INIT_EPA_SUBMISSION_DATE"=> "Date the first discharge monitoring report (or batch of reports) is due at the EPA regional office.",
275
+ "NPDES"=> "A National Pollutant Discharge Elimination System (NPDES) code used to uniquely identify a permitted NPDES facility.",
276
+ "STATE_SUBMISSION_UNITS"=> "A one-character code used to designate that the submission period for reports due at the state is based on months ('M').",
277
+ "DISCHARGE_NUM"=> "A three-digit code assigned for each point of discharge. Links a measurement record to the related limit record.",
278
+ "INIT_RPT_DATE"=> "The beginning date of the first reporting period. This is the date that collection of DMR information begins at the facility.",
279
+ "OUTFALL_TYPE_CODE"=> "The type of outfall (pipe) being tracked (e.g., Effluent, Sludge, Stormwater)."
280
+ },
281
+ "EVIDENTIARY_HEARING_EVENT"=> {
282
+ "EVENT_DATE"=> "Date corresponding to each evidentiary event.",
283
+ "EVENT_CODE"=> "Code identifying each evidentiary hearing event.",
284
+ "NPDES"=> "A National Pollutant Discharge Elimination System (NPDES) code used to uniquely identify a permitted NPDES facility."
285
+ },
286
+ "INDUSTRIAL_USER_INFO"=> {
287
+ "INSP_TYPE"=> "Identifies the type of inspection performed.",
288
+ "NPDES"=> "A National Pollutant Discharge Elimination System (NPDES) code used to uniquely identify a permitted NPDES facility.",
289
+ "CATEGORICAL_INDUSTRIAL_USERS"=> "A four digit field representing the number of categorical industrial u sers (CIUs) which discharge to a particular pretreatment control authority's treatment works (i.e., a POTW with an approved pre treatment program.) Categorical industrial users are those users in a particular industrial category (e.g., metal chemicals , etc.) for which pretreatment standards have been established or proposed. Industrial facilities in categories such as t extiles or plastics molding and forming for which specific effluent standards were apparently considered but never proposed or es tablished will not be included as categorical industrial users.",
290
+ "SIUS_WITHOUT_CTL_MECHANISM"=> "A three digit field representing the number of significant industrial users (SIUs) for which a current (unexpired) control mechanism (e.g., permit, sewer use ordinance, or formal contract), as defined in the 10/83 Guidance Manual for POTW Pretreatment Program Development, is required but not yet issued. Alth ough SIUs may be subject to a sewer user ordinance, there may still be a need for the control authority to issue certain S IUs individual control mechanisms to establish more specific pretreatment standards, reporting requirements, monitoring frequencies , etc. (Note=> The PCI supplies this information as a percentage of all SIUs; multiply the percentage by the total number of SIUs [data element SIUS] to determine the correct entry for the data element NOCM.)",
291
+ "SIUS_NOT_INSP_SAMPLED"=> "A three digit field representing the number of significant industrial users (SIUs) which were not inspected or sampled by the pretreatment control authority in the past year. (Note=> The PCI suppli es this information as a percentage of all SIUs; multiply the percentage by the total number of SIUs (contained in SIGNIFICANT_INDUSTRIAL_USERS) to determine the correct value for this field.",
292
+ "SIUS_IN_SNC_WITH_PRETR_STDS"=> "A three-digit field representing the number of significant industrial users (SIUs) in significant noncompliance (SNC) in the past year (as defined in the 7/86 Pretreatment Compliance Monitoring and Enforcement Guidance and possibly soon to be defined in regulation) with applicable pretreatment standards (categorical standards, local limits, and prohibited discharge standards) or reporting standards. Such significant noncompliance could be identified either through monotoring by the Control Authority or through IU self-monitoring. Until this appears in regulation (probably incorported into the definition of significant violation), POTWs may use their existing criteria for SNC although use of the aforementined definition in guidance is strongly encouraged. (ote=> The PCI supplies this information as percentage of all SIUs; mulitply the percentage by the total number of SIUs (contained in SIGNIFICANT_INDUSTRIAL_USERS) to determine the correct value for this field.)",
293
+ "SIGNIFICANT_INDUSTRIAL_USERS"=> "A four digit field representing the number of significant industrial users (SIUs) which discharge to a particular pretreatment control authority's treatment works (i.e., a POTW with an approved pretreatment program). Significant industrial users include all categorical industrial users and significant non-categorical industrial users. (Note=> Although SIU is defined in the 7/86 Pretreatment Compliance Monitoring and Enforcement Guidance and may be defined in regulation in the future, some POTWs still use a slightly different definition of SIU. At this time, report the number of identified SIUs subject to the POTW's definition of SIU.)",
294
+ "SIUS_SNC_SELF_MONITOR"=> "A three digit field representing the number of significant industrial users (SIUs) which were in significant noncompliance in the past year with applicable self-monitoring requirements either by faili ng to accurately report noncompliance or failure to provide self-monitoring data within 30 days of the due date. Until this defini tion of significant noncompliance (SNC) appears in regulation (probably incorporatedinto the definition of significant violation), POTWs may use their existing criteria for SNC although use of the aforementioned definition in guidance is strongly encouraged.",
295
+ "SIUS_SNC_SELF_NOT_INSP"=> "A three-digit field representing the number of significant industrial users (SIUS) in significant noncompliance (SNC) with self-monitoring requirements and which have not been inspected and/or sampled by the pretreatment control authority in the past year. This data element represents, in set terminology, the inter section of the data element SIUS_NOT_INSP_SAMPLED set and the data element SIUS_SNC_SELF_MONITOR set. (Note=> Correct entry of this data element requires matching of SIU names for two PCI questions or two audit questions to determine the number of SIUs meeting the above criteria).",
296
+ "INSP_DATE"=> "The date of the actual inspection."
297
+ },
298
+ "CMPL_SCHD"=> {
299
+ "CMPL_SCHD_EVT"=> "A five-digit code indicating the particular event that the permittee is scheduled to comply with.",
300
+ "NPDES"=> "A National Pollutant Discharge Elimination System (NPDES) code used to uniquely identify a permitted NPDES facility.",
301
+ "CMPL_SCHD_EVT_SCHD_DATE"=> "The date that the milestone is scheduled to be completed.",
302
+ "CMPL_RPT_RCVD_DATE"=> "The date when the regulatory agency received the compliance schedule report.",
303
+ "CMPL_SCHD_NUM"=> "A two-character alphanumeric value assignd to each compliance schedule to uniquely identify it from other schedules imposed on the same permittee.",
304
+ "CMPL_SCHD_EVT_ACTUAL_DATE"=> "The date when the facility achieved the scheduled milestone.",
305
+ "DOCKET_NUMBER"=> "The file number, usually a docket number, used by the regional/state o ffice for a formal enforcement action that established the compliance schedule.",
306
+ "CMPL_SCHD_DATA_SRC_CODE"=> "Serves to uniquely identify the compliance schedule event. It may be a four-digit number where the first two digits are 07 and the last two digits are the FIPS state numeric code indicating the organization and the authority responsible for imposing the schedule."
307
+ }
308
+ }
309
+
310
+ # Returns a list of valid tables or columns in a given table
311
+ # @param database [String] optional table to lookup
312
+ # @return {Array}
313
+ # @example
314
+ # catalog()
315
+
316
+ def catalog(database=nil)
317
+ if database.nil?
318
+ return @@lookup_table.keys
319
+ else
320
+ return @@lookup_table[database.upcase].keys
321
+ end
322
+
323
+ end
324
+
325
+ # Used to lookup data in the admin penalty order table
326
+ # @param params [Hash] The parameters for the lookup
327
+ # @param options [Hash] A customizable set of options.
328
+ # @return {Hash}
329
+ # @see http://iaspub.epa.gov/enviro/ef_metadata_html.ef_metadata_table?p_table_name=pcs_admin_penalty_order&p_topic=pcs
330
+ # @example
331
+ # admin_penalty_order({:column => "NPDES", :value => "AKG520535"})
332
+
333
+ def admin_penalty_order(params={}, options={})
334
+ if !params.has_key?(:column)
335
+ catalog("ADMIN_PENALTY_ORDER")
336
+ else
337
+ EPA.get("PCS_ADMIN_PENALTY_ORDER/#{params[:column]}/#{params[:value]}", options)
338
+ end
339
+ end
340
+
341
+ # Used to lookup data in the permit event table
342
+ # @param params [Hash] The parameters for the lookup
343
+ # @param options [Hash] A customizable set of options.
344
+ # @return {Hash}
345
+ # @see http://iaspub.epa.gov/enviro/ef_metadata_html.ef_metadata_table?p_table_name=pcs_permit_event&p_topic=pcs
346
+ # @example
347
+ # permit_event({:column => "NPDES", :value => "AKG520535"})
348
+
349
+ def permit_event(params={}, options={})
350
+ if !params.has_key?(:column)
351
+ catalog("PERMIT_EVENT")
352
+ else
353
+ EPA.get("pcs_permit_event/#{params[:column]}/#{params[:value]}", options)
354
+ end
355
+ end
356
+
357
+ # Used to lookup data in the pipe schedule lat long table
358
+ # @param params [Hash] The parameters for the lookup
359
+ # @param options [Hash] A customizable set of options.
360
+ # @return {Hash}
361
+ # @see http://iaspub.epa.gov/enviro/ef_metadata_html.ef_metadata_table?p_table_name=pcs_pipe_sched_lat_long&p_topic=pcs
362
+ # @example
363
+ # pipe_sched_lat_long({:column => "NPDES", :value => "AKG520535"})
364
+
365
+ def pipe_sched_lat_long(params={}, options={})
366
+ if !params.has_key?(:column)
367
+ catalog("PIPE_SCHED_LAT_LONG")
368
+ else
369
+ EPA.get("pcs_pipe_sched_lat_long/#{params[:column]}/#{params[:value]}", options)
370
+ end
371
+ end
372
+
373
+ # Used to lookup data in the dmr measurement table
374
+ # @param params [Hash] The parameters for the lookup
375
+ # @param options [Hash] A customizable set of options.
376
+ # @return {Hash}
377
+ # @see http://oaspub.epa.gov/enviro/ef_metadata_html.ef_metadata_table?p_table_name=PCS_DMR_MEASUREMENT&p_topic=PCS
378
+ # @example
379
+ # dmr_measurement({:column => "NPDES", :value => "AKG520535"})
380
+
381
+ def dmr_measurement(params={}, options={})
382
+ if !params.has_key?(:column)
383
+ catalog("DMR_MEASUREMENT")
384
+ else
385
+ EPA.get("pcs_dmr_measurement/#{params[:column]}/#{params[:value]}", options)
386
+ end
387
+ end
388
+
389
+ # Used to lookup data in the inspection table
390
+ # @param params [Hash] The parameters for the lookup
391
+ # @param options [Hash] A customizable set of options.
392
+ # @return {Hash}
393
+ # @see http://oaspub.epa.gov/enviro/ef_metadata_html.ef_metadata_table?p_table_name=PCS_INSPECTION&p_topic=PCS
394
+ # @example
395
+ # inspection({:column => "NPDES", :value => "AKG520535"})
396
+
397
+ def inspection(params={}, options={})
398
+ if !params.has_key?(:column)
399
+ catalog("INSPECTION")
400
+ else
401
+ EPA.get("pcs_inspection/#{params[:column]}/#{params[:value]}", options)
402
+ end
403
+ end
404
+
405
+ # Used to lookup data in the enforcement action table
406
+ # @param params [Hash] The parameters for the lookup
407
+ # @param options [Hash] A customizable set of options.
408
+ # @return {Hash}
409
+ # @see http://oaspub.epa.gov/enviro/ef_metadata_html.ef_metadata_table?p_table_name=PCS_ENFOR_ACTION&p_topic=PCS
410
+ # @example
411
+ # enfor_action({:column => "NPDES", :value => "AKG520535"})
412
+
413
+ def enfor_action(params={}, options={})
414
+ if !params.has_key?(:column)
415
+ catalog("ENFOR_ACTION")
416
+ else
417
+ EPA.get("pcs_enfor_action/#{params[:column]}/#{params[:value]}", options)
418
+ end
419
+ end
420
+
421
+ # Used to lookup data in the permit facility table
422
+ # @param params [Hash] The parameters for the lookup
423
+ # @param options [Hash] A customizable set of options.
424
+ # @return {Hash}
425
+ # @see http://oaspub.epa.gov/enviro/ef_metadata_html.ef_metadata_table?p_table_name=PCS_PERMIT_FACILITY&p_topic=PCS
426
+ # @example
427
+ # permit_facility({:column => "NPDES", :value => "AKG520535"})
428
+
429
+ def permit_facility(params={}, options={})
430
+ if !params.has_key?(:column)
431
+ catalog("PERMIT_FACILITY")
432
+ else
433
+ EPA.get("pcs_permit_facility/#{params[:column]}/#{params[:value]}", options)
434
+ end
435
+ end
436
+
437
+ # Used to lookup data in the pci audit table
438
+ # @param params [Hash] The parameters for the lookup
439
+ # @param options [Hash] A customizable set of options.
440
+ # @return {Hash}
441
+ # @see http://oaspub.epa.gov/enviro/ef_metadata_html.ef_metadata_table?p_table_name=PCS_PCI_AUDIT&p_topic=PCS
442
+ # @example
443
+ # pci_audit({:column => "NPDES", :value => "AKG520535"})
444
+
445
+ def pci_audit(params={}, options={})
446
+ if !params.has_key?(:column)
447
+ catalog("PCI_AUDIT")
448
+ else
449
+ EPA.get("pcs_pci_audit/#{params[:column]}/#{params[:value]}", options)
450
+ end
451
+ end
452
+
453
+ # Used to lookup data in the effl lim qty table
454
+ # @param params [Hash] The parameters for the lookup
455
+ # @param options [Hash] A customizable set of options.
456
+ # @return {Hash}
457
+ # @see http://oaspub.epa.gov/enviro/ef_metadata_html.ef_metadata_table?p_table_name=PCS_EFFL_LIM_QTY&p_topic=PCS
458
+ # @example
459
+ # effl_lim_qty({:column => "NPDES", :value => "AKG520535"})
460
+
461
+ def effl_lim_qty(params={}, options={})
462
+ if !params.has_key?(:column)
463
+ catalog("EFFL_LIM_QTY")
464
+ else
465
+ EPA.get("pcs_effl_lim_qty/#{params[:column]}/#{params[:value]}", options)
466
+ end
467
+ end
468
+
469
+ # Used to lookup data in the cmpl schd viol table
470
+ # @param params [Hash] The parameters for the lookup
471
+ # @param options [Hash] A customizable set of options.
472
+ # @return {Hash}
473
+ # @see http://oaspub.epa.gov/enviro/ef_metadata_html.ef_metadata_table?p_table_name=PCS_CMPL_SCHD_VIOL&p_topic=PCS
474
+ # @example
475
+ # cmpl_schd_viol({:column => "NPDES", :value => "AKG520535"})
476
+
477
+ def cmpl_schd_viol(params={}, options={})
478
+ if !params.has_key?(:column)
479
+ catalog("CMPL_SCHD_VIOL")
480
+ else
481
+ EPA.get("pcs_cmpl_schd_viol/#{params[:column]}/#{params[:value]}", options)
482
+ end
483
+ end
484
+
485
+ # Used to lookup data in the pretreatment perf summary table
486
+ # @param params [Hash] The parameters for the lookup
487
+ # @param options [Hash] A customizable set of options.
488
+ # @return {Hash}
489
+ # @see http://oaspub.epa.gov/enviro/ef_metadata_html.ef_metadata_table?p_table_name=PCS_PRETREATMENT_PERF_SUMMARY&p_topic=PCS
490
+ # @example
491
+ # pretreatment_perf_summary({:column => "NPDES", :value => "AKG520535"})
492
+
493
+ def pretreatment_perf_summary(params={}, options={})
494
+ if !params.has_key?(:column)
495
+ catalog("PRETREATMENT_PREF_SUMMARY")
496
+ else
497
+ EPA.get("pcs_pretreatment_perf_summary/#{params[:column]}/#{params[:value]}", options)
498
+ end
499
+ end
500
+
501
+ # Used to lookup data in the code description table
502
+ # @param params [Hash] The parameters for the lookup
503
+ # @param options [Hash] A customizable set of options.
504
+ # @return {Hash}
505
+ # @see http://iaspub.epa.gov/enviro/ef_metadata_html.ef_metadata_table?p_table_name=pcs_code_desc&p_topic=pcs
506
+ # @example
507
+ # code_desc({:column => "CODE", :value => "110"})
508
+
509
+ def code_desc(params={}, options={})
510
+ if !params.has_key?(:column)
511
+ catalog("CODE_DESC")
512
+ else
513
+ EPA.get("pcs_code_desc/#{params[:column]}/#{params[:value]}", options)
514
+ end
515
+ end
516
+
517
+ # Used to lookup data in the effl lim table
518
+ # @param params [Hash] The parameters for the lookup
519
+ # @param options [Hash] A customizable set of options.
520
+ # @return {Hash}
521
+ # @see http://oaspub.epa.gov/enviro/ef_metadata_html.ef_metadata_table?p_table_name=PCS_EFFL_LIM&p_topic=PCS
522
+ # @example
523
+ # effl_lim({:column => "NPDES", :value => "AKG520535"})
524
+
525
+ def effl_lim(params={}, options={})
526
+ if !params.has_key?(:column)
527
+ catalog("EFFL_LIM")
528
+ else
529
+ EPA.get("pcs_effl_lim/#{params[:column]}/#{params[:value]}", options)
530
+ end
531
+ end
532
+
533
+ # Used to lookup data in the effl lim concentr table
534
+ # @param params [Hash] The parameters for the lookup
535
+ # @param options [Hash] A customizable set of options.
536
+ # @return {Hash}
537
+ # @see http://oaspub.epa.gov/enviro/ef_metadata_html.ef_metadata_table?p_table_name=PCS_EFFL_LIM_CONCENTR&p_topic=PCS
538
+ # @example
539
+ # effl_lim_concentr({:column => "NPDES", :value => "AKG520535"})
540
+
541
+ def effl_lim_concentr(params={}, options={})
542
+ if !params.has_key?(:column)
543
+ catalog("EFFL_LIM_CONCENTR")
544
+ else
545
+ EPA.get("pcs_effl_lim_concentr/#{params[:column]}/#{params[:value]}", options)
546
+ end
547
+ end
548
+
549
+ # Used to lookup data in the single event violation table
550
+ # @param params [Hash] The parameters for the lookup
551
+ # @param options [Hash] A customizable set of options.
552
+ # @return {Hash}
553
+ # @see http://oaspub.epa.gov/enviro/ef_metadata_html.ef_metadata_table?p_table_name=PCS_SINGLE_EVENT_VIOL&p_topic=PCS
554
+ # @example
555
+ # single_event_viol({:column => "NPDES", :value => "AKG520535"})
556
+
557
+ def single_event_viol(params={}, options={})
558
+ if !params.has_key?(:column)
559
+ catalog("SINGLE_EVENT_VIOL")
560
+ else
561
+ EPA.get("pcs_single_event_viol/#{params[:column]}/#{params[:value]}", options)
562
+ end
563
+ end
564
+
565
+ # Used to lookup data in the sludge table
566
+ # @param params [Hash] The parameters for the lookup
567
+ # @param options [Hash] A customizable set of options.
568
+ # @return {Hash}
569
+ # @see http://oaspub.epa.gov/enviro/ef_metadata_html.ef_metadata_table?p_table_name=PCS_SLUDGE&p_topic=PCS
570
+ # @example
571
+ # sludge({:column => "NPDES", :value => "AKG520535"})
572
+
573
+ def sludge(params={}, options={})
574
+ if !params.has_key?(:column)
575
+ catalog("SLUDGE")
576
+ else
577
+ EPA.get("pcs_sludge/#{params[:column]}/#{params[:value]}", options)
578
+ end
579
+ end
580
+
581
+ # Used to lookup data in the pipe schedul table
582
+ # @param params [Hash] The parameters for the lookup
583
+ # @param options [Hash] A customizable set of options.
584
+ # @return {Hash}
585
+ # @see http://oaspub.epa.gov/enviro/ef_metadata_html.ef_metadata_table?p_table_name=PCS_PIPE_SCHED&p_topic=PCS
586
+ # @example
587
+ # pipe_sched({:column => "NPDES", :value => "AKG520535"})
588
+
589
+ def pipe_sched(params={}, options={})
590
+ if !params.has_key?(:column)
591
+ catalog("PIPE_SCHED")
592
+ else
593
+ EPA.get("pcs_pipe_sched/#{params[:column]}/#{params[:value]}", options)
594
+ end
595
+ end
596
+
597
+ # Used to lookup data in the evidentiary hearing event table
598
+ # @param params [Hash] The parameters for the lookup
599
+ # @param options [Hash] A customizable set of options.
600
+ # @return {Hash}
601
+ # @see http://oaspub.epa.gov/enviro/ef_metadata_html.ef_metadata_table?p_table_name=PCS_EVIDENTIARY_HEARING_EVENT&p_topic=PCS
602
+ # @example
603
+ # evidentiary_hearing_event({:column => "NPDES", :value => "AKG520535"})
604
+
605
+ def evidentiary_hearing_event(params={}, options={})
606
+ if !params.has_key?(:column)
607
+ catalog("EVIDENTIARY_HEARING_EVENT")
608
+ else
609
+ EPA.get("pcs_evidentiary_hearing_event/#{params[:column]}/#{params[:value]}", options)
610
+ end
611
+ end
612
+
613
+ # Used to lookup data in the industrial user info table
614
+ # @param params [Hash] The parameters for the lookup
615
+ # @param options [Hash] A customizable set of options.
616
+ # @return {Hash}
617
+ # @see http://oaspub.epa.gov/enviro/ef_metadata_html.ef_metadata_table?p_table_name=PCS_INDUSTRIAL_USER_INFO&p_topic=PCS
618
+ # @example
619
+ # industrial_user_info({:column => "NPDES", :value => "AKG520535"})
620
+
621
+ def industrial_user_info(params={}, options={})
622
+ if !params.has_key?(:column)
623
+ catalog("INDUSTRIAL_USER_INFO")
624
+ else
625
+ EPA.get("pcs_industrial_user_info/#{params[:column]}/#{params[:value]}", options)
626
+ end
627
+ end
628
+
629
+ # Used to lookup data in the cmpl schd table
630
+ # @param params [Hash] The parameters for the lookup
631
+ # @param options [Hash] A customizable set of options.
632
+ # @return {Hash}
633
+ # @see http://oaspub.epa.gov/enviro/ef_metadata_html.ef_metadata_table?p_table_name=PCS_CMPL_SCHD&p_topic=PCS
634
+ # @example
635
+ # cmpl_schd({:column => "NPDES", :value => "AKG520535"})
636
+
637
+ def cmpl_schd(params={}, options={})
638
+ if !params.has_key?(:column)
639
+ catalog("CMPL_SCHD")
640
+ else
641
+ EPA.get("pcs_cmpl_schd/#{params[:column]}/#{params[:value]}", options)
642
+ end
643
+ end
644
+
645
+ end
646
+ end
647
+ end