@@ -235,7 +235,7 @@ define([
235
235
$ ( '.countries_list ul' ) . html ( '' ) ;
236
236
$ ( '.show-more-countries' ) . show ( ) ;
237
237
}
238
- d3 . json ( 'http ://wri-01.cartodb .com/api/v2/sql/?q=' + encodeURIComponent ( sql ) , _ . bind ( function ( json ) {
238
+ d3 . json ( 'https ://wri-01.carto .com/api/v2/sql/?q=' + encodeURIComponent ( sql ) , _ . bind ( function ( json ) {
239
239
var self = that ,
240
240
markup_list = '' ;
241
241
@@ -324,7 +324,7 @@ define([
324
324
sql += ' LIMIT 10 ' ;
325
325
}
326
326
327
- d3 . json ( 'http ://wri-01.cartodb .com/api/v2/sql/?q=' + encodeURIComponent ( sql ) , function ( json ) {
327
+ d3 . json ( 'https ://wri-01.carto .com/api/v2/sql/?q=' + encodeURIComponent ( sql ) , function ( json ) {
328
328
var self = that ,
329
329
markup_list = '' ;
330
330
@@ -400,7 +400,7 @@ define([
400
400
sql += ' LIMIT 10 ' ;
401
401
}
402
402
403
- d3 . json ( 'http ://wri-01.cartodb .com/api/v2/sql/?q=' + encodeURIComponent ( sql ) , function ( json ) {
403
+ d3 . json ( 'https ://wri-01.carto .com/api/v2/sql/?q=' + encodeURIComponent ( sql ) , function ( json ) {
404
404
var self = that ,
405
405
markup_list = '' ;
406
406
@@ -469,7 +469,7 @@ define([
469
469
sql += ' LIMIT 10 ' ;
470
470
}
471
471
472
- d3 . json ( 'http ://wri-01.cartodb .com/api/v2/sql/?q=' + encodeURIComponent ( sql ) , _ . bind ( function ( json ) {
472
+ d3 . json ( 'https ://wri-01.carto .com/api/v2/sql/?q=' + encodeURIComponent ( sql ) , _ . bind ( function ( json ) {
473
473
var self = that ,
474
474
markup_list = '' ;
475
475
@@ -509,7 +509,7 @@ define([
509
509
} else if ( this . model . get ( 'graph' ) === 'domains' ) {
510
510
$ ( '.countries_list__header__minioverview' ) . show ( ) ;
511
511
var sql = "SELECT ecozone as name, sum(loss) as total_loss, SUM(gain)/COUNT(gain) as total_gain FROM umd_eco_2014 where thresh = " + ( this . helper . config . canopy_choice || 30 ) + " and ecozone !='Water' and ecozone != 'Polar' group by ecozone" ;
512
- d3 . json ( 'http ://wri-01.cartodb .com/api/v2/sql/?q=' + encodeURIComponent ( sql ) , _ . bind ( function ( json ) {
512
+ d3 . json ( 'https ://wri-01.carto .com/api/v2/sql/?q=' + encodeURIComponent ( sql ) , _ . bind ( function ( json ) {
513
513
var self = that ,
514
514
markup_list = '' ;
515
515
var data = json . rows ;
@@ -566,7 +566,7 @@ define([
566
566
567
567
if ( this . model . get ( 'graph' ) === ( 'total_loss' ) ) {
568
568
var sql = 'SELECT iso, year, Sum(loss) loss, Sum(gain)/COUNT(gain) gain FROM umd_nat_staging WHERE iso = \'' + iso + '\' AND thresh = ' + ( this . helper . config . canopy_choice || 30 ) + ' AND year > 2000 AND year < 2017 GROUP BY iso, year ORDER BY year' ;
569
- d3 . json ( 'https://wri-01.cartodb .com/api/v2/sql?q=' + sql , function ( json ) {
569
+ d3 . json ( 'https://wri-01.carto .com/api/v2/sql?q=' + sql , function ( json ) {
570
570
var data = json . rows ;
571
571
572
572
var data_ = data ,
@@ -595,7 +595,7 @@ define([
595
595
WHERE thresh = ' + ( this . helper . config . canopy_choice || 30 ) + ' \
596
596
AND iso = \'' + iso + '\'' ;
597
597
598
- d3 . json ( 'https://wri-01.cartodb .com/api/v2/sql?q=' + encodeURIComponent ( sql ) , function ( json ) {
598
+ d3 . json ( 'https://wri-01.carto .com/api/v2/sql?q=' + encodeURIComponent ( sql ) , function ( json ) {
599
599
var data = json . rows ;
600
600
601
601
var data_ = data ;
@@ -627,7 +627,7 @@ define([
627
627
AND iso = \'' + iso + '\' \
628
628
AND year > 2000 AND year < 2015' ;
629
629
630
- d3 . json ( 'https://wri-01.cartodb .com/api/v2/sql?q=' + sql , function ( json ) {
630
+ d3 . json ( 'https://wri-01.carto .com/api/v2/sql?q=' + sql , function ( json ) {
631
631
632
632
var graph2 = d3 . select ( '.countries_list__minioverview_' + iso )
633
633
. append ( 'div' )
@@ -822,7 +822,7 @@ define([
822
822
if ( ! ! mode && mode . mode == 'percent' ) {
823
823
sql = 'SELECT year, Sum(loss) / Sum(extent_2000) loss FROM umd_nat_staging WHERE thresh = ' + ( this . helper . config . canopy_choice || 30 ) + ' AND year > 2000 AND year < 2017 GROUP BY year ORDER BY year ' ;
824
824
}
825
- d3 . json ( 'https://wri-01.cartodb .com/api/v2/sql?q=' + encodeURIComponent ( sql ) , _ . bind ( function ( error , json ) {
825
+ d3 . json ( 'https://wri-01.carto .com/api/v2/sql?q=' + encodeURIComponent ( sql ) , _ . bind ( function ( error , json ) {
826
826
var data = json . rows ;
827
827
828
828
var data_ = data ;
@@ -897,7 +897,7 @@ define([
897
897
query = 'WITH g AS (SELECT gain, extent_2000, land, country, iso FROM umd_nat_staging WHERE year = 2001 AND thresh = ' + ( this . helper . config . canopy_choice || 30 ) + ' AND gain IS NOT NULL) SELECT ROUND(sum(gain)/sum(extent_2000) * 100, 2) as sum FROM g WHERE NOT extent_2000 = 0 ' ;
898
898
}
899
899
$ . ajax ( {
900
- url : 'https://wri-01.cartodb .com/api/v2/sql?q=' + query ,
900
+ url : 'https://wri-01.carto .com/api/v2/sql?q=' + query ,
901
901
dataType : 'json' ,
902
902
success : _ . bind ( function ( data ) {
903
903
var gain = data . rows [ 0 ] . sum ;
@@ -920,7 +920,7 @@ define([
920
920
query = 'SELECT sum(extent_perc)/count(extent_perc) as sum from umd_nat_staging WHERE thresh = ' + ( this . helper . config . canopy_choice || 30 ) + '' ;
921
921
}
922
922
$ . ajax ( {
923
- url : 'https://wri-01.cartodb .com/api/v2/sql?q=' + query ,
923
+ url : 'https://wri-01.carto .com/api/v2/sql?q=' + query ,
924
924
dataType : 'json' ,
925
925
success : _ . bind ( function ( data ) {
926
926
var extent = data . rows [ 0 ] . sum ;
@@ -1016,7 +1016,7 @@ define([
1016
1016
AND e.iso = u.iso \
1017
1017
ORDER BY u.sum_loss DESC limit 50 ' ;
1018
1018
1019
- d3 . json ( 'https://wri-01.cartodb .com/api/v2/sql?q=' + encodeURIComponent ( sql ) , function ( json ) {
1019
+ d3 . json ( 'https://wri-01.carto .com/api/v2/sql?q=' + encodeURIComponent ( sql ) , function ( json ) {
1020
1020
var data = json . rows ;
1021
1021
1022
1022
var log_m = 50 ;
@@ -1181,7 +1181,7 @@ define([
1181
1181
} else if ( this . model . get ( 'graph' ) === 'domains' ) {
1182
1182
this . _showYears ( ) ;
1183
1183
var sql = "SELECT ecozone as name, sum(loss), year FROM umd_eco_2014 where thresh = " + ( this . helper . config . canopy_choice || 30 ) + " and ecozone !='Water' and ecozone != 'Polar' group by name, year" ;
1184
- d3 . json ( 'http ://wri-01.cartodb .com/api/v2/sql/?q=' + encodeURIComponent ( sql ) , _ . bind ( function ( json ) {
1184
+ d3 . json ( 'https ://wri-01.carto .com/api/v2/sql/?q=' + encodeURIComponent ( sql ) , _ . bind ( function ( json ) {
1185
1185
var data = _ . groupBy ( _ . sortBy ( json . rows , function ( row ) { return row . year } ) , function ( row ) {
1186
1186
return row . name ;
1187
1187
} ) ;
0 commit comments