Seasonal Hours
Seasonal Hours - Data Delivery
File Details
The fields below are all exported as strings, but we recommend creating a schema based on the following types:
Field | Type | Description | Example |
---|---|---|---|
venueid | String | The Foursquare venue identifier. | 4bf58dd8d48988d143941735 |
venuename | String | Venue Name | Costco |
translatedvenuenames | String | Translated Venue Names | De-Costo |
latitude | Double / Float | Latitude of Venue | 50.93282415872781 |
longitude | Double / Float | Longitude of Venue | 5.340326224457871 |
address | String | Address with number and street | Witte Nonnenstraat 19 |
city | String | City | San Francisco |
dma | String | Designated Market Area, as defined by Nielsen. | San Francisco |
state | String | State | California |
postcalcode | String | Postal code | 94103 |
countrycode | String | Country code | US |
date_created | String | Date of venue creation | 2009-11-22 |
date_approximateclosed | String | Date of venue closure | 2019-01-01 |
score_openclose | String | Likelihood of venue being closed: Very High, High, Low | Very High |
category_primaryid | String | String for primary category ID | 4bf58dd8d48988d149941735 |
category_primary | String | String for primary category | Thai Restaurants |
category_secondaryid | String | String for secondary category ID | 4bf58dd8d48988d1c4941735 |
category_secondary | String | String for secondary category | Restaurants |
phonenumber | String | Phone Number | 6046828038 |
url | String | URL for given venue | https://worksburger.com/locations/manor-park/ |
chainid | String | Venue Chain Identifier | 556ce426aceaff43eb04e8a0 |
chainname | String | Chain Name | 24 Hour Fitness |
seasonal_hours | JSON Array with following: Start Date, End Date, Weekly Hours, Closed | Seasonal hours provides detailed information regarding the seasonal operating hours of a venue. | Please see appendix |
hours | JSON Array with following: Day, Start Time, End Time | Hours | Please see appendix |
Notes:
- Null values are expressed in empty quotes e.g. “”
- Hours and seasonal hours are escaped for ease of parsing. If you wish to have no escapes, please let us know and we can remove them.
- All fields are encased in quotes
About Seasonal Hours
The seasonal hours column is a JSON object, the raw schema looks like this:
array<struct<startdate:struct<month:int,day:int,year:int>,enddate:struct<month:int,day:int,year:int>,weeklyhours:array<struct<day:int,starttime:int,endtime:int,label:string>>,closed:boolean>>
Depending on the database you are using, we recommend using an Array data type, or some version of Variant or Varchar, whatever is supported. Reading this as a string is not recommended. The length of this field can also be quite long, we recommend 10,000 characters as a max length.
In the array of struct, you will see start date, end date, hours of the week and then a boolean individicating if the venue is closed.
Below is an example of what this looks like after you upload to your database:
[{"startdate":{"month":3,"day":1,"year":null},"enddate":{"month":3,"day":31,"year":null},"weeklyhours":[{"day":1,"starttime":540,"endtime":1020,"label":null},{"day":2,"starttime":540,"endtime":1020,"label":null},{"day":3,"starttime":540,"endtime":1020,"label":null},{"day":4,"starttime":540,"endtime":1020,"label":null},{"day":5,"starttime":540,"endtime":1020,"label":null},{"day":6,"starttime":540,"endtime":1020,"label":null},{"day":7,"starttime":540,"endtime":1020,"label":null}],"closed":false}]
Within a given array can be multiple structs with information associated to the start and end date, you can look at it like this:
{
"startdate":{"month":3,"day":1,"year":null},
"enddate":{"month":3,"day":31,"year":null},
"weeklyhours":[
{"day":1,"starttime":540,"endtime":1020,"label":null},
{"day":2,"starttime":540,"endtime":1020,"label":null},
{"day":3,"starttime":540,"endtime":1020,"label":null},
{"day":4,"starttime":540,"endtime":1020,"label":null},
{"day":5,"starttime":540,"endtime":1020,"label":null},
{"day":6,"starttime":540,"endtime":1020,"label":null},
{"day":7,"starttime":540,"endtime":1020,"label":null}
],
"closed":false
}
Hours of the week are stored as integers representing the number of minutes in a day, in military time, i.e 1200 (20 hours x 60 minutes). 24 hours could be represented as 1440 (24 hours x 60).
From the example above, from 3/1/2020 to 3/31/2020, day 1 (Monday) has the hours of 9am-5pm (540/60 = 9am , 1020/60 = 17 - 12 = 5pm), day 2 (Tuesday) is the same, and so on. The final key in this struct, "closed" is True in this case, which means that during this start and end date, the venue is closed
It is possible to see multiple structs with different start and end dates, here is an example of this:
{"startdate":{"month":3,"day":19,"year":null},"enddate":{"month":3,"day":19,"year":null},"weeklyhours":[{"day":4,"starttime":540,"endtime":1020,"label":null}],"closed":false}
{"startdate":{"month":3,"day":20,"year":null},"enddate":{"month":3,"day":20,"year":null},"weeklyhours":[{"day":5,"starttime":540,"endtime":1020,"label":null}],"closed":false}
{"startdate":{"month":3,"day":21,"year":null},"enddate":{"month":3,"day":21,"year":null},"weeklyhours":[{"day":6,"starttime":0,"endtime":1440,"label":null}],"closed":true}
{"startdate":{"month":3,"day":22,"year":null},"enddate":{"month":3,"day":22,"year":null},"weeklyhours":[{"day":7,"starttime":0,"endtime":1440,"label":null}],"closed":true}
{"startdate":{"month":3,"day":23,"year":null},"enddate":{"month":3,"day":23,"year":null},"weeklyhours":[{"day":1,"starttime":0,"endtime":1440,"label":null}],"closed":true}
Meaning: open from 9am - 5pm on March 19 & 20. Closed on March 21, 22 & 23.
Appendix
Raw Seasonal Hours Format:
"[{\"startdate\":{\"month\":1,\"day\":1},\"enddate\":{\"month\":1,\"day\":1},\"weeklyhours\":[{\"day\":3,\"starttime\":720,\"endtime\":1320}],\"closed\":false},{\"startdate\":{\"month\":12,\"day\":24},\"enddate\":{\"month\":12,\"day\":24},\"weeklyhours\":[{\"day\":2,\"starttime\":660,\"endtime\":900}],\"closed\":false},{\"startdate\":{\"month\":12,\"day\":26},\"enddate\":{\"month\":12,\"day\":26},\"weeklyhours\":[{\"day\":4,\"starttime\":660,\"endtime\":1320}],\"closed\":false},{\"startdate\":{\"month\":12,\"day\":31},\"enddate\":{\"month\":12,\"day\":31},\"weeklyhours\":[{\"day\":2,\"starttime\":660,\"endtime\":1200}],\"closed\":false}]"
Raw Hours Format:
"[{\"day\":1,\"starttime\":330,\"endtime\":1260},{\"day\":2,\"starttime\":330,\"endtime\":1260},{\"day\":3,\"starttime\":330,\"endtime\":1260},{\"day\":4,\"starttime\":330,\"endtime\":1260},{\"day\":5,\"starttime\":330,\"endtime\":1260},{\"day\":6,\"starttime\":330,\"endtime\":1260},{\"day\":7,\"starttime\":330,\"endtime\":1260}]"
If you have any further questions, please reach out to your Foursquare representative.
Updated 6 months ago