agrc / ugs-db

Database seeder for UGS data
2 stars 1 forks source link

Populate `SampMedia` in `Results` for `SDWIS` Data #54

Closed inkenbrandt closed 8 years ago

inkenbrandt commented 8 years ago

The field SampMedia is used to describe the type of water that was sampled. In the WQP database, if the water came from a stream, then the value in the SampMedia field is Surface Water. Likewise, if the sample was collected from a spring or well, then the SampMedia = Groundwater. It is important to be able to distinguish if a sample is from groundwater or surface water.

SDWIS has the UTV80.TINWSF.TYPE_CODE field, which can be used to populate SampleMedia. This related to the Pull request: Remapped UTV80.TINWSF.TYPE_CODE to SampMedia #53.

Once the values from SDWIS are mapped into SampMedia, they can be nomalized to match the values from WQP with the following dictionary:

samp_media = { 'WL':'Groundwater', 'SP':'Groundwater', 'SS':'Surface Water', 'IN': 'Surface Water' }