workingcount

GET https://tern.retail.roofstreet.io/api/v1/workingcount

Return the estimated number of poeple working on an input zone.

The working poeple are the poeple spending enough time at a place during the normal working hours, to be considered as their usual occupation place.

This may includes retired poeple at home, students at schools, unnoccupied poeple at home, and workers at home-office if these poeples have a high regularity of beeing at the place.

isochronic zone with the count of working poeple

The zone to use as input could be a Geojson or a set of parameters necessary to compute an isochronic zone.

This service uses the geolocation data analyzed by Roofstreet to estimate this number.

Parameters

You can either provide a polygonal zone, or request our system to compute an isochronic zone around a given point.

Option 1 : Provide a tailor made zone

Parameter Type Usage
zone geojson Zone that will be used to compute the inhabitants. Must be a Polygon

Option 2 : Request on an isochronic zone

Parameter Type Usage
lon float (-180 to 180) WSG84 Longitude (e.g. 2.4290276323522635 for Paris)
lat float (-90 to 90) WSG84 Latitude (e.g. 48.85225019822305 for Paris)
travel text Type of travelling method used to compute the distance coverable in a given time. This also define the type of roads that can be used (e.g. pedestrians area or motorways)
pedestrian : The API will return an isochronic zone based on pedestrians allowed roads and speed (about 5 km/h)
motorized : The API will return an isochronic zone based on car allowed roads and speed (depending on the speed limits)
time integer (from 60) The travel time in seconds. Should be 60 at minimum.

Returns : JSON Object

{
    "success" : true,
    "error" : "Reason if it failed",
    "isochrone" : {
        "type" : "Feature",
        "properties" : {},
        "geometry" : {
            "type" : "Polygon",
            "coordinates" : [[[2.3535338601971567, 48.873069341676775], [2.353549029152114, 48.87309019990071], [2.3535699743003238, 48.87310876929425], [2.353595924904892, 48.87312436654612], [2.3536259260387813, 48.87313641771364], [2.3546869260387813, 48.873475416979005], [2.3547167901903814, 48.87348291985479], [2.3567607901903815, 48.87386591896737], [2.356795022437324, 48.873870072290735], [2.356829831179669, 48.87386989322344], [2.356863960463654, 48.87386538822646], [2.3568961788514358, 48.87385671984599], [2.356925323853286, 48.873844200848666], [2.3569503438720405, 48.87382828293676], [2.3569703361463654, 48.87380954045047], [2.3569845793237922, 48.87378864964518], [2.357684331874901, 48.87242913145983], [2.357839078279009, 48.872136611068065], [2.3578431498001686, 48.87212785662567], [2.358089149800169, 48.87151685700249], [2.3580936071006517, 48.87150213485295], [2.358116607100652, 48.87139013488909], [2.3581180357807243, 48.87136808824108], [2.358113330122544, 48.87134623971262], [2.3581026478335203, 48.87132532154526], [2.3580863469243885, 48.871306034800824], [2.358064973710683, 48.871289025865636], [2.356367973710683, 48.87016602395839], [2.356344711767517, 48.87015300489941], [2.356318485561035, 48.870142707970125], [2.3544774855610355, 48.869550706688855], [2.354443377845082, 48.86954238264993], [2.354407442406197, 48.86953865443505], [2.3543710954383754, 48.86953966897191], [2.3543357693537192, 48.86954538627797], [2.3543028563319397, 48.86955558103606], [2.3542736534553947, 48.86956985147436], [2.3542493115918526, 48.86958763520028], [2.354230790039489, 48.86960823136455], [2.353345234515932, 48.87086260305385], [2.352790689986897, 48.87162497767177], [2.35277831291587, 48.871647509867145], [2.3527729554400088, 48.871671207070975], [2.352774829208413, 48.871695133115324], [2.3527838601971562, 48.87171834279316], [2.3535338601971567, 48.873069341676775]]]
        }
    },
    "workingcountzone" : {
        "type" : "Feature",
        "properties" : {},
        "geometry" : {
            "type" : "Polygon",
            "coordinates" : [[[2.35267257631959, 48.871423953141], [2.35229041264799, 48.8715695037322], [2.35228810628343, 48.8715706091119], [2.35228619870947, 48.8715720066606], [2.35228477329668, 48.8715736352985], [2.35228389234277, 48.8715754238458], [2.35228359434989, 48.8715772941342], [2.35228359426936, 48.8718735876384], [2.35228389226011, 48.8718754579177], [2.35228477320996, 48.8718772464573], [2.35228619861741, 48.8718788750899], [2.35228810618566, 48.8718802726365], [2.35229041254521, 48.8718813780181], [2.35267939451335, 48.8720295241316], [2.35268199887631, 48.8720302890284], [2.35268478740726, 48.8720306800202], [2.35268763823481, 48.872030680019], [2.35269042676494, 48.8720302890246], [2.35269303112631, 48.8720295241254], [2.35289862072612, 48.8719512241157], [2.35316065473722, 48.8724232345122], [2.35306837635544, 48.8724583789627], [2.35306606995863, 48.872459484343], [2.35306416235857, 48.8724608818905], [2.35306273692656, 48.8724625105257], [2.35306185596089, 48.8724642990692], [2.35306155796405, 48.8724661693533], [2.35306155788508, 48.8727572639852], [2.3526793943949, 48.872902810606], [2.35267708796898, 48.8729039159855], [2.35267518034427, 48.8729053135339], [2.35267375489355, 48.8729069421714], [2.3526728739162, 48.8729087307184], [2.35267257591538, 48.8729106010064], [2.35267257583486, 48.8732068865687], [2.35267287383353, 48.8732087568477], [2.35267375480682, 48.873210545387], [2.3526751802522, 48.8732121740192], [2.3526770878712, 48.8732135715656], [2.35267939429212, 48.8732146769469], [2.35306837626026, 48.8733628190894], [2.35307098068889, 48.8733635839854], [2.35307376929007, 48.8733639749774], [2.35307662018969, 48.8733639749774], [2.35307940879089, 48.8733635839854], [2.35308201321954, 48.8733628190895], [2.35346417666848, 48.8732172737709], [2.35384634011646, 48.8733628190899], [2.35384894454913, 48.8733635839868], [2.35385173315472, 48.8733639749785], [2.35385458405857, 48.8733639749771], [2.35385737266329, 48.8733635839827], [2.35385997709425, 48.8733628190833], [2.35406219546265, 48.8732858050799], [2.35461748540466, 48.8734632253384], [2.35461748535343, 48.8736513116037], [2.35461778335481, 48.8736531818828], [2.35461866433606, 48.8736549704223], [2.3546200897943, 48.8736565990546], [2.35462199743051, 48.8736579966011], [2.35462430387223, 48.8736591019826], [2.35501328584037, 48.8738072428014], [2.3550158902925, 48.8738080076974], [2.35501867891885, 48.8738083986894], [2.35502152984419, 48.8738083986894], [2.35502431847055, 48.8738080076975], [2.35502692292271, 48.8738072428015], [2.35540908631013, 48.8736616988068], [2.35578443109553, 48.8738046460085], [2.35578443101626, 48.8740957326676], [2.3557847290203, 48.8740976029468], [2.35578561000943, 48.8740993914863], [2.35578703548044, 48.8741010201187], [2.35578894313374, 48.8741024176652], [2.35579124959613, 48.8741035230467], [2.35618023156427, 48.8742516625419], [2.35618283603973, 48.8742524274379], [2.35618562469106, 48.87425281843], [2.35618847564194, 48.87425281843], [2.35619126429328, 48.874252427438], [2.35619386876877, 48.874251662542], [2.3565760320951, 48.874106119871], [2.35695819542048, 48.8742516625424], [2.35696079989611, 48.8742524274385], [2.35696358854762, 48.8742528184306], [2.35696643949869, 48.8742528184306], [2.35696922815022, 48.8742524274386], [2.35697183262588, 48.8742516625425], [2.35736081459492, 48.8741035230477], [2.35736312105748, 48.8741024176661], [2.35736502871093, 48.8741010201194], [2.35736645418208, 48.8740993914869], [2.35736733517134, 48.8740976029473], [2.35736763317549, 48.874095732668], [2.35736763309496, 48.8737994523995], [2.35736733508903, 48.8737975821123], [2.35736645409672, 48.8737957935659], [2.35736502862184, 48.8737941649288], [2.35736312096472, 48.8737927673804], [2.35736081449945, 48.8737916620005], [2.35705698733778, 48.8736759517743], [2.35727821724182, 48.8732461337602], [2.35735399593214, 48.8732172737669], [2.35773615939748, 48.8733628190925], [2.35773876382714, 48.8733635839888], [2.35774155242944, 48.8733639749809], [2.35774440333019, 48.8733639749809], [2.3577471919325, 48.8733635839888], [2.35774979636218, 48.8733628190926], [2.35813877833123, 48.8732146769505], [2.35814108475308, 48.8732135715686], [2.35814299237286, 48.8732121740217], [2.35814441781885, 48.8732105453888], [2.35814529879256, 48.8732087568488], [2.35814559679145, 48.8732068865691], [2.35814559671092, 48.8729106010061], [2.3581452987099, 48.8729087307173], [2.35814441773212, 48.8729069421696], [2.35814299228079, 48.8729053135314], [2.3581410846553, 48.8729039159824], [2.35813877822845, 48.8729028106025], [2.35775661474062, 48.8727572639832], [2.35775661466291, 48.8724713629639], [2.35813877821043, 48.8723258149691], [2.35814108459142, 48.872324709587], [2.35814299217741, 48.8723233120399], [2.35814441759815, 48.8723216834068], [2.35814529855625, 48.8723198948665], [2.35814559654987, 48.8723180245864], [2.3581455964709, 48.8720269273404], [2.35852776007859, 48.8718813780222], [2.35853006643923, 48.87188027264], [2.35853197400838, 48.8718788750927], [2.35853339941654, 48.8718772464594], [2.35853428036687, 48.871875457919], [2.35853457835785, 48.8718735876387], [2.35853457827733, 48.8715772941338], [2.35853428028421, 48.8715754238446], [2.35853339932981, 48.8715736352964], [2.35853197391631, 48.8715720066578], [2.35853006634145, 48.8715706091084], [2.35852775997581, 48.8715695037282], [2.35814559630702, 48.8714239531386], [2.35814559622776, 48.8711328505678], [2.35814529823729, 48.8711309802784], [2.35814441729073, 48.8711291917302], [2.3581429918899, 48.8711275630915], [2.358141084332, 48.8711261655421], [2.35813877798687, 48.8711250601618], [2.35775661425746, 48.8709795082487], [2.3577566141782, 48.8706884030308], [2.35775631619038, 48.8706865327414], [2.35775543525165, 48.8706847441931], [2.3577540098635, 48.8706831155543], [2.35775210232255, 48.8706817180048], [2.35774979599792, 48.8706806126245], [2.35736081410941, 48.870532462586], [2.3573582098086, 48.8705316976758], [2.35735542134068, 48.8705313066759], [2.35735257057596, 48.870531306675], [2.35734978210746, 48.8705316976731], [2.35734717780551, 48.8705324625816], [2.35708935217171, 48.8706306596583], [2.35658966828633, 48.8702999902874], [2.35658966827252, 48.8702491451354], [2.3569718321228, 48.8701035905229], [2.35697413840142, 48.8701024851406], [2.35697604590274, 48.870101087593], [2.35697747126021, 48.8700994589595], [2.35697835217921, 48.8700976704187], [2.3569786501596, 48.8700958001381], [2.35697865007907, 48.8697994960439], [2.35697835209655, 48.8697976257543], [2.35697747117349, 48.8697958372058], [2.35697604581068, 48.8697942085669], [2.35697413830365, 48.8697928110173], [2.35697183202004, 48.8697917056369], [2.35658285013152, 48.8696435529511], [2.3565802458744, 48.8696427880403], [2.35657745745321, 48.8696423970405], [2.35657460673645, 48.8696423970405], [2.35657181831527, 48.8696427880403], [2.35656921405818, 48.8696435529512], [2.35618705016678, 48.8697891088658], [2.35580488627441, 48.8696435529516], [2.35580228201747, 48.8696427880408], [2.35579949359646, 48.8696423970411], [2.35579664287989, 48.8696423970411], [2.35579385445889, 48.8696427880409], [2.35579125020198, 48.8696435529517], [2.35540908631012, 48.8697891088664], [2.35503374039365, 48.8696461497538], [2.3550337403144, 48.8693550365939], [2.35503344233456, 48.8693531663045], [2.35503256141945, 48.8693513777562], [2.3550311360695, 48.8693497491174], [2.35502922857969, 48.869348351568], [2.35502692231688, 48.8693472461876], [2.35463794042836, 48.8691990921781], [2.35463533619474, 48.8691983272674], [2.35463254779871, 48.8691979362676], [2.35462969710767, 48.8691979362677], [2.35462690871165, 48.8691983272674], [2.35462430447807, 48.8691990921782], [2.35424214052514, 48.8693446494167], [2.35385997657125, 48.8691990921787], [2.35385737233781, 48.869198327268], [2.35385458394196, 48.8691979362682], [2.35385173325111, 48.8691979362683], [2.35384894485528, 48.869198327268], [2.35384634062186, 48.8691990921787], [2.35345735873425, 48.8693472461886], [2.3534550524716, 48.8693483515688], [2.35345314498194, 48.8693497491182], [2.35345171963213, 48.8693513777568], [2.35345083871714, 48.869353166305], [2.35345054073743, 48.8693550365943], [2.35345054065691, 48.8696513433351], [2.35345083863449, 48.8696532136154], [2.35345171954541, 48.8696550021559], [2.35345314488988, 48.8696566307892], [2.35345505237383, 48.8696580283365], [2.35345735863148, 48.8696591337186], [2.35383952254326, 48.8698046896555], [2.353839522464, 48.8700958001378], [2.35383982044592, 48.8700976704232], [2.35384070136959, 48.8700994589681], [2.35384212673444, 48.8701010876046], [2.35384403424517, 48.8701024851532], [2.35384634053433, 48.8701035905343], [2.35386186262595, 48.8701095024284], [2.35354371098657, 48.8705601577211], [2.35347099479447, 48.8705324625774], [2.35346839049548, 48.8705316976726], [2.3534656020312, 48.8705313066771], [2.35346275127145, 48.8705313066795], [2.35345996280866, 48.8705316976795], [2.35345735851259, 48.8705324625887], [2.35306837662497, 48.8706806126275], [2.35306607030112, 48.8706817180074], [2.35306416276084, 48.8706831155565], [2.3530627373732, 48.8706847441947], [2.35306185643483, 48.8706865327424], [2.35306155844721, 48.8706884030312], [2.35306155836825, 48.8709795082508], [2.35267939463648, 48.8711250601653], [2.35267708829227, 48.8711261655452], [2.35267518073516, 48.871127563094], [2.35267375533494, 48.871129191732], [2.3526728743888, 48.8711309802795], [2.35267257639855, 48.8711328505681], [2.35267257631959, 48.871423953141]]]
        }
    },
    "workingcount" : 7321
}
Value Type Usage
success boolean True if the call was succesfull
workingcount integer The number of estimated poeple reguraly working in the zone
workingcount geojson A Geojson Feature object containing a Polygon or Multipolygon describing the actual zone that were used to measure poeples presence. It matches the standard grid of Roofstreet and may differ from the requested zone for a up to 50 meters
isochronic zone with the count of working poeple

Usage / Example

With basic auth :

# returns the number of inhabitants at a 7 minutes walking distance from a point
curl --user 'APIKEY:APISECRET' --basic  "https://tern.retail.roofstreet.io/api/v1/workingcount?lon=3.057256&lat=50.62925&travel=pedestrian&time=420"

Auth in URL :

# returns the number of inhabitants at a 7 minutes walking distance from a point
curl "https://tern.retail.roofstreet.io/api/v1/workingcount?lon=3.057256&lat=50.62925&travel=pedestrian&time=420&apikey=APIKEY&apisecret=APISECRET"

Self provided geojson :

# returns the number of inhabitants of a giving zone
curl -g  'https://tern.retail.roofstreet.io/api/v1/workingcount?apikey=APIKEY&apisecret=APISECRET&zone={"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[2.3546065957411897,48.87278048205041],[2.3546188093369156,48.87279498282275],[2.354635286948723,48.87280752660858],[2.3546065957411897,48.87278048205041]]]}}'

Performance

A first call to that service (first time with specific parameters) could take up to few seconds (tenth of seconds for very wide zones).

Subsequent calls with same parameters will take about 300 ms.