Skip to content

Latest commit

 

History

History
31 lines (25 loc) · 2.79 KB

DATA_SOURCES.md

File metadata and controls

31 lines (25 loc) · 2.79 KB

Map Data In the Groundwater Mapping Application

Description of Map Data

The features displayed on the map are all stored in the Google Cloud Bucket, and are downloaded from these directories for display on the map when a user loads the site. A majority of this data is generated by downloading and processing data from the New Mexico and USGS water data APIs on a schedule (see the API url variables in the generator).

The charts that are shown when a user views 'Detailed Info' on a well are also stored on the bucket and created by the generator.

Below are descriptions of what each folder in the bucket contains, and whether the generator creates updated versions when it runs. Note: almost, if not all of these files are referenced by their specific URL in the code, so their name or location should not be changed.

  • /basemap:
    • Contains the tile images that are shown as the background of the map (must contain tiles for all allowed zoom levels, currently we allow level 9-13)
    • Is not generated, but can be manually replaced
  • /geojson:
    • Contains the geojson files that describe the features to be shown on the map
    • well_points.geojson is generated, the rest are not but can be manually replaced (ensure that the structure of the feature descriptions in the file remains the same)
  • /podtilesmap:
    • Contains the tile images that show the water point of distributions (must contain tiles for all allowed zoom levels, currently we allow level 9-13)
    • Is not generated, but can be manually replaced
  • /well_data:
    • Contains the CSV files by location that are used to show the charts when a user views 'Detailed Info' on a well.
    • Is generated

IMPORTANT: All data in these sources must be present for the map to function properly. The bucket where this data is hosted must be public and must have CORS configured to allow access from any origin.

Well Trend Analysis

All wells are classified as trending "Steady", "Decreasing", "Increasing", or "Insufficient Data" based on the well's observation values. This occurs in create_well_points.py and the wells' trends are classified as follows:

  • If a well has 10 or more observations OR has at least 4 observations with at least 2 years between the start and end date of those observations, linear regression is used to calculate a line that fits these points.
  • If the line has a slope greater than or equal to 0.25, that well is considered to be "Decreasing" (because we're working with depth to groundwater, so higher values indicate less water in the well).
  • If the line has a slope less than or equal to -0.25, that well is considered to be "Increasing".
  • If the line has a slope between -0.25 and 0.25, that well is considered to be "Steady".
  • If the well does not have 10+ observations or 4+observations over 2 years, the well is considered to have "Insufficient Data".