Skip to content

Commit

Permalink
Tree update
Browse files Browse the repository at this point in the history
  • Loading branch information
ModelEarth committed May 20, 2024
1 parent bec9c20 commit d833e4d
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions view/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@
{"value":"bsky","name":"BlueSky Model.Earth RSS (CORS)"},
{"value":"film-scouting","name":"Film Scouting Locations"},
{"value":"flow","name":"USEEIO Impact Flow"},
{"value":"Dmatrix","name":"USEEIO D Matrix Commodities"},
{"value":"civictechindex","name":"Civic Tech Organizations"},
{"value":"civictechlinks","name":"Civic Tech Links"},
{"value":"epd","name":"Environmental Product Declarations (EPD)"},
Expand Down Expand Up @@ -207,7 +208,7 @@
url = "https://bsky.app/profile/did:plc:ileopdnhib52emw3veem5zxk/rss";
//alert(url)
selected_array = [];
$('#pageTitleText').html('<a href="https://cors-anywhere.herokuapp.com/">Turn on CORS passthrough</a>');
$('#pageTitleText').html('<a href="https://cors-anywhere.herokuapp.com/" target="passthrough">Turn on CORS passthrough</a>');
} else if (hash.feed == "usda") { // Nutrition label
$('#pageTitle').html("Nutrition label");
url = "https://api.nal.usda.gov/fdc/v1/food/2015943?api_key=bLecediTVa2sWd8AegmUZ9o7DxYFSYoef9B4i1Ml";
Expand Down Expand Up @@ -245,6 +246,7 @@
} else if (hash.feed == "LandCoverFraction_Forest") {
$('#pageTitle').html("US State Populations");
url = "https://api.datacommons.org/v2/observation?key=AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI&date=2015&date=LATEST&entity.expression=geoId%2F06%3C-containedInPlace%2B%7BtypeOf%3ACounty%7D&select=date&select=entity&select=value&select=variable&variable.dcids=LandCoverFraction_Forest";
// = "response.byVariable.LandCoverFraction_Forest.byEntity";
} else if (hash.feed == "311") {
$('#pageTitle').html("See Click Fix - v2");
url = `https://seeclickfix.com/api/v2/issues?lat=${latitude}&lng=${longitude}&zoom=8&per_page=10`;
Expand All @@ -253,13 +255,16 @@
barName = "summary"
} else if (hash.feed == "open311") {
url = `https://seeclickfix.com/open311/v2/requests.json?lat=${latitude}&long=${longitude}`;
$('#pageTitleText').html('<a href="https://cors-anywhere.herokuapp.com/">Turn on CORS passthrough</a>');
$('#pageTitleText').html('<a href="https://cors-anywhere.herokuapp.com/" target="passthrough">Turn on CORS passthrough</a>');
} else if (hash.feed == "film-scouting") {
$('#pageTitle').html("Film Scounting Locations");
url = "https://raw.githubusercontent.com/GeorgiaFilm/cameraready_locations_curl/main/cameraready.json";
} else if (hash.feed == "flow") {
$('#pageTitleText').html("USEEEIO Flow GAEEIOv1.0-s-20");
url = "https://raw.githubusercontent.com/ModelEarth/OpenFootprint/main/impacts/2020/GAEEIOv1.0-s-20/flows.json";
} else if (hash.feed == "Dmatrix") {
$('#pageTitleText').html("D Matrix");
url = "https://raw.githubusercontent.com/ModelEarth/OpenFootprint/main/impacts/2020/GAEEIOv1.0-s-20/matrix/D.json";
} else if (hash.feed == "civictechindex") {
$('#pageTitle').html("Civic Tech Organizations");
//url = "https://api-stage.civictechindex.org/swagger/?format=openapi"
Expand Down Expand Up @@ -287,13 +292,20 @@
}
}
function displayJson(url){
let hash = getHash();
d3.json(url).then(function(json) {
var fullHtml = '';
if (hash.feed == "LandCoverFraction_Forest") { // Limit to list of states
json = json.byVariable.LandCoverFraction_Forest.byEntity;
}

//fullHtml += formatRow(b,json[a][b],1); // Resides in localsite.js

// Key, Value, Level, Params
fullHtml += formatRow("",json,0); // Resides in localsite.js

$("#resultJson").html(JSON.stringify(json));

$("#resultFull").show();
//resultFull.innerHTML = fullHtml;
$("#resultFull").html(fullHtml);
Expand Down Expand Up @@ -413,6 +425,8 @@ <h3>${capFirst(item.description)}</h3>
-->
<div id="pageTitleText" style="padding-top: 10px;"></div>

TestMe
<div id="resultJson" style="max-height:100px;overflow-y:scroll;border:1px solid #ccc; padding:10px"></div>

<!--
<div id="resultLoading" style="padding-top: 10px;">Loading..<br></div>
Expand Down

0 comments on commit d833e4d

Please sign in to comment.