This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>Drawing isochrones</title> | |
</head> | |
<body> | |
<!DOCTYPE html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
TravelTimeClient, | |
} from 'traveltime-api'; | |
const travelTimeClient = new TravelTimeClient({ | |
apiKey: 'YOUR_APP_KEY', | |
applicationId: 'YOUR_APP_ID', | |
}); | |
const departure_search = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<style> | |
body { | |
background-color: gray; | |
} | |
html, | |
body, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<style> | |
body { | |
background-color: gray; | |
} | |
html, | |
body, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
TravelTimeClient, | |
} from 'traveltime-api'; | |
const travelTimeClient = new TravelTimeClient({ | |
apiKey: 'YOUR_APP_ID', | |
applicationId: 'YOUR_APP_KEY', | |
}); | |
const departure_search = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
import csv | |
import json | |
from datetime import datetime | |
from pathlib import Path | |
from traveltimepy import TravelTimeSdk, Location, Coordinates, Property, Driving | |
async def main(): | |
sdk = TravelTimeSdk("YOUR_APP_ID", "YOUR_APP_KEY") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(traveltimeR) | |
library(rjson) | |
readRenviron(".env") | |
data <- read.csv("../data/customers.csv") | |
locations <- apply(data, 1, function(point) { | |
make_location(point["id"], list( | |
lat = as.numeric(point["lat"]), | |
lng = as.numeric(point["lng"]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.example; | |
import com.opencsv.CSVReader; | |
import com.opencsv.CSVReaderBuilder; | |
import com.traveltime.sdk.TravelTimeSDK; | |
import com.traveltime.sdk.auth.TravelTimeCredentials; | |
import com.traveltime.sdk.dto.common.Coordinates; | |
import com.traveltime.sdk.dto.common.Location; | |
import com.traveltime.sdk.dto.common.Property; | |
import com.traveltime.sdk.dto.common.transportation.Driving; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dotenv/config'; | |
import fs from 'fs'; | |
import readline from 'readline'; | |
import { TravelTimeClient } from 'traveltime-api'; | |
const data = []; | |
const stream = fs.createReadStream('../data/customers.csv'); | |
const reader = readline.createInterface({ input: stream }); | |
const outputDir = './results'; | |
const outputPath = `${outputDir}/reachable_customers.json`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -X POST https://api.traveltimeapp.com/v4/time-filter \ | |
-H 'Content-Type: application/json' \ | |
-H 'Accept: application/json' \ | |
-H 'X-Application-Id: YOUR_API_ID' \ | |
-H'X-Api-Key: YOUR_API_KEY' \ | |
-d '{ | |
"locations": [ | |
{ "id": "Times-Square", | |
"coords": { "lat": 40.758896, "lng": -73.98513 } | |
}, |
OlderNewer