In [1]:
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.dates as dates
import matplotlib.ticker as tick
from datetime import datetime
from pylab import rcParams
from scipy.stats import linregress
%matplotlib inline
rcParams['figure.figsize'] = 15, 10
In [7]:
EPA = "C:\\PROJECTS\\EPA EN\\Data\\PII_20150611_100121\\Data_PII_20150611_100121_RegResults.txt"
In [41]:
results = pd.read_table(EPA,low_memory=False)
In [ ]:
pd.read
In [42]:
list(results.columns)
Out[42]:
['Org Name',
'Station ID',
'State',
'County',
'HUC',
'Generated HUC',
'Station Latitude',
'Station Longitude',
'Station Horizontal Datum',
'Visit Num',
'Activity ID',
'Activity Start',
'Activity Start Zone',
'Activity Medium',
'Activity Type',
'Activity Category-Rep Num',
'Activity Depth',
'Activity Depth Unit',
'Characteristic Name',
'Sample Fraction',
'Value Type',
'Statistic Type',
'Result Value as Text',
'Result Value Status',
'Units',
'Analytical Proc ID',
'Sample Prep End Date',
'Sample Prep End Date Zone']
In [43]:
results.Units = results.Units.apply(lambda x: str(x).strip(),1)
results['Characteristic Name'] = results['Characteristic Name'].apply(lambda x: str(x).strip(),1)
In [64]:
unitList = list(results.Units.unique())
paramList = sorted(list(results['Characteristic Name'].unique()))
In [65]:
print paramList
['.alpha.-Endosulfan', '.alpha.-Hexachlorocyclohexane', '.beta.-Endosulfan', '.beta.-Hexachlorocyclohexane', '.delta.-Hexachlorocyclohexane', '1,1,1,2-Tetrachloroethane', '1,1,1-Trichloroethane', '1,1,2,2-Tetrachloroethane', '1,1,2-Trichloroethane', '1,1-Dichloroethane', '1,1-Dichloroethylene', '1,1-Dichloropropene', '1,2,3-Trichlorobenzene', '1,2,3-Trichloropropane', '1,2,4-Trichlorobenzene', '1,2,4-Trimethylbenzene', '1,2-Dibromo-3-chloropropane', '1,2-Dibromo-3-chloropropane (DBCP)', '1,2-Dichlorobenzene', '1,2-Dichloroethane', '1,2-Dichloropropane', '1,3,5-Trimethylbenzene', '1,3-Dichlorobenzene', '1,3-Dichloropropane', '1,4-Dichlorobenzene', '2,2,4,5,6,7,8,8-Octachloro-2,3,3a,4,7,7a-hexahydro-4,7-methano-1H-indene', '2,2-Dichloropropane', '2,3,4-Trichlorobiphenyl', '2,4,5-T', '2,4,5-T, Trichlorophenoxyacetic acid', '2,4,5-Trichlorophenol', '2,4,6-Trichlorophenol', '2,4,6-Trichlorophenol (TCPh)', '2,4-D', '2,4-D, Dichlorophenoxyacetic acid', '2,4-Dichlorophenol', '2,4-Dimethylphenol', '2,4-Dinitrophenol', '2,4-Dinitrotoluene', '2,6-Dinitrotoluene', '2-Chloroethyl vinyl ether', '2-Chloronaphthalene', '2-Hexanone', '2-Methylnaphthalene', "3,3',4,4',5,5'-Hexachlorobiphenyl", "3,3'-Dichlorobenzidine", '3-Hydroxycarbofuran', '4,6-Dinitro-o-cresol', 'Acenaphthene', 'Acenaphthylene', 'Acetaldehyde', 'Acetochlor', 'Acetone', 'Acrolein', 'Acrylonitrile', 'Alachlor', 'Aldicarb', 'Aldicarb sulfone', 'Aldicarb sulfoxide', 'Aldrin', 'Alkalinity, Carbonate as CaCO3', 'Alkalinity, total', 'Alpha particle', 'Aluminum', 'Ammonia-nitrogen as N', 'Ammonium', 'Aniline', 'Anion deficit', 'Anthracene', 'Antimony', 'Aroclor 1016', 'Aroclor 1221', 'Aroclor 1232', 'Aroclor 1242', 'Aroclor 1248', 'Aroclor 1254', 'Aroclor 1260', 'Aroclor 1262', 'Arsenic', 'Atrazine', 'Azobenzene', 'BHC-alpha **retired** .alpha.-Hexachlorocyclohexane', 'BHC-beta', 'BHC-delta', 'BHC-gamma (Lindane) **retired** Lindane', 'Barium', 'Benz[a]anthracene', 'Benzene', 'Benzidine', 'Benzo(b)fluoranthene', 'Benzo[a]pyrene', 'Benzo[ghi]perylene', 'Benzo[k]fluoranthene', 'Benzoic acid', 'Benzyl alcohol', 'Beryllium', 'Beta particle', 'Bicarbonate', 'Biochemical oxygen demand, standard conditions', 'Biomass, periphyton', 'Bis(2-chloro-1-methylethyl) ether', 'Bis(2-chloroethoxy)methane', 'Bis(2-chloroethyl) ether', 'Boron', 'Bromacil', 'Bromide', 'Bromoacetic acid', 'Bromoacetic acid (MBAA)', 'Bromobenzene', 'Bromochloroacetic acid', 'Bromochloroacetic acid (BCAA)', 'Bromoform **retired** Tribromomethane', 'Bromophenyl-4 phenyl ether', 'Butachlor', 'Butyl benzene', 'Butyl benzyl phthalate', 'Butylbenzene, sec-', 'Butylbenzene, tert-', 'C1-C3 Fluorenes', 'C1-C4 Chrysenes', 'C1-C4 Fluoranthenes', 'C1-C4 Phenanthrenes', 'CFC-11', 'CFC-113', 'CFC-12', 'COD, Chemical Oxygen Demand', 'Cadmium', 'Calcium', 'Calcium carbonate as CaCO3', 'Carbaryl', 'Carbazole', 'Carbofuran', 'Carbon', 'Carbon dioxide', 'Carbon disulfide', 'Carbon tetrachloride', 'Carbon, Total Organic (Toc)', 'Carbonaceous biochemical oxygen demand, standard conditions', 'Carbonate', 'Chemical oxygen demand', 'Chlordane', 'Chlordane, cis', 'Chlordane, gamma', 'Chloride', 'Chlorine', 'Chloroacetic acid', 'Chloroacetic acid (MCAA)', 'Chloroaniline, 4-', 'Chlorobenzene', 'Chlorodibromomethane', 'Chloroethane', 'Chloroform', 'Chloromethane', 'Chloronaphthalene-2', 'Chlorophenol-2', 'Chlorophyll a', 'Chlorophyll a, uncorrected for pheophytin', 'Chlorotoluene, 2-', 'Chlorotoluene, 4-', 'Chromium', 'Chrysenes C1-C4', 'Cobalt', 'Color, True', 'Conductivity', 'Copper', 'Cresol', 'Cresol, m-', 'Cresol, o-', 'Cresol, p-', 'Cumene', 'Cyanazine', 'Cyanide', 'Cyanides Amenable to Chlorination', 'Cyanides amenable to chlorination (HCN & CN)', 'Cyclohexane', 'Cymene', 'Cymene ***retired***(use p-Cymene)', "DDD ***retired*** (use DDD, p,p')", "DDE ***retired*** (use DDE, p,p'-)", "DDT ***retired*** (use DDT, p,p'-)", 'DNBP, 4,6-Dinitro-2-sec-butylphenol **retired**(use Dinoseb)', 'Dalapon', 'Depth', 'Depth, Secchi disk depth', 'Depth, data-logger (ported)', 'Di(2-ethylhexyl) adipate', 'Di(2-ethylhexyl) phthalate', 'Di-n-octyl phthalate', 'Dibenz[a,h]anthracene', 'Dibenzo[a,h]anthracene', 'Dibenzofuran', 'Dibromoacetic acid', 'Dibromoacetic acid (DBAA)', 'Dibromomethane', 'Dibutyl phthalate', 'Dicamba', 'Dichloroacetic acid', 'Dichloroacetic acid (DCAA)', "Dichlorobenzidine, 3,3'-", 'Dichlorobiphenyl', 'Dichlorobromomethane', "Dichlorodiisopropyl ether, 2,2'-", 'Dichloroethane, 1,1-', 'Dichloroethane, 1,2-', 'Dichloroethylene, cis-1,2- ***retired***(use CIS-1,2-DICHLO)', 'Dichloropropane, 1,2-', 'Dichloropropane, 1,3-', 'Dichloropropane, 2,2-', 'Dichloropropene, 1,1-', 'Dichloropropionic acid, 2,2- ***retired*** (use Dalapon)', 'Dichlorprop', 'Dieldrin', 'Diesel fuel', 'Diesel range organics', 'Diethyl phthalate', 'Dimethyl phthalate', 'Dinitrophenol, 2,4-', 'Dinoseb', 'Dissolved oxygen (DO)', 'Dissolved oxygen saturation', 'EPTC, Dipropylthiocarbamic acid s-ethyl ester', 'Endosulfan sulfate', 'Endosulfan, alpha-', 'Endosulfan, beta-', 'Endrin', 'Endrin aldehyde', 'Escherichia', 'Ethylbenzene', 'Ethylene dibromide', 'Ethylene dibromide (EDB)', 'Ethylene glycol', 'Fecal Coliform', 'Fecal Streptococcus Group Bacteria', 'Flow', 'Fluoranthenes, C1-C4', 'Fluorenes, C1-C3', 'Fluoride', 'Gasoline', 'Gasoline range organics', 'Gran acid neutralizing capacity', 'Gross alpha radioactivity, (Thorium-230 ref std)', 'Gross beta radioactivity, (Cesium-137 ref std)', 'Halon 1011', 'Hardness, Ca + Mg', 'Hardness, Ca, Mg', 'Heptachlor', 'Heptachlor epoxide', 'Heptachlorobiphenyl', 'Hexachlorobenzene', 'Hexachlorobiphenyl', 'Hexachlorobutadiene', 'Hexachlorocyclopentadiene', 'Hexachloroethane', 'Hexanone, 2-', 'Hydrocarbons', 'Hydrocarbons, Petroleum (Unspecified Mix)', 'Hydrocarbons, Volatile Petroleum (VPH)', 'Hydrocarbons, petroleum', 'Hydrogen', 'Hydroxide', 'Hydroxycarbofuran, 3-', 'Indeno[1,2,3-cd]pyrene', 'Inorganic carbon', 'Inorganic nitrogen (nitrate and nitrite) as N', 'Ionic strength', 'Iron', 'Isophorone', 'Kjeldahl nitrogen', 'Lead', 'Lindane', 'MTBE, Methyl tertiary butyl ether', 'Magnesium', 'Manganese', 'Mercury', 'Methomyl', 'Methoxychlor', 'Methyl acetate', 'Methyl bromide', 'Methyl cyclohexane', 'Methyl ethyl ketone', 'Methyl isobutyl ketone', 'Methyl tert-butyl ether', 'Methylene chloride', 'Metolachlor', 'Metribuzin', 'Molinate', 'Molybdenum', 'N-Nitrosodi-n-propylamine', 'N-Nitrosodimethylamine', 'N-Nitrosodiphenylamine', 'Naphthalene', 'Nickel', 'Nitrate', 'Nitrate as N', 'Nitrite as N', 'Nitroaniline, 2-', 'Nitrobenzene', 'Nitrogen', 'Nitrophenol, 2-', 'Nitrosodimethylamine, n-', 'Nonachlor, trans-', 'Octachlorobiphenyl', 'Odor threshold number', 'Odor, Threshold Number', 'Oil and Grease', 'Organic Nitrogen', 'Organic anions', 'Organic carbon', 'Oxamyl', 'Pcb-169', 'Pcb-aroclor 1016', 'Pcb-aroclor 1221', 'Pcb-aroclor 1232', 'Pcb-aroclor 1242', 'Pcb-aroclor 1248', 'Pcb-aroclor 1254', 'Pcb-aroclor 1260', 'Pcb-aroclor 1262', 'Pentachlorobiphenyl', 'Pentachlorophenol', 'Pentachlorophenol (PCP)', 'Phenanthrenes, C1-C4', 'Phenol', 'Phosphate-phosphorus as P', 'Phosphorus', 'Picloram', 'Population diversity, phytoplankton, # of species', 'Potassium', 'Prometon', 'Propachlor', 'Propylbenzene, n-', 'Propylene glycol allyl ether', 'Pyrene', 'RBP2, High G, Bank Stability, Left Bank', 'RBP2, High G, Bank Stability, Right Bank', 'RBP2, High G, Channel Alteration', 'RBP2, High G, Channel Flow Status', 'RBP2, High G, Embeddedness', 'RBP2, High G, Epifaunal Substrate/Available Cover', 'RBP2, High G, Frequency of Riffles (or bends)', 'RBP2, High G, Riparian Vegetative Zone Width, LB', 'RBP2, High G, Riparian Vegetative Zone Width, RB', 'RBP2, High G, Sediment Deposition', 'RBP2, High G, Vegetative Protection, Left Bank', 'RBP2, High G, Vegetative Protection, Right Bank', 'RBP2, High G, Velocity/Depth Regime', 'RBP2, Low G, Bank Stability, Left Bank', 'RBP2, Low G, Bank Stability, Right Bank', 'RBP2, Low G, Channel Alteration', 'RBP2, Low G, Channel Flow Status', 'RBP2, Low G, Channel Sinuosity', 'RBP2, Low G, Epifaunal Substrate/Available Cover', 'RBP2, Low G, Pool Substrate Characterization', 'RBP2, Low G, Pool Variability', 'RBP2, Low G, Riparian Vegetative Zone Width, Left Bank', 'RBP2, Low G, Riparian Vegetative Zone Width, Right Bank', 'RBP2, Low G, Sediment Deposition', 'RBP2, Low G, Vegetative Protection, Left Bank', 'RBP2, Low G, Vegetative Protection, Right Bank', 'RBP2, Low G, habitat assessment total score', 'Radium-228', 'S-Ethyl dipropylthiocarbamate', 'Salinity', 'Selenium', 'Silica', 'Silver', 'Silvex', 'Simazine', 'Sodium', 'Solids, Dissolved', 'Solids, Fixed', 'Solids, Total Suspended (TSS)', 'Solids, Volatile', 'Specific conductance', 'Styrene', 'Sulfate', 'Sulfate as S', 'Sulfate as SO4', 'Sulfide', 'Sulfur, sulfate (SO4) as SO4', 'Sum of anions', 'Sum of cations', 'Taxonomic Diversity, Shannon-Weaver Index', 'Taxonomic Evenness', 'Taxonomic Richness', 'Temperature, sample', 'Temperature, water', 'Terbacil', 'Tetrachlorobiphenyl', 'Tetrachloroethane, 1,1,1,2-', 'Tetrachloroethane, 1,1,2,2-', 'Tetrachloroethylene', 'Thallium', 'Toluene', 'Total Coliform', 'Total dissolved solids', 'Total fixed solids', 'Total suspended solids', 'Total volatile solids', 'Toxaphene', 'Tribromomethane', 'Trichloroacetic acid', 'Trichloroacetic acid (TCAA)', 'Trichlorobenzene, 1,2,3-', 'Trichlorobiphenyl', 'Trichloroethane, 1,1,1-', 'Trichloroethane, 1,1,2-', 'Trichloroethylene', 'Trichlorophenol, 2,4,5-', 'Trichloropropane, 1,2,3-', 'Trichlorotrifluoroethane', 'Trifluralin', 'Trihalomethanes', 'Trihalomethanes (unspecified mix)', 'Trimethylbenzene, 1,2,4-', 'Trimethylbenzene, 1,3,5-', 'True color', 'Turbidity', 'Uranium-238', 'Vanadium', 'Velocity - stream', 'Vinyl acetate', 'Vinyl chloride', 'Xylene', 'Xylene, o-', 'Xylenes mix of m + o + p', 'Xylenes, m- & p- Mix', 'Zinc', 'bis(2-chloroethoxy) methane', 'bis(2-ethylhexyl) phthalate (DEHP)', 'bis(n-octyl) Phthalate', 'cis-1,2-Dichloroethylene', 'cis-1,3-Dichloropropene', 'cis-Chlordane', 'm-Cresol', 'm-Dichlorobenzene', 'm-Nitroaniline', 'meta & para Xylene mix', 'n-Butylbenzene', 'n-Nitrosodipropylamine', 'n-Propylbenzene', 'nitro-Benzene', 'o-Chlorophenol', 'o-Chlorotoluene', 'o-Cresol', 'o-Dichlorobenzene', 'o-Nitroaniline', 'o-Nitrophenol', 'o-Xylene', "p,p'-DDD", "p,p'-DDE", "p,p'-DDT", 'p-Bromophenyl phenyl ether', 'p-Chloro-m-cresol', 'p-Chloroaniline', 'p-Chlorophenyl phenyl ether', 'p-Chlorotoluene', 'p-Cresol', 'p-Dichlorobenzene', 'p-Nitroaniline', 'p-Nitrophenol', 'pH', 'sec-Butylbenzene', 'tert-Butylbenzene', 'trans-1,2-Dichloroethylene', 'trans-1,3-Dichloropropene', 'trans-Nonachlor']
In [39]:
unitList
Out[39]:
['nan',
'mg/l',
'ug/l',
'#/100ml',
'deg C',
'None',
'uS/cm',
'ueq/L',
'PCU',
'umho/cm',
'NTU',
'cfs',
'ft/sec',
'ppth',
'%',
'mgd',
'g/min',
'gal/min',
'mg',
'm',
'ppt',
'mg/kg',
'ug/kg',
'mg/m2',
'g/m2',
'count',
'pCi/L']
Content source: inkenbrandt/ArcPy
Similar notebooks: