CREATE TABLE public.parameters
(
gid int DEFAULT nextval('geoindex_gid_seq'::regclass) PRIMARY KEY NOT NULL,
name varchar(50) NOT NULL,
title varchar(100),
unit varchar(20), categories varchar(200), detail_view varchar(100),
search_view boolean DEFAULT true ,
explore_view boolean DEFAULT true ,
scale_names varchar(250),
scale_colors varchar(100)
);
CREATE UNIQUE INDEX parameters_gid_uindex ON public.parameters (gid);
CREATE UNIQUE INDEX parameters_name_uindex ON public.parameters (name);
CREATE TABLE public.categories
(
id int DEFAULT nextval('geoindex_gid_seq'::regclass) PRIMARY KEY NOT NULL,
name varchar(50),
type varchar(50)
);
CREATE UNIQUE INDEX categories_id_uindex ON public.categories (id);
CREATE TABLE public.parameter_categories
(
gid int DEFAULT nextval('geoindex_gid_seq'::regclass) PRIMARY KEY NOT NULL,
parameter_gid int NOT NULL,
category_gid int NOT NULL,
CONSTRAINT parameter_fk FOREIGN KEY (parameter_gid) REFERENCES parameters (gid),
CONSTRAINT categories_fk FOREIGN KEY (category_gid) REFERENCES categories (id)
);
Sample For GLM (Not complete)
Parameters
gid | name | Name | unit | searchView | exploreView | scale_names | scale_colors |
---|---|---|---|---|---|---|---|
8018546 | turbidity-glenda | Turbity | NTU | TRUE | TRUE | ||
8018542 | chlorophyll-a-glenda | Chlorophyll a | ug/L | TRUE | TRUE | ||
8018544 | silica-glenda | Silica | mg/L | TRUE | TRUE | ||
8018545 | total-phosphorus-glenda | Total Phosphorus | ug/L | TRUE | TRUE | ||
8018541 | alkalinity-glenda | Alkalinity | mg/L | TRUE | TRUE | ||
8018543 | nitrogen-glenda | Nitrite-Nitrate | mg/L | TRUE | TRUE | ||
8018547 | biomass | Zooplankton Biomass | ug/m^3 | TRUE | TRUE | Calanoids, Cyclopoids, Limnocalanus, Daphnids Cladocerans, Predatory Cladocerans, Non-Daphnid Cladocerans | #00FFFF, #FFFF00, #0000FF, #FF3939, #660000, #660066 |
8018548 | density | Zooplankton Density | #/m^3 | TRUE | TRUE | Calanoids, Cyclopoids, Limnocalanus, Daphnids Cladocerans, Predatory Cladocerans, Non-Daphnid Cladocerans | #00FFFF, #FFFF00, #0000FF, #FF3939, #660000, #660066 |
Categories
Id | Name | Type |
---|---|---|
35785 | nutrients | time |
8018549 | nutrients | stacked_line |
8018550 | biology | stacked_bar |
8018551 | contaminants | time |
Parameter Categories
gid | Parameter_gid | category_gid |
---|---|---|
8018552 | 8018546 | 35785 |
8018553 | 8018542 | 35785 |
8018554 | 8018544 | 35785 |
8018555 | 8018545 | 35785 |
8018556 | 8018543 | 35785 |
8018557 | 8018541 | 35785 |
8018558 | 8018547 | 8018550 |
8018559 | 8018548 | 8018550 |
8018560 | 8018541 | 8018551 |
-- Needs Updating —
/api/parameters
{"id": 8018543, "name": "nitrogen-glenda", "title": "Nitrite-Nitrate", "unit": "mg/L", "categories": ["nutrients"], "detail_view": ["time"], "search_view": true, "explore_view": true, "scale_names": [], "scale_colors": [] }, {"id": 8018548, "name": "density", "title": "Zooplankton Density", "unit": "#/m^3", "categories": ["biology"], "detail_view": ["stacked_bar"], "search_view": true, "explore_view": true, "scale_names": ["Calanoids","Cyclopoids","Limnocalanus","Daphnids Cladocerans","Predatory Cladocerans","Non-Daphnid Cladocerans"], "scale_colors": ["#00FFFF","#FFFF00","#0000FF","#FF3939","#660000","#660066"] } |