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:

FieldTypeDescriptionExample
venueidStringThe Foursquare venue identifier.4bf58dd8d48988d143941735
venuenameStringVenue NameCostco
translatedvenuenamesStringTranslated Venue NamesDe-Costo
latitudeDouble / FloatLatitude of Venue50.93282415872781
longitudeDouble / FloatLongitude of Venue5.340326224457871
addressStringAddress with number and streetWitte Nonnenstraat 19
cityStringCitySan Francisco
dmaStringDesignated Market Area, as defined by Nielsen.San Francisco
stateStringStateCalifornia
postcalcodeStringPostal code94103
countrycodeStringCountry codeUS
date_createdStringDate of venue creation2009-11-22
date_approximateclosedStringDate of venue closure2019-01-01
score_opencloseStringLikelihood of venue being closed: Very High, High, LowVery High
category_primaryidStringString for primary category ID4bf58dd8d48988d149941735
category_primaryStringString for primary categoryThai Restaurants
category_secondaryidStringString for secondary category ID4bf58dd8d48988d1c4941735
category_secondaryStringString for secondary categoryRestaurants
phonenumberStringPhone Number6046828038
urlStringURL for given venuehttps://worksburger.com/locations/manor-park/
chainidStringVenue Chain Identifier556ce426aceaff43eb04e8a0
chainnameStringChain Name24 Hour Fitness
seasonal_hoursJSON Array with following: Start Date, End Date, Weekly Hours, ClosedSeasonal hours provides detailed information regarding the seasonal operating hours of a venue.Please see appendix
hoursJSON Array with following: Day, Start Time, End TimeHoursPlease 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.


Did this page help you?