Plot foot traffic data through JSON API on map

139
0
07-29-2021 02:40 AM
Labels (1)
RichardHann
New Contributor

Hi all,


Maybe I've set the bar too high as a ArcGIS newby, but I want to plot JSON data from a public API on a map.
I've tried to google for resources but I mostly end up with info on the ArcGIS API or JSON GEO map exports.

I want to use the foot traffic data from https://besttime.app software API. Their API provides JSON responses with foot traffic data for venues in a specific area for each hour of the day. It would be really cool to make something in ArcGIS like the demo they have on their website.

Can anybody point me in the right direction with resources on how I can load JSON data from an HTTP API request and plot this in ArcGIS?

This is the BestTime API documentation.
https://documentation.besttime.app/?javascript#query-filtered-venues-radar

Can I just make a cURL request in ArcGIS or do this in Python?

Not sure if I should post this in this section or in the developers section?

Request example

curl --location --request GET 'https://besttime.app/api/v1/venues/filter?api_key_private=pri_50990bf1f8828f6abbf6152013113c6b&busy_min=50&busy_max=100&hour_min=18&hour_max=23&hour_conf=any&types=BAR,CAFE,RESTAURANT&lat=51.5121172&lng=-0.126173&radius=2000&order_by=day_rank_max%2Creviews&order=asc%2Cdesc&foot_traffic=limited&limit=20&page=0'

Response example

{
  "status": "OK", 
  "venues": [
    {
      "day_int": 0, 
      "day_raw": [
        85,
        60,
        30,
        10,
        0,
        0
      ], 
      "day_raw_whole": [
        0,
        0,
        0,
        0,
        10,
        15,
        15,
        15,
        20,
        25,
        45,
        70,
        85,
        60,
        30,
        10,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0
      ], 
      "venue_address": "61 Piccadilly Mayfair, London W1J 0DY United Kingdom", 
      "venue_id": "ven_386d55494f76464873784752676b6445593949455752594a496843", 
      "venue_lat": 51.5079836, 
      "venue_lng": -0.1404946, 
      "venue_name": "Caffe Concerto Green Park",
      "venue_type": "CAFE",
      "venue_dwell_time_min": 30,
      "venue_dwell_time_max": 70,
      "price_level": 2,
      "rating": 4.8,
      "reviews": 1276,
    }, 
    {
      "day_int": 0, 
      "day_raw": [
        75,
        95,
        95,
        70,
        0,
        0
      ],
      "day_raw_whole": [
        0,
        0,
        15,
        25,
        35,
        40,
        45,
        45,
        40,
        35,
        40,
        55,
        75,
        95,
        95,
        70,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0
      ],
      "venue_address": "14 Riding House St Fitzrovia, London W1W 7HR United Kingdom", 
      "venue_id": "ven_6372542d36476a4a59686d52676b646155646e713661514a496843", 
      "venue_lat": 51.5183082, 
      "venue_lng": -0.1415526, 
      "venue_name": "The Great Thai Restaurant",
      "venue_type": "RESTAURANT",
      "venue_dwell_time_min": 40,
      "venue_dwell_time_max": 80,
      "price_level": 3,
      "rating": 4.1,
      "reviews": 4276,
    }
  ]
}

 

0 Kudos
0 Replies