@usa-open-data-connectors/usa-sources 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +339 -0
- package/dist/blsSeries.d.ts +73 -0
- package/dist/blsSeries.d.ts.map +1 -0
- package/dist/blsSeries.js +173 -0
- package/dist/blsSeries.js.map +1 -0
- package/dist/cdcCountyObesity.d.ts +116 -0
- package/dist/cdcCountyObesity.d.ts.map +1 -0
- package/dist/cdcCountyObesity.js +180 -0
- package/dist/cdcCountyObesity.js.map +1 -0
- package/dist/cfpbConsumerComplaints.d.ts +152 -0
- package/dist/cfpbConsumerComplaints.d.ts.map +1 -0
- package/dist/cfpbConsumerComplaints.js +273 -0
- package/dist/cfpbConsumerComplaints.js.map +1 -0
- package/dist/cpscProductRecalls.d.ts +146 -0
- package/dist/cpscProductRecalls.d.ts.map +1 -0
- package/dist/cpscProductRecalls.js +298 -0
- package/dist/cpscProductRecalls.js.map +1 -0
- package/dist/errors.d.ts +15 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +26 -0
- package/dist/errors.js.map +1 -0
- package/dist/femaDisasterDeclarations.d.ts +123 -0
- package/dist/femaDisasterDeclarations.d.ts.map +1 -0
- package/dist/femaDisasterDeclarations.js +214 -0
- package/dist/femaDisasterDeclarations.js.map +1 -0
- package/dist/fixtures.d.ts +5 -0
- package/dist/fixtures.d.ts.map +1 -0
- package/dist/fixtures.js +11 -0
- package/dist/fixtures.js.map +1 -0
- package/dist/index.d.ts +51 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +27 -0
- package/dist/index.js.map +1 -0
- package/dist/nceiAnnualTemperature.d.ts +92 -0
- package/dist/nceiAnnualTemperature.d.ts.map +1 -0
- package/dist/nceiAnnualTemperature.js +158 -0
- package/dist/nceiAnnualTemperature.js.map +1 -0
- package/dist/noaaSeaLevel.d.ts +144 -0
- package/dist/noaaSeaLevel.d.ts.map +1 -0
- package/dist/noaaSeaLevel.js +252 -0
- package/dist/noaaSeaLevel.js.map +1 -0
- package/dist/openFdaFoodRecalls.d.ts +154 -0
- package/dist/openFdaFoodRecalls.d.ts.map +1 -0
- package/dist/openFdaFoodRecalls.js +293 -0
- package/dist/openFdaFoodRecalls.js.map +1 -0
- package/dist/registry.d.ts +28 -0
- package/dist/registry.d.ts.map +1 -0
- package/dist/registry.js +79 -0
- package/dist/registry.js.map +1 -0
- package/dist/treasuryAvgInterestRate.d.ts +107 -0
- package/dist/treasuryAvgInterestRate.d.ts.map +1 -0
- package/dist/treasuryAvgInterestRate.js +191 -0
- package/dist/treasuryAvgInterestRate.js.map +1 -0
- package/dist/types.d.ts +30 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/usgsEarthquakes.d.ts +108 -0
- package/dist/usgsEarthquakes.d.ts.map +1 -0
- package/dist/usgsEarthquakes.js +199 -0
- package/dist/usgsEarthquakes.js.map +1 -0
- package/dist/usgsPeakStreamflow.d.ts +116 -0
- package/dist/usgsPeakStreamflow.d.ts.map +1 -0
- package/dist/usgsPeakStreamflow.js +211 -0
- package/dist/usgsPeakStreamflow.js.map +1 -0
- package/package.json +46 -0
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import type { UsDataAdapter } from './types.js';
|
|
2
|
+
/** One water year's peak flow at a river gauge. */
|
|
3
|
+
export interface UsgsPeakStreamflowYear {
|
|
4
|
+
/** Water year the agency files the peak under. A water year starts in October. */
|
|
5
|
+
waterYear: number;
|
|
6
|
+
/** Calendar year the peak fell in, which can differ from the water year. */
|
|
7
|
+
calendarYear: number;
|
|
8
|
+
/** Date of the peak day, e.g. "1993-08-01". */
|
|
9
|
+
peakDate: string;
|
|
10
|
+
/** Peak discharge that day, in cubic feet per second. */
|
|
11
|
+
peakDischargeCubicFeetPerSecond: number;
|
|
12
|
+
/**
|
|
13
|
+
* The agency's own qualifiers for the record, e.g. "REGULATED" when a dam
|
|
14
|
+
* controls the river or "MAXDAILYMEAN" when the peak is a daily mean rather
|
|
15
|
+
* than an instantaneous reading. Empty when the agency sent none.
|
|
16
|
+
*/
|
|
17
|
+
qualifiers: string[];
|
|
18
|
+
}
|
|
19
|
+
/** One gauge's peak-flow record, folded down to the points a story leans on. */
|
|
20
|
+
export interface UsgsPeakStreamflowSeries {
|
|
21
|
+
/** The agency's own id for the gauge, e.g. "USGS-07010000". */
|
|
22
|
+
monitoringLocationId: string;
|
|
23
|
+
/** One entry per water year that carries a peak, oldest first. */
|
|
24
|
+
years: UsgsPeakStreamflowYear[];
|
|
25
|
+
yearCount: number;
|
|
26
|
+
firstYear: UsgsPeakStreamflowYear;
|
|
27
|
+
lastYear: UsgsPeakStreamflowYear;
|
|
28
|
+
highest: UsgsPeakStreamflowYear;
|
|
29
|
+
lowest: UsgsPeakStreamflowYear;
|
|
30
|
+
/** The middle peak, by value, across the record. */
|
|
31
|
+
median: UsgsPeakStreamflowYear;
|
|
32
|
+
/** Water years between the first and the last that carry no peak row. */
|
|
33
|
+
missingWaterYears: number[];
|
|
34
|
+
/** Highest peak divided by the lowest, rounded to one decimal. */
|
|
35
|
+
highestToLowestRatio: number;
|
|
36
|
+
}
|
|
37
|
+
/** Base URL for the USGS Water Data OGC API. */
|
|
38
|
+
export declare const USGS_WATER_DATA_API_BASE = "https://api.waterdata.usgs.gov/ogcapi/v0";
|
|
39
|
+
/** Collection holding the annual peak-flow record for every gauge. */
|
|
40
|
+
export declare const USGS_PEAK_STREAMFLOW_COLLECTION = "peaks";
|
|
41
|
+
/** USGS parameter code for discharge, in cubic feet per second. */
|
|
42
|
+
export declare const USGS_DISCHARGE_PARAMETER_CODE = "00060";
|
|
43
|
+
/** The gauge the adapter reads by default: the Mississippi River at St. Louis. */
|
|
44
|
+
export declare const USGS_MISSISSIPPI_ST_LOUIS_LOCATION_ID = "USGS-07010000";
|
|
45
|
+
/** Name the agency gives that gauge. */
|
|
46
|
+
export declare const USGS_MISSISSIPPI_ST_LOUIS_LOCATION_NAME = "Mississippi River at St. Louis, MO";
|
|
47
|
+
/** First water year on the default gauge's record. */
|
|
48
|
+
export declare const USGS_PEAK_STREAMFLOW_FIRST_WATER_YEAR = 1844;
|
|
49
|
+
/**
|
|
50
|
+
* Row cap for one request.
|
|
51
|
+
*
|
|
52
|
+
* The default gauge's record is 165 rows and the API answers a whole
|
|
53
|
+
* collection in one page at this cap, so the adapter never pages. A record
|
|
54
|
+
* longer than the cap would be a change worth making here rather than a
|
|
55
|
+
* silent truncation.
|
|
56
|
+
*/
|
|
57
|
+
export declare const USGS_PEAK_STREAMFLOW_ROW_LIMIT = 500;
|
|
58
|
+
/**
|
|
59
|
+
* Builds the request URL for one gauge's annual peak-flow record.
|
|
60
|
+
*
|
|
61
|
+
* The filter pins the response to the discharge parameter, so the rows for
|
|
62
|
+
* every other parameter a gauge reports never reach the parser. The endpoint
|
|
63
|
+
* is keyless.
|
|
64
|
+
*
|
|
65
|
+
* @param options - an optional gauge id, parameter code, and row cap
|
|
66
|
+
* @returns the full request URL
|
|
67
|
+
*/
|
|
68
|
+
export declare function buildUsgsPeakStreamflowUrl(options?: {
|
|
69
|
+
monitoringLocationId?: string;
|
|
70
|
+
parameterCode?: string;
|
|
71
|
+
rowLimit?: number;
|
|
72
|
+
}): string;
|
|
73
|
+
/**
|
|
74
|
+
* Parses one response into the water years that carry a peak.
|
|
75
|
+
*
|
|
76
|
+
* A row for another gauge or another parameter is a changed filter and stops
|
|
77
|
+
* the parse, so a response that ignored the filter cannot quietly widen the
|
|
78
|
+
* series. A row without a value is dropped, which is how a year the agency
|
|
79
|
+
* could not compute would arrive. A row without a readable date or water year
|
|
80
|
+
* is a changed shape and also stops the parse.
|
|
81
|
+
*
|
|
82
|
+
* @param payload - the JSON body from the Water Data API
|
|
83
|
+
* @returns the water years that carry a peak, in the order the agency sent them
|
|
84
|
+
*/
|
|
85
|
+
export declare function parseUsgsPeakStreamflowPayload(payload: unknown): UsgsPeakStreamflowYear[];
|
|
86
|
+
/**
|
|
87
|
+
* Folds the parsed rows into one record with the headline years named.
|
|
88
|
+
*
|
|
89
|
+
* The rows are sorted oldest first, so a caller reading index 0 gets the
|
|
90
|
+
* start of the record. A water year with no row at all is listed in
|
|
91
|
+
* `missingWaterYears` rather than drawn as a zero, because a year the agency
|
|
92
|
+
* never filed is not a year the river ran dry.
|
|
93
|
+
*
|
|
94
|
+
* @param rows - the parsed water years, in any order
|
|
95
|
+
* @param options - the gauge the rows belong to
|
|
96
|
+
* @returns the sorted record, the highest, lowest, and middle years, and the gap list
|
|
97
|
+
*/
|
|
98
|
+
export declare function buildUsgsPeakStreamflowSeries(rows: UsgsPeakStreamflowYear[], options?: {
|
|
99
|
+
monitoringLocationId?: string;
|
|
100
|
+
}): UsgsPeakStreamflowSeries;
|
|
101
|
+
/**
|
|
102
|
+
* Reads the annual peak-flow record for one gauge.
|
|
103
|
+
*
|
|
104
|
+
* One keyless request covers the whole record. The default gauge, the
|
|
105
|
+
* Mississippi River at St. Louis, answers 165 water years from 1844.
|
|
106
|
+
*
|
|
107
|
+
* @param options - an optional gauge id and fetch stub
|
|
108
|
+
* @returns the record with the highest, lowest, and middle years named
|
|
109
|
+
*/
|
|
110
|
+
export declare function fetchUsgsPeakStreamflow(options?: {
|
|
111
|
+
monitoringLocationId?: string;
|
|
112
|
+
fetchImpl?: typeof globalThis.fetch;
|
|
113
|
+
}): Promise<UsgsPeakStreamflowSeries>;
|
|
114
|
+
/** USGS annual peak streamflow at a gauge, keyless. */
|
|
115
|
+
export declare const usgsPeakStreamflowAdapter: UsDataAdapter<UsgsPeakStreamflowSeries>;
|
|
116
|
+
//# sourceMappingURL=usgsPeakStreamflow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usgsPeakStreamflow.d.ts","sourceRoot":"","sources":["../src/usgsPeakStreamflow.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD,mDAAmD;AACnD,MAA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AE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,GAAG,MAAM,CAOT;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,8BAA8B,CAAC,OAAO,EAAE,OAAO,GAAG,sBAAsB,EAAE,CA+DzF;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,6BAA6B,CAC3C,IAAI,EAAE,sBAAsB,EAAE,EAC9B,OAAO,CAAC,EAAE;IAAE,oBAAoB,CAAC,EAAE,MAAM,CAAA;CAAE,GAC1C,wBAAwB,CAkD1B;AAED;;;;;;;;GAQG;AACH,wBAAsB,uBAAuB,CAAC,OAAO,CAAC,EAAE;IACtD,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,SAAS,CAAC,EAAE,OAAO,UAAU,CAAC,KAAK,CAAC;CACrC,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAoBpC;AAED,uDAAuD;AACvD,eAAO,MAAM,yBAAyB,EAAE,aAAa,CAAC,wBAAwB,CAe7E,CAAC"}
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { UsSourceApiError, UsSourceParseError } from './errors.js';
|
|
3
|
+
import { readFixtureJson } from './fixtures.js';
|
|
4
|
+
/** Base URL for the USGS Water Data OGC API. */
|
|
5
|
+
export const USGS_WATER_DATA_API_BASE = 'https://api.waterdata.usgs.gov/ogcapi/v0';
|
|
6
|
+
/** Collection holding the annual peak-flow record for every gauge. */
|
|
7
|
+
export const USGS_PEAK_STREAMFLOW_COLLECTION = 'peaks';
|
|
8
|
+
/** USGS parameter code for discharge, in cubic feet per second. */
|
|
9
|
+
export const USGS_DISCHARGE_PARAMETER_CODE = '00060';
|
|
10
|
+
/** The gauge the adapter reads by default: the Mississippi River at St. Louis. */
|
|
11
|
+
export const USGS_MISSISSIPPI_ST_LOUIS_LOCATION_ID = 'USGS-07010000';
|
|
12
|
+
/** Name the agency gives that gauge. */
|
|
13
|
+
export const USGS_MISSISSIPPI_ST_LOUIS_LOCATION_NAME = 'Mississippi River at St. Louis, MO';
|
|
14
|
+
/** First water year on the default gauge's record. */
|
|
15
|
+
export const USGS_PEAK_STREAMFLOW_FIRST_WATER_YEAR = 1844;
|
|
16
|
+
/**
|
|
17
|
+
* Row cap for one request.
|
|
18
|
+
*
|
|
19
|
+
* The default gauge's record is 165 rows and the API answers a whole
|
|
20
|
+
* collection in one page at this cap, so the adapter never pages. A record
|
|
21
|
+
* longer than the cap would be a change worth making here rather than a
|
|
22
|
+
* silent truncation.
|
|
23
|
+
*/
|
|
24
|
+
export const USGS_PEAK_STREAMFLOW_ROW_LIMIT = 500;
|
|
25
|
+
/** Committed snapshot, so a build works when the USGS host is unreachable. */
|
|
26
|
+
const USGS_PEAK_STREAMFLOW_FIXTURE_FILENAME = 'usgs-peak-streamflow-2026-10-01.json';
|
|
27
|
+
/** Shape of the agency's peak date, e.g. "1993-08-01". */
|
|
28
|
+
const ISO_DATE_PATTERN = /^(\d{4})-(\d{2})-(\d{2})$/;
|
|
29
|
+
// Every property arrives as a string except the date parts and the water
|
|
30
|
+
// year. The API answers an OGC API feature collection, so the numbers sit
|
|
31
|
+
// under `properties` rather than at the top of each row.
|
|
32
|
+
const USGS_PEAK_ROW_SCHEMA = z.object({
|
|
33
|
+
monitoring_location_id: z.string().optional(),
|
|
34
|
+
parameter_code: z.string().optional(),
|
|
35
|
+
unit_of_measure: z.string().optional(),
|
|
36
|
+
value: z.string().optional(),
|
|
37
|
+
time: z.string().nullable().optional(),
|
|
38
|
+
water_year: z.number().nullable().optional(),
|
|
39
|
+
year: z.number().nullable().optional(),
|
|
40
|
+
qualifier: z.array(z.string()).nullable().optional(),
|
|
41
|
+
});
|
|
42
|
+
const USGS_PEAK_PAYLOAD_SCHEMA = z.object({
|
|
43
|
+
type: z.string().optional(),
|
|
44
|
+
features: z.array(z.object({ properties: USGS_PEAK_ROW_SCHEMA })).optional(),
|
|
45
|
+
});
|
|
46
|
+
/**
|
|
47
|
+
* Builds the request URL for one gauge's annual peak-flow record.
|
|
48
|
+
*
|
|
49
|
+
* The filter pins the response to the discharge parameter, so the rows for
|
|
50
|
+
* every other parameter a gauge reports never reach the parser. The endpoint
|
|
51
|
+
* is keyless.
|
|
52
|
+
*
|
|
53
|
+
* @param options - an optional gauge id, parameter code, and row cap
|
|
54
|
+
* @returns the full request URL
|
|
55
|
+
*/
|
|
56
|
+
export function buildUsgsPeakStreamflowUrl(options) {
|
|
57
|
+
const params = new URLSearchParams({
|
|
58
|
+
monitoring_location_id: options?.monitoringLocationId ?? USGS_MISSISSIPPI_ST_LOUIS_LOCATION_ID,
|
|
59
|
+
parameter_code: options?.parameterCode ?? USGS_DISCHARGE_PARAMETER_CODE,
|
|
60
|
+
limit: String(options?.rowLimit ?? USGS_PEAK_STREAMFLOW_ROW_LIMIT),
|
|
61
|
+
});
|
|
62
|
+
return `${USGS_WATER_DATA_API_BASE}/collections/${USGS_PEAK_STREAMFLOW_COLLECTION}/items?${params.toString()}`;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Parses one response into the water years that carry a peak.
|
|
66
|
+
*
|
|
67
|
+
* A row for another gauge or another parameter is a changed filter and stops
|
|
68
|
+
* the parse, so a response that ignored the filter cannot quietly widen the
|
|
69
|
+
* series. A row without a value is dropped, which is how a year the agency
|
|
70
|
+
* could not compute would arrive. A row without a readable date or water year
|
|
71
|
+
* is a changed shape and also stops the parse.
|
|
72
|
+
*
|
|
73
|
+
* @param payload - the JSON body from the Water Data API
|
|
74
|
+
* @returns the water years that carry a peak, in the order the agency sent them
|
|
75
|
+
*/
|
|
76
|
+
export function parseUsgsPeakStreamflowPayload(payload) {
|
|
77
|
+
const parsed = USGS_PEAK_PAYLOAD_SCHEMA.safeParse(payload);
|
|
78
|
+
if (!parsed.success) {
|
|
79
|
+
throw new UsSourceParseError('usgs-peak-streamflow', parsed.error.message);
|
|
80
|
+
}
|
|
81
|
+
const features = parsed.data.features ?? [];
|
|
82
|
+
if (features.length === 0) {
|
|
83
|
+
throw new UsSourceParseError('usgs-peak-streamflow', 'The response carried no rows');
|
|
84
|
+
}
|
|
85
|
+
const years = [];
|
|
86
|
+
for (const feature of features) {
|
|
87
|
+
const row = feature.properties;
|
|
88
|
+
if (row.monitoring_location_id !== undefined &&
|
|
89
|
+
row.monitoring_location_id !== USGS_MISSISSIPPI_ST_LOUIS_LOCATION_ID) {
|
|
90
|
+
throw new UsSourceParseError('usgs-peak-streamflow', `Unexpected gauge in the response: ${row.monitoring_location_id}`);
|
|
91
|
+
}
|
|
92
|
+
if (row.parameter_code !== undefined && row.parameter_code !== USGS_DISCHARGE_PARAMETER_CODE) {
|
|
93
|
+
throw new UsSourceParseError('usgs-peak-streamflow', `Unexpected parameter in the response: ${row.parameter_code}`);
|
|
94
|
+
}
|
|
95
|
+
if (row.value === undefined || row.value.trim() === '') {
|
|
96
|
+
continue;
|
|
97
|
+
}
|
|
98
|
+
const peakDischargeCubicFeetPerSecond = Number(row.value);
|
|
99
|
+
if (!Number.isFinite(peakDischargeCubicFeetPerSecond)) {
|
|
100
|
+
throw new UsSourceParseError('usgs-peak-streamflow', `Unreadable peak discharge: ${row.value}`);
|
|
101
|
+
}
|
|
102
|
+
if (row.time === undefined || row.time === null) {
|
|
103
|
+
throw new UsSourceParseError('usgs-peak-streamflow', 'A row carries no peak date');
|
|
104
|
+
}
|
|
105
|
+
const match = ISO_DATE_PATTERN.exec(row.time);
|
|
106
|
+
if (match === null) {
|
|
107
|
+
throw new UsSourceParseError('usgs-peak-streamflow', `Unreadable peak date: ${row.time}`);
|
|
108
|
+
}
|
|
109
|
+
if (row.water_year === undefined || row.water_year === null) {
|
|
110
|
+
throw new UsSourceParseError('usgs-peak-streamflow', `Row ${row.time} carries no water year`);
|
|
111
|
+
}
|
|
112
|
+
years.push({
|
|
113
|
+
waterYear: row.water_year,
|
|
114
|
+
calendarYear: Number(match[1]),
|
|
115
|
+
peakDate: row.time,
|
|
116
|
+
peakDischargeCubicFeetPerSecond,
|
|
117
|
+
qualifiers: row.qualifier ?? [],
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
if (years.length === 0) {
|
|
121
|
+
throw new UsSourceParseError('usgs-peak-streamflow', 'No peak values in the response');
|
|
122
|
+
}
|
|
123
|
+
return years;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Folds the parsed rows into one record with the headline years named.
|
|
127
|
+
*
|
|
128
|
+
* The rows are sorted oldest first, so a caller reading index 0 gets the
|
|
129
|
+
* start of the record. A water year with no row at all is listed in
|
|
130
|
+
* `missingWaterYears` rather than drawn as a zero, because a year the agency
|
|
131
|
+
* never filed is not a year the river ran dry.
|
|
132
|
+
*
|
|
133
|
+
* @param rows - the parsed water years, in any order
|
|
134
|
+
* @param options - the gauge the rows belong to
|
|
135
|
+
* @returns the sorted record, the highest, lowest, and middle years, and the gap list
|
|
136
|
+
*/
|
|
137
|
+
export function buildUsgsPeakStreamflowSeries(rows, options) {
|
|
138
|
+
const years = [...rows].sort((left, right) => left.waterYear - right.waterYear);
|
|
139
|
+
const first = years[0];
|
|
140
|
+
const last = years[years.length - 1];
|
|
141
|
+
if (first === undefined || last === undefined) {
|
|
142
|
+
throw new UsSourceParseError('usgs-peak-streamflow', 'No water years to summarise');
|
|
143
|
+
}
|
|
144
|
+
let highest = first;
|
|
145
|
+
let lowest = first;
|
|
146
|
+
for (const year of years) {
|
|
147
|
+
if (year.peakDischargeCubicFeetPerSecond > highest.peakDischargeCubicFeetPerSecond) {
|
|
148
|
+
highest = year;
|
|
149
|
+
}
|
|
150
|
+
if (year.peakDischargeCubicFeetPerSecond < lowest.peakDischargeCubicFeetPerSecond) {
|
|
151
|
+
lowest = year;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
const byValue = [...years].sort((left, right) => left.peakDischargeCubicFeetPerSecond - right.peakDischargeCubicFeetPerSecond);
|
|
155
|
+
const median = byValue[Math.floor(byValue.length / 2)];
|
|
156
|
+
if (median === undefined) {
|
|
157
|
+
throw new UsSourceParseError('usgs-peak-streamflow', 'No water years to summarise');
|
|
158
|
+
}
|
|
159
|
+
const filed = new Set(years.map((year) => year.waterYear));
|
|
160
|
+
const missingWaterYears = [];
|
|
161
|
+
for (let waterYear = first.waterYear; waterYear <= last.waterYear; waterYear += 1) {
|
|
162
|
+
if (!filed.has(waterYear)) {
|
|
163
|
+
missingWaterYears.push(waterYear);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
return {
|
|
167
|
+
monitoringLocationId: options?.monitoringLocationId ?? USGS_MISSISSIPPI_ST_LOUIS_LOCATION_ID,
|
|
168
|
+
years,
|
|
169
|
+
yearCount: years.length,
|
|
170
|
+
firstYear: first,
|
|
171
|
+
lastYear: last,
|
|
172
|
+
highest,
|
|
173
|
+
lowest,
|
|
174
|
+
median,
|
|
175
|
+
missingWaterYears,
|
|
176
|
+
highestToLowestRatio: Math.round((highest.peakDischargeCubicFeetPerSecond / lowest.peakDischargeCubicFeetPerSecond) * 10) / 10,
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Reads the annual peak-flow record for one gauge.
|
|
181
|
+
*
|
|
182
|
+
* One keyless request covers the whole record. The default gauge, the
|
|
183
|
+
* Mississippi River at St. Louis, answers 165 water years from 1844.
|
|
184
|
+
*
|
|
185
|
+
* @param options - an optional gauge id and fetch stub
|
|
186
|
+
* @returns the record with the highest, lowest, and middle years named
|
|
187
|
+
*/
|
|
188
|
+
export async function fetchUsgsPeakStreamflow(options) {
|
|
189
|
+
const fetchImpl = options?.fetchImpl ?? globalThis.fetch;
|
|
190
|
+
const url = buildUsgsPeakStreamflowUrl(options?.monitoringLocationId === undefined
|
|
191
|
+
? {}
|
|
192
|
+
: { monitoringLocationId: options.monitoringLocationId });
|
|
193
|
+
const response = await fetchImpl(url);
|
|
194
|
+
if (!response.ok) {
|
|
195
|
+
throw new UsSourceApiError('usgs-peak-streamflow', `HTTP ${response.status} reading the peak-flow record`);
|
|
196
|
+
}
|
|
197
|
+
return buildUsgsPeakStreamflowSeries(parseUsgsPeakStreamflowPayload(await response.json()), options?.monitoringLocationId === undefined
|
|
198
|
+
? {}
|
|
199
|
+
: { monitoringLocationId: options.monitoringLocationId });
|
|
200
|
+
}
|
|
201
|
+
/** USGS annual peak streamflow at a gauge, keyless. */
|
|
202
|
+
export const usgsPeakStreamflowAdapter = {
|
|
203
|
+
id: 'usgs-peak-streamflow',
|
|
204
|
+
name: 'USGS annual peak streamflow',
|
|
205
|
+
auth: 'none',
|
|
206
|
+
description: 'The annual peak-flow record at a USGS stream gauge, one row per water year, through the USGS Water Data OGC API.',
|
|
207
|
+
fetchLive: async (options) => fetchUsgsPeakStreamflow(options?.fetchImpl === undefined ? {} : { fetchImpl: options.fetchImpl }),
|
|
208
|
+
parse: (payload) => buildUsgsPeakStreamflowSeries(parseUsgsPeakStreamflowPayload(payload)),
|
|
209
|
+
loadFixture: () => buildUsgsPeakStreamflowSeries(parseUsgsPeakStreamflowPayload(readFixtureJson(USGS_PEAK_STREAMFLOW_FIXTURE_FILENAME))),
|
|
210
|
+
};
|
|
211
|
+
//# sourceMappingURL=usgsPeakStreamflow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usgsPeakStreamflow.js","sourceRoot":"","sources":["../src/usgsPeakStreamflow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAwChD,gDAAgD;AAChD,MAAM,CAAC,MAAM,wBAAwB,GAAG,0CAA0C,CAAC;AAEnF,sEAAsE;AACtE,MAAM,CAAC,MAAM,+BAA+B,GAAG,OAAO,CAAC;AAEvD,mEAAmE;AACnE,MAAM,CAAC,MAAM,6BAA6B,GAAG,OAAO,CAAC;AAErD,kFAAkF;AAClF,MAAM,CAA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O,CAAC,CAAC;IAC1F,WAAW,EAAE,GAAG,EAAE,CAChB,6BAA6B,CAC3B,8BAA8B,CAAC,eAAe,CAAC,qCAAqC,CAAC,CAAC,CACvF;CACJ,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@usa-open-data-connectors/usa-sources",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.js"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist"
|
|
16
|
+
],
|
|
17
|
+
"scripts": {
|
|
18
|
+
"build": "tsc -p tsconfig.build.json",
|
|
19
|
+
"prepublishOnly": "npm run build",
|
|
20
|
+
"lint": "eslint .",
|
|
21
|
+
"format": "prettier --write \"src/**/*.{ts,json}\"",
|
|
22
|
+
"format:check": "prettier --check \"src/**/*.{ts,json}\"",
|
|
23
|
+
"type-check": "tsc --noEmit",
|
|
24
|
+
"test": "vitest run",
|
|
25
|
+
"test:coverage": "vitest run --coverage",
|
|
26
|
+
"test:watch": "vitest --watch",
|
|
27
|
+
"clean": "rm -rf dist tsconfig.tsbuildinfo tsconfig.build.tsbuildinfo coverage",
|
|
28
|
+
"clean:all": "rm -rf dist tsconfig.tsbuildinfo tsconfig.build.tsbuildinfo coverage node_modules",
|
|
29
|
+
"test:smoke": "RUN_SMOKE=1 vitest run src/smoke.test.ts"
|
|
30
|
+
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"@usa-open-data-connectors/config-eslint": "*",
|
|
33
|
+
"@usa-open-data-connectors/config-typescript": "*",
|
|
34
|
+
"@types/node": "22.20.4",
|
|
35
|
+
"eslint": "9.39.5",
|
|
36
|
+
"typescript": "6.0.3",
|
|
37
|
+
"vitest": "3.2.7"
|
|
38
|
+
},
|
|
39
|
+
"dependencies": {
|
|
40
|
+
"zod": "3.25.76"
|
|
41
|
+
},
|
|
42
|
+
"publishConfig": {
|
|
43
|
+
"access": "public"
|
|
44
|
+
},
|
|
45
|
+
"description": "Uniform TypeScript adapters for US public data sources"
|
|
46
|
+
}
|