Account Registration 

Sample Code

WebAPI Usage Examples

Some programming will be required to use the People Flow WebAPI. The link below will allow you to download example code written in Java that we hope will be instructive.   This code is intended only to demonstrate the functionality of the platform. We are sorry that we cannot offer technical assistance for its use.

Using the sample code

NOTES

Only the standard JDK is used. No additional libraries should be required.
The code will access the People Flow WebAPI, so please insure that you have an active Internet connection before using it.
Please replace the userid and passwd values with your registered user ID and password.

API examples
GetNearestRoadPoint example

Parameters passed: Nearest roadway node to the University of Tokyo’s Kashiwa Campus
(139.93689537, 35.90084483: Kashiwa City, Chiba Prefecture)

> java pflow.sample.PFlowSample_GetNearestRoadPoint userid passwd
CreateSession : 1
GetNearestRoadPoint : 1
roadKindCode : 9
roadNo : 0
meshCode : 533967
longitude : 139.93674385
latitude : 35.90112752
DestroySession : 1

GetDistributionData example

The following example will retrieve person-trip data (Tokyo Metropolitan Area person-trip data set) for 1 km2 centered on the University of Tokyo’s Hongo Campus (139.76246595, 35.7078869; Bunkyo Ward, Tokyo) at 8 AM.

> java pflow.sample.PFlowSample_GetDistributionData userid passwd
CreateSession : 1
GetDistributionData : 1
432095,2,3,1998/01/01 08:00:00,139.7590019094,35.7073894255,1,11,3136202,10,1,24,,12,
594858,2,2,1998/01/01 08:00:00,139.7591925721,35.7074163885,1,12,0410114,5,1,43,,3,
733548,2,3,1998/01/01 08:00:00,139.7592242906,35.7073446132,1,8,0772201,8,1,45,,12,
226611,3,5,1998/01/01 08:00:00,139.7594045713,35.7057653666,1,13,2313610,10,97,36,,97,
565709,1,1,1998/01/01 08:00:00,139.7594045713,35.7057653666,2,14,0221008,15,97,64,,97,
565710,1,1,1998/01/01 08:00:00,139.7594045713,35.7057653666,1,9,0221008,8,97,52,,97,
565716,1,1,1998/01/01 08:00:00,139.7594045713,35.7057653666,2,9,0221008,9,97,74,,97,
565718,1,1,1998/01/01 08:00:00,139.7594045713,35.7057653666,2,11,0221008,8,97,42,,97,
565719,1,1,1998/01/01 08:00:00,139.7594045713,35.7057653666,1,6,0221008,9,97,58,,97,
565719,2,2,1998/01/01 08:00:00,139.7594045713,35.7057653666,1,6,0221008,9,1,58,,1,
565722,1,1,1998/01/01 08:00:00,139.7594045713,35.7057653666,2,9,0221008,4,97,46,,97,
—– Omitted —–
1,2010/07/16 21:35:27,2010/07/16 21:35:27,15,
2,2010/07/16 21:35:27,2010/07/16 21:35:33,6235,
3,2010/07/16 21:35:33,2010/07/16 21:35:33,0,
4,2010/07/16 21:35:27,2010/07/16 21:35:33,6250,
DestroySession : 1

GetDistributionImage example (coming soon)

The following example will retrieve a distribution map of person-trip data (Tokyo Metropolitan Area person-trip data set) for 1 km2 centered on the University of Tokyo’s Hongo Campus (139.76246595, 35.7078869; Bunkyo Ward, Tokyo) at 8 AM.

> java pflow.sample.PFlowSample_GetDistributionImage userid passwd

* After the command has successfully run, a status code of ‘1’ and the image will be returned. If an error occurs, only the status code will be returned and no image will be displayed.

GetMixedRoute example

The following example will retrieve a mixed road and rail path from the University of Tokyo’s Kashiwa Campus (139.93689537, 35.90084483: Kashiwa City, Chiba Prefecture) to the University of Tokyo’s Hongo Campus (139.76246595, 35.7078869; Bunkyo Ward, Tokyo).

> java pflow.sample.PFlowSample_GetMixedRoute userid passwd
CreateSession : 1
GetMixedRoute : 1
1,3,0,0,224,0,0,
1,柏の葉キャンパス,つくばエクスプレス,
1,新御徒町,都営大江戸線,
1,本郷三丁目,都営大江戸線,
1,0.0,0.0,1,
1,139.93674385,35.90112752,1,
1,139.93753133,35.89994437,1,
1,139.93905615,35.9006277,1,
1,139.94033112,35.898878,1,
1,139.94179364,35.89602847,1,
~~~道路経路中略~~~
1,139.95235278,35.89295833,2,
1,139.95243166,35.89293528,2,
1,139.95237222,35.89272778,2,
1,139.95187222,35.89119444,2,
1,139.95157222,35.89050278,2,
1,139.95104722,35.88959444,2,
~~~鉄道経路中略~~~
> 1,139.76260316,35.70755107,1,
1,0.0,0.0,1,
,
DestroySession : 1

Response times for data returned from the WebAPI GetFlow function

The table below lists the estimated response times and the amount of data retrieved when using the GetFlowData API.

Metropolitan Area Avg. search response time Amount of data retrieved
1998 Tokyo Metropolitan Area 45s – 50s 59.5MB
2006 Do-oh Metropolitan Area 6s – 8s 7.9MB
2005 Northern Kyushu Metropolitan Area 13s – 15s 15.8MB
2001 Nagoya Metropolitan Area 17s – 19s 20.0MB
2000 Kyoto/Osaka/Kobe Metropolitan Area Not yet measured Not yet measured

Page Top