SlideShare a Scribd company logo
DATA
COLLECTION-
TRAFFIC API
GROUP MEMBERS
 Abhinav - 71520071
 Shanmukh - 71520022
 Swarna - 71520112
 Vinisha - 71520104
API details
 Map quest
 Free traffic API
 Location : Chicago , IL
 Boundary :
Latitude : 42.023135, -87.940
Longitude: 41.644286, -87.523661
URL BUILT *:
 http://www.mapquestapi.com/traffic/v2/i
ncidents?key=9MeX47CdULA7fqTMbUmp
hHwGZQlezisk&boundingBox=42.023135, -
87.940101,41.644286, -
87.523661&filters=construction,incidents&i
nFormat=kvp&outFormat=json
*Incidents Data
Codelibrary("RCurl")
library("jsonlite")
library("data.table")
url =
paste0("http://www.mapquestapi.com/traffic/v2/incidents?key=9MeX47CdULA7fqTMbUmphHwGZQlezisk&boundingBox=42.023135,
%20-87.940101,41.644286,%20-87.523661&filters=construction,incidents&inFormat=kvp&outFormat=json")
doc <- getURL(url)
x <- jsonlite::fromJSON(doc)
ids = x$incidents$id
type = x$incidents$type
severity = x$incidents$severity
longitude = x$incidents$lng
latitude = x$incidents$lat
startTime = x$incidents$startTime
endTime = x$incidents$endTime
shortDesc = x$incidents$shortDesc
fullDesc = x$incidents$fullDesc
delayFromFreeFlow = x$incidents$delayFromFreeFlow
delayFromTypical = x$incidents$delayFromTypical
distance = x$incidents$distance
roadName = x$incidents$parameterizedDescription$roadName
direction = x$incidents$parameterizedDescription$direction
eventText = x$incidents$parameterizedDescription$eventText
toLocation = x$incidents$parameterizedDescription$toLocatio
iconURL = x$incidents$iconURL
b=data.table(ids,type,severity,longitude,startTime,endTime,shortDesc,fullDesc,delayFromFreeFlow,delayFromTypical,distance,roadN
ame,direction,eventText,toLocation,iconURL,keep.rownames=True)
dim(b)
write.csv(b,"OutputTable_Assignment3.csv", row.names = T)
TOOLS USED
- MS EXCEL
- R Studio
OUTPUT
R Code & Output File
LEARNINGS
 WHILE USING APIs
 SSL shows local verifier Error if Https is used
(resolved by doc <- getURL(url, .opts =
list(ssl.verifypeer = FALSE)) )
 If cross domain data is extracted then
Callback is to be handled
 JSON data transformation will allow to
extract all data as list while merging in data
frames individual rows were binded so used
data tables.
Thanks

More Related Content

Viewers also liked

Moro abre duas ações penais contra marqueteiro de Lula e Dilma
Moro abre duas ações penais contra marqueteiro de Lula e DilmaMoro abre duas ações penais contra marqueteiro de Lula e Dilma
Moro abre duas ações penais contra marqueteiro de Lula e Dilma
Radar News
 
Cuadros
CuadrosCuadros
Government Policies - Aboriginal affairs formerly first nations- Canada - Dec...
Government Policies - Aboriginal affairs formerly first nations- Canada - Dec...Government Policies - Aboriginal affairs formerly first nations- Canada - Dec...
Government Policies - Aboriginal affairs formerly first nations- Canada - Dec...
paul young cpa, cga
 
Introduction to general english
Introduction to general englishIntroduction to general english
Introduction to general english
holmanisme
 
Real estate market - Canada - november 2016
Real estate market - Canada - november 2016Real estate market - Canada - november 2016
Real estate market - Canada - november 2016
paul young cpa, cga
 
SBC on energy efficiency for SMEs Dec 2015
SBC on energy efficiency for SMEs Dec 2015SBC on energy efficiency for SMEs Dec 2015
SBC on energy efficiency for SMEs Dec 2015
Barbara Albert
 
Business Model Canvas
Business Model CanvasBusiness Model Canvas
Business Model Canvas
Zach Nies
 
Glem dona da A Plus Holdings -- 26 ap inqpol8
 Glem dona da A Plus Holdings -- 26 ap inqpol8 Glem dona da A Plus Holdings -- 26 ap inqpol8
Glem dona da A Plus Holdings -- 26 ap inqpol8
Luiz Carlos Azenha
 
Contrato da Veine, que controla casa dos Marinho
Contrato da Veine, que controla casa dos MarinhoContrato da Veine, que controla casa dos Marinho
Contrato da Veine, que controla casa dos Marinho
Luiz Carlos Azenha
 
Как избежать дорогих ошибок при аренде офиса? ILM
Как избежать дорогих ошибок при аренде офиса? ILMКак избежать дорогих ошибок при аренде офиса? ILM
Как избежать дорогих ошибок при аренде офиса? ILM
Alexei Burba
 
метелики
метеликиметелики
Reverse Assumption Method
Reverse Assumption MethodReverse Assumption Method
Reverse Assumption Method
ThinkInnovation
 
Chapter 6
Chapter 6Chapter 6
Chapter 6
Nada G.Youssef
 
Chapter 9
Chapter 9Chapter 9
Chapter 9
Nada G.Youssef
 
Оценка презентаций по стандарту
Оценка презентаций по стандарту Оценка презентаций по стандарту
Оценка презентаций по стандарту
Alexei Burba
 
Необхідні документи для вчителя
Необхідні документи для вчителя Необхідні документи для вчителя
Необхідні документи для вчителя
Adriana Himinets
 

Viewers also liked (17)

Moro abre duas ações penais contra marqueteiro de Lula e Dilma
Moro abre duas ações penais contra marqueteiro de Lula e DilmaMoro abre duas ações penais contra marqueteiro de Lula e Dilma
Moro abre duas ações penais contra marqueteiro de Lula e Dilma
 
Cuadros
CuadrosCuadros
Cuadros
 
Government Policies - Aboriginal affairs formerly first nations- Canada - Dec...
Government Policies - Aboriginal affairs formerly first nations- Canada - Dec...Government Policies - Aboriginal affairs formerly first nations- Canada - Dec...
Government Policies - Aboriginal affairs formerly first nations- Canada - Dec...
 
Introduction to general english
Introduction to general englishIntroduction to general english
Introduction to general english
 
Real estate market - Canada - november 2016
Real estate market - Canada - november 2016Real estate market - Canada - november 2016
Real estate market - Canada - november 2016
 
SBC on energy efficiency for SMEs Dec 2015
SBC on energy efficiency for SMEs Dec 2015SBC on energy efficiency for SMEs Dec 2015
SBC on energy efficiency for SMEs Dec 2015
 
Business Model Canvas
Business Model CanvasBusiness Model Canvas
Business Model Canvas
 
Glem dona da A Plus Holdings -- 26 ap inqpol8
 Glem dona da A Plus Holdings -- 26 ap inqpol8 Glem dona da A Plus Holdings -- 26 ap inqpol8
Glem dona da A Plus Holdings -- 26 ap inqpol8
 
Contrato da Veine, que controla casa dos Marinho
Contrato da Veine, que controla casa dos MarinhoContrato da Veine, que controla casa dos Marinho
Contrato da Veine, que controla casa dos Marinho
 
Как избежать дорогих ошибок при аренде офиса? ILM
Как избежать дорогих ошибок при аренде офиса? ILMКак избежать дорогих ошибок при аренде офиса? ILM
Как избежать дорогих ошибок при аренде офиса? ILM
 
метелики
метеликиметелики
метелики
 
як не заблукати у лісі
як не заблукати у лісіяк не заблукати у лісі
як не заблукати у лісі
 
Reverse Assumption Method
Reverse Assumption MethodReverse Assumption Method
Reverse Assumption Method
 
Chapter 6
Chapter 6Chapter 6
Chapter 6
 
Chapter 9
Chapter 9Chapter 9
Chapter 9
 
Оценка презентаций по стандарту
Оценка презентаций по стандарту Оценка презентаций по стандарту
Оценка презентаций по стандарту
 
Необхідні документи для вчителя
Необхідні документи для вчителя Необхідні документи для вчителя
Необхідні документи для вчителя
 

Similar to TRAFFIC API PPT

CARTO ENGINE
CARTO ENGINECARTO ENGINE
CARTO ENGINE
Jorge Sanz
 
Demo: tablet-based visualisation of transport data in Madrid using SPARQLstream
Demo: tablet-based visualisation of transport data in Madrid using SPARQLstreamDemo: tablet-based visualisation of transport data in Madrid using SPARQLstream
Demo: tablet-based visualisation of transport data in Madrid using SPARQLstream
PlanetData Network of Excellence
 
SSN2013 Demo: tablet based visualization of transport data with SPARQLStream
SSN2013 Demo: tablet based visualization of transport data with SPARQLStreamSSN2013 Demo: tablet based visualization of transport data with SPARQLStream
SSN2013 Demo: tablet based visualization of transport data with SPARQLStream
Jean-Paul Calbimonte
 
SomeSQL at Skyscanner - Scaling in a changing world of databases and hardware
SomeSQL at Skyscanner - Scaling in a changing world of databases and hardwareSomeSQL at Skyscanner - Scaling in a changing world of databases and hardware
SomeSQL at Skyscanner - Scaling in a changing world of databases and hardware
alistair_hann
 
OIF SDN Transport API NFV Proof of Concept
OIF SDN Transport API NFV Proof of ConceptOIF SDN Transport API NFV Proof of Concept
OIF SDN Transport API NFV Proof of Concept
Deborah Porchivina
 
Rawnet Lightning Talk - Elasticsearch
Rawnet Lightning Talk -  ElasticsearchRawnet Lightning Talk -  Elasticsearch
Rawnet Lightning Talk - Elasticsearch
Rawnet
 
Connecting Pebble to the World
Connecting Pebble to the WorldConnecting Pebble to the World
Connecting Pebble to the World
Pebble Technology
 
GDG Devfest 2019 - Build go kit microservices at kubernetes with ease
GDG Devfest 2019 - Build go kit microservices at kubernetes with easeGDG Devfest 2019 - Build go kit microservices at kubernetes with ease
GDG Devfest 2019 - Build go kit microservices at kubernetes with ease
KAI CHU CHUNG
 
maXbox Starter 40 REST API Coding
maXbox Starter 40 REST API CodingmaXbox Starter 40 REST API Coding
maXbox Starter 40 REST API Coding
Max Kleiner
 
GeoTuple a Framework for Web Based Geo-Analytics with R and PostGIS
GeoTuple a Framework for Web Based Geo-Analytics with R and PostGISGeoTuple a Framework for Web Based Geo-Analytics with R and PostGIS
GeoTuple a Framework for Web Based Geo-Analytics with R and PostGIS
Roland Hansson
 
API gateway setup
API gateway setupAPI gateway setup
API gateway setup
sivachandra mandalapu
 
MongoDB World 2016: The Best IoT Analytics with MongoDB
MongoDB World 2016: The Best IoT Analytics with MongoDBMongoDB World 2016: The Best IoT Analytics with MongoDB
MongoDB World 2016: The Best IoT Analytics with MongoDB
MongoDB
 
SDN Transport API Interoperability Demo with OIF and ONF
SDN Transport API Interoperability Demo with OIF and ONFSDN Transport API Interoperability Demo with OIF and ONF
SDN Transport API Interoperability Demo with OIF and ONF
Deborah Porchivina
 
MongoDB for Time Series Data Part 2: Analyzing Time Series Data Using the Agg...
MongoDB for Time Series Data Part 2: Analyzing Time Series Data Using the Agg...MongoDB for Time Series Data Part 2: Analyzing Time Series Data Using the Agg...
MongoDB for Time Series Data Part 2: Analyzing Time Series Data Using the Agg...
MongoDB
 
EuroGeographics Linked Data by geo.admin.ch /swisstopo
EuroGeographics Linked Data by geo.admin.ch /swisstopoEuroGeographics Linked Data by geo.admin.ch /swisstopo
EuroGeographics Linked Data by geo.admin.ch /swisstopo
geoportal of the federal authorities of the Swiss Confederation
 
What are customers building with new Bing Maps capabilities
What are customers building with new Bing Maps capabilitiesWhat are customers building with new Bing Maps capabilities
What are customers building with new Bing Maps capabilities
Microsoft Tech Community
 
Deep dive into N1QL: SQL for JSON: Internals and power features.
Deep dive into N1QL: SQL for JSON: Internals and power features.Deep dive into N1QL: SQL for JSON: Internals and power features.
Deep dive into N1QL: SQL for JSON: Internals and power features.
Keshav Murthy
 
Anwendungsfaelle für Elasticsearch
Anwendungsfaelle für ElasticsearchAnwendungsfaelle für Elasticsearch
Anwendungsfaelle für Elasticsearch
Florian Hopf
 
Transport for London: Using data to keep London moving
Transport for London: Using data to keep London movingTransport for London: Using data to keep London moving
Transport for London: Using data to keep London moving
WSO2
 
Everything About Bluetooth (淺談藍牙 4.0) - Central 篇
Everything About Bluetooth (淺談藍牙 4.0) - Central 篇Everything About Bluetooth (淺談藍牙 4.0) - Central 篇
Everything About Bluetooth (淺談藍牙 4.0) - Central 篇
Johnny Sung
 

Similar to TRAFFIC API PPT (20)

CARTO ENGINE
CARTO ENGINECARTO ENGINE
CARTO ENGINE
 
Demo: tablet-based visualisation of transport data in Madrid using SPARQLstream
Demo: tablet-based visualisation of transport data in Madrid using SPARQLstreamDemo: tablet-based visualisation of transport data in Madrid using SPARQLstream
Demo: tablet-based visualisation of transport data in Madrid using SPARQLstream
 
SSN2013 Demo: tablet based visualization of transport data with SPARQLStream
SSN2013 Demo: tablet based visualization of transport data with SPARQLStreamSSN2013 Demo: tablet based visualization of transport data with SPARQLStream
SSN2013 Demo: tablet based visualization of transport data with SPARQLStream
 
SomeSQL at Skyscanner - Scaling in a changing world of databases and hardware
SomeSQL at Skyscanner - Scaling in a changing world of databases and hardwareSomeSQL at Skyscanner - Scaling in a changing world of databases and hardware
SomeSQL at Skyscanner - Scaling in a changing world of databases and hardware
 
OIF SDN Transport API NFV Proof of Concept
OIF SDN Transport API NFV Proof of ConceptOIF SDN Transport API NFV Proof of Concept
OIF SDN Transport API NFV Proof of Concept
 
Rawnet Lightning Talk - Elasticsearch
Rawnet Lightning Talk -  ElasticsearchRawnet Lightning Talk -  Elasticsearch
Rawnet Lightning Talk - Elasticsearch
 
Connecting Pebble to the World
Connecting Pebble to the WorldConnecting Pebble to the World
Connecting Pebble to the World
 
GDG Devfest 2019 - Build go kit microservices at kubernetes with ease
GDG Devfest 2019 - Build go kit microservices at kubernetes with easeGDG Devfest 2019 - Build go kit microservices at kubernetes with ease
GDG Devfest 2019 - Build go kit microservices at kubernetes with ease
 
maXbox Starter 40 REST API Coding
maXbox Starter 40 REST API CodingmaXbox Starter 40 REST API Coding
maXbox Starter 40 REST API Coding
 
GeoTuple a Framework for Web Based Geo-Analytics with R and PostGIS
GeoTuple a Framework for Web Based Geo-Analytics with R and PostGISGeoTuple a Framework for Web Based Geo-Analytics with R and PostGIS
GeoTuple a Framework for Web Based Geo-Analytics with R and PostGIS
 
API gateway setup
API gateway setupAPI gateway setup
API gateway setup
 
MongoDB World 2016: The Best IoT Analytics with MongoDB
MongoDB World 2016: The Best IoT Analytics with MongoDBMongoDB World 2016: The Best IoT Analytics with MongoDB
MongoDB World 2016: The Best IoT Analytics with MongoDB
 
SDN Transport API Interoperability Demo with OIF and ONF
SDN Transport API Interoperability Demo with OIF and ONFSDN Transport API Interoperability Demo with OIF and ONF
SDN Transport API Interoperability Demo with OIF and ONF
 
MongoDB for Time Series Data Part 2: Analyzing Time Series Data Using the Agg...
MongoDB for Time Series Data Part 2: Analyzing Time Series Data Using the Agg...MongoDB for Time Series Data Part 2: Analyzing Time Series Data Using the Agg...
MongoDB for Time Series Data Part 2: Analyzing Time Series Data Using the Agg...
 
EuroGeographics Linked Data by geo.admin.ch /swisstopo
EuroGeographics Linked Data by geo.admin.ch /swisstopoEuroGeographics Linked Data by geo.admin.ch /swisstopo
EuroGeographics Linked Data by geo.admin.ch /swisstopo
 
What are customers building with new Bing Maps capabilities
What are customers building with new Bing Maps capabilitiesWhat are customers building with new Bing Maps capabilities
What are customers building with new Bing Maps capabilities
 
Deep dive into N1QL: SQL for JSON: Internals and power features.
Deep dive into N1QL: SQL for JSON: Internals and power features.Deep dive into N1QL: SQL for JSON: Internals and power features.
Deep dive into N1QL: SQL for JSON: Internals and power features.
 
Anwendungsfaelle für Elasticsearch
Anwendungsfaelle für ElasticsearchAnwendungsfaelle für Elasticsearch
Anwendungsfaelle für Elasticsearch
 
Transport for London: Using data to keep London moving
Transport for London: Using data to keep London movingTransport for London: Using data to keep London moving
Transport for London: Using data to keep London moving
 
Everything About Bluetooth (淺談藍牙 4.0) - Central 篇
Everything About Bluetooth (淺談藍牙 4.0) - Central 篇Everything About Bluetooth (淺談藍牙 4.0) - Central 篇
Everything About Bluetooth (淺談藍牙 4.0) - Central 篇
 

TRAFFIC API PPT

  • 2. GROUP MEMBERS  Abhinav - 71520071  Shanmukh - 71520022  Swarna - 71520112  Vinisha - 71520104
  • 3. API details  Map quest  Free traffic API  Location : Chicago , IL  Boundary : Latitude : 42.023135, -87.940 Longitude: 41.644286, -87.523661
  • 4. URL BUILT *:  http://www.mapquestapi.com/traffic/v2/i ncidents?key=9MeX47CdULA7fqTMbUmp hHwGZQlezisk&boundingBox=42.023135, - 87.940101,41.644286, - 87.523661&filters=construction,incidents&i nFormat=kvp&outFormat=json *Incidents Data
  • 5. Codelibrary("RCurl") library("jsonlite") library("data.table") url = paste0("http://www.mapquestapi.com/traffic/v2/incidents?key=9MeX47CdULA7fqTMbUmphHwGZQlezisk&boundingBox=42.023135, %20-87.940101,41.644286,%20-87.523661&filters=construction,incidents&inFormat=kvp&outFormat=json") doc <- getURL(url) x <- jsonlite::fromJSON(doc) ids = x$incidents$id type = x$incidents$type severity = x$incidents$severity longitude = x$incidents$lng latitude = x$incidents$lat startTime = x$incidents$startTime endTime = x$incidents$endTime shortDesc = x$incidents$shortDesc fullDesc = x$incidents$fullDesc delayFromFreeFlow = x$incidents$delayFromFreeFlow delayFromTypical = x$incidents$delayFromTypical distance = x$incidents$distance roadName = x$incidents$parameterizedDescription$roadName direction = x$incidents$parameterizedDescription$direction eventText = x$incidents$parameterizedDescription$eventText toLocation = x$incidents$parameterizedDescription$toLocatio iconURL = x$incidents$iconURL b=data.table(ids,type,severity,longitude,startTime,endTime,shortDesc,fullDesc,delayFromFreeFlow,delayFromTypical,distance,roadN ame,direction,eventText,toLocation,iconURL,keep.rownames=True) dim(b) write.csv(b,"OutputTable_Assignment3.csv", row.names = T)
  • 6. TOOLS USED - MS EXCEL - R Studio
  • 8. R Code & Output File
  • 9. LEARNINGS  WHILE USING APIs  SSL shows local verifier Error if Https is used (resolved by doc <- getURL(url, .opts = list(ssl.verifypeer = FALSE)) )  If cross domain data is extracted then Callback is to be handled  JSON data transformation will allow to extract all data as list while merging in data frames individual rows were binded so used data tables.