bin/loadTweets.js
//Return the time zone of a GeoJSON point
Return the time zone of a GeoJSON point
Return the time zone of a GeoJSON point
function findTimeZone(tweetGeoJson) {
	for (var i = 0; i < tzone.features.length; i++) {
		if (tweetGeoJson.geometry.coordinates[0] >= tzone.features[i].bbox[0] &&
			tweetGeoJson.geometry.coordinates[0] <= tzone.features[i].bbox[2] &&
			tweetGeoJson.geometry.coordinates[1] >= tzone.features[i].bbox[1] &&
			tweetGeoJson.geometry.coordinates[1] <= tzone.features[i].bbox[3] &&
			turf.inside(tweetGeoJson, tzone.features[i])) {
			return tzone.features[i].properties.tz_name1st;
		}
	}
	return 'Not Found';
}
function findTimeZone ( tweetGeoJson ) { for ( var i = 0 ; i < tzone . features . length ; i ++ ) { if ( tweetGeoJson . geometry . coordinates [ 0 ] >= tzone . features [ i ] . bbox [ 0 ] && tweetGeoJson . geometry . coordinates [ 0 ] <= tzone . features [ i ] . bbox [ 2 ] && tweetGeoJson . geometry . coordinates [ 1 ] >= tzone . features [ i ] . bbox [ 1 ] && tweetGeoJson . geometry . coordinates [ 1 ] <= tzone . features [ i ] . bbox [ 3 ] && turf . inside ( tweetGeoJson , tzone . features [ i ] ) ) { return tzone . features [ i ] . properties . tz_name1st ; } } return 'Not Found' ; }
Return the time zone of a GeoJSON point
Return the time zone of a GeoJSON point