Skip to content
Snippets Groups Projects
Commit ad6bf4d3 authored by Yan, Andrew N.'s avatar Yan, Andrew N.
Browse files

clean-up

parent ea2646d5
No related branches found
No related tags found
No related merge requests found
......@@ -40,7 +40,6 @@ DATA_DIR = os.path.join(os.path.dirname(__file__), 'data')
NWIS_CODE_LOOKUP_FILENAME = 'nwis_lookup.json'
COUNTRY_STATE_COUNTY_LOOKUP_FILENAME = 'nwis_country_state_lookup.json'
HUC_LOOKUP_FILENAME = 'huc_lookup.json'
METADATA_DESC_FILENAME = 'metadata_field_desc_lookup.json'
GA_TRACKING_CODE = ''
ENABLE_USGS_GA = False
......
{
"agency_cd": "The agency that is reporting the data.",
"alt_acy_va": "Altitude accuracy is mandatory when altitude is entered. Enter the accuracy of the altitude in terms of the possible error in feet.",
"alt_datum_cd": "Altitude of the site referenced to the specified Vertical Datum.",
"alt_meth_cd": null,
"alt_va": null,
"aqfr_cd": null,
"aqfr_type_cd": "Describes the type of aquifer(s) encountered by a site type of well (groundwater).",
"basin_cd": "The Basin Code or \"drainage basin code\" is a two-digit code that further subdivides the 8-digit hydrologic-unit code.",
"construction_dt": "Date the well was completed",
"contrib_drain_area_va": null,
"coord_acy_cd": "Indicates the accuracy of the latitude longitude values.",
"coord_datum_cd": "Latitude/longitude (horizontal) coordinate datum.",
"coord_meth_cd": "Indicates the method used to determine latitude longitude values.",
"country_cd": null,
"county_cd": "The name of the county or county equivalent (parish, borough, etc.) in which the site is located.",
"dec_coord_datum_cd": null,
"dec_lat_va": null,
"dec_long_va": null,
"depth_src_cd": null,
"district_cd": "The Water Science Centers (WSCs) across the United States use the FIPS state code as the district code. In some case, sites and samples may be managed by a water science center that is adjacent to the state in which the site actually resides.",
"drain_area_va": "The area enclosed by a topographic divide from which direct surface runoff from precipitation normally drains by gravity into the stream above that point.",
"gw_file_cd": null,
"hole_depth_va": "The total depth to which the hole is drilled, in feet below land surface datum.",
"huc_cd": "Hydrologic units are geographic areas representing part or all of a surface drainage basin or distinct hydrologic feature and are delineated on the State Hydrologic Unit Maps.",
"instruments_cd": null,
"inventory_dt": null,
"land_net_ds": null,
"lat_va": null,
"local_time_fg": "Y for yes or an N for no to indicate whether the site is in an area that switches to Local Standard Time (Daylight Savings Time) for a part of the year.",
"long_va": null,
"map_nm": null,
"map_scale_fc": null,
"nat_aqfr_cd": null,
"project_no": null,
"reliability_cd": "Data reliability code is mandatory for spring, groundwater, and aggregate groundwater sites.",
"site_no": "Each site in the USGS data base has a unique 8- to 15-digit identification number.",
"site_tp_cd": "A list of primary and secondary site types that can be associated with data collection sites. A site type is a generalized location in the hydrologic cycle, or a man-made feature thought to affect the hydrologic conditions measured at a site. All sites are associated with a primary site type, and may additionally be associated with a secondary site type that further describes the location. The exception to this rule is the Facility primary site type, which must always be associated with a secondary site type. The site type code incorporates these hierarchial distinctions.",
"state_cd": "The name of the state or territory in which the site is located.",
"station_nm": "This is the official name of the site in the database. For well information this can be a district-assigned local number.",
"topo_cd": "Refers to the geomorphic features in the vicinity of the site.",
"tz_cd": null,
"well_depth_va": null
}
\ No newline at end of file
......@@ -55,10 +55,6 @@ with open(os.path.join(app.config.get('DATA_DIR'),
app.config.get('HUC_LOOKUP_FILENAME')), 'r') as f:
app.config['HUC_LOOKUP'] = json.loads(f.read())
with open(os.path.join(app.config.get('DATA_DIR'),
app.config.get('METADATA_DESC_FILENAME')), 'r') as f:
app.config['METADATA_DESC_LOOKUP'] = json.loads(f.read())
# Load static assets manifest file, which maps source file names to the
# corresponding versioned/hashed file name.
manifest_path = app.config.get('ASSET_MANIFEST_PATH')
......
......@@ -10,7 +10,6 @@ import logging
import os
from waterdata.utils import execute_get_request, parse_rdb
from .metadata_field_lookups import METADATA_DESCRIPTIONS
from .nwis_lookups import translate_to_lookup, translate_codes_by_group
from .wqp_lookups import get_lookup_by_json, get_nwis_state_lookup, get_nwis_county_lookup, \
is_us_county
......@@ -160,8 +159,3 @@ def generate_country_state_county_file(datadir, filename='nwis_country_state_loo
with open(os.path.join(datadir, filename), 'w') as f:
f.write(json.dumps(lookups, indent=4))
def generate_metadata_description_file(datadir, filename='metadata_field_desc_lookup.json'):
with open(os.path.join(datadir, filename), 'w') as f:
f.write(json.dumps(METADATA_DESCRIPTIONS, indent=4))
......@@ -77,8 +77,7 @@ def monitoring_location(site_no):
param_datum,
app.config['NWIS_CODE_LOOKUP'],
{},
app.config['HUC_LOOKUP'],
app.config['METADATA_DESC_LOOKUP']
app.config['HUC_LOOKUP']
)
for param_datum in param_data
]
......@@ -100,8 +99,7 @@ def monitoring_location(site_no):
station_record,
app.config['NWIS_CODE_LOOKUP'],
app.config['COUNTRY_STATE_COUNTY_LOOKUP'],
app.config['HUC_LOOKUP'],
app.config['METADATA_DESC_LOOKUP']
app.config['HUC_LOOKUP']
)
questions_link = None
try:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment