Skip to content

Commit

Permalink
update counties aws call
Browse files Browse the repository at this point in the history
  • Loading branch information
harborlighttech authored Oct 23, 2024
1 parent 65df60d commit 052d1bf
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -281,9 +281,7 @@
let geojson = fetch(statesReq)
.then((response) => response.json())
.then((data) => {
console.log('Pre-Sorted: ', data['impacts'])
sorted = sortObjectByValues(data['impacts'])
console.log('Sorted: ', sorted)
for (const idx in sorted) {
fips = sorted[idx]
//console.log(fips, data[fips])
Expand Down Expand Up @@ -316,11 +314,11 @@
setLegend(increment)

// Get Counties
const countyReq = new Request('https://2jla2kob4zasgzwg3auuhxoona0jkbdm.lambda-url.us-east-1.on.aws/?fips=county&date='+datefile);
const countyReq = new Request('https://2jla2kob4zasgzwg3auuhxoona0jkbdm.lambda-url.us-east-1.on.aws/v0/impacts?fips=county&date='+datefile);
fetch(countyReq)
.then((response) => response.json())
.then((data) => {
sorted = sortObjectByValues(data)
sorted = sortObjectByValues(data['impacts'])
for (const idx in sorted) {
fips = sorted[idx]
state = JSON.stringify(fips.substring(0, 2))
Expand Down

0 comments on commit 052d1bf

Please sign in to comment.