openactive-archive / conformance-services

Harvests and normalises OpenActive Opportunity feeds to a common representation
MIT License
0 stars 0 forks source link

RPDE feed has data in that looks like a string has been turned into a array/dict #85

Closed odscjames closed 3 years ago

odscjames commented 3 years ago
{"next":"/normalised_data/all?afterTimestamp=1595411451&afterId=a72278133fd8ba056c37e5968fe75b90f84094cc","items":[{"state":"updated","kind":"ScheduledSession","id":"0232dc69af41ab66db388016e5d1a6af7d83672a","modified":"2020-07-22T09:50:44.304Z","data":{"0":"h","1":"t","2":"t","3":"p","4":"s","5":":","6":"/","7":"/","8":"n","9":"c","10":"c","11":".","12":"l","13":"e","14":"i","15":"s","16":"u","17":"r","18":"e","19":"c","20":"l","21":"o","22":"u","23":"d","24":".","25":"n","26":"e","27":"t","28":"/","29":"O","30":"p","31":"e","32":"n","33":"A","34":"c","35":"t","36":"i","37":"v","38":"e","39":"/","40":"a","41":"p","42":"i","43":"/","44":"s","45":"e","46":"s","47":"s","48":"i","49":"o","50":"n","51":"-","52":"s","53":"e","54":"r","55":"i","56":"e","57":"s","58":"/","59":"H","60":"R","61":"E","62":"S","63":"0","64":"0","65":"0","66":"0","67":"8","68":"3","69":"1","@id":"https://ncc.leisurecloud.net/OpenActive/api/scheduled-sessions/11375099","@type":"ScheduledSession","endDate":"2020-07-29T13:30:00Z","@context":["https://openactive.io/","https://openactive.io/ns-beta"],"duration":"PT1H","startDate":"2020-07-29T12:30:00Z","identifier":11375099,"maximumAttendeeCapacity":20,"remainingAttendeeCapacity":20,"beta:sportsActivityLocation":[{"name":"H.H.S.V. Lane 6 - North","type":"SportsActivityLocation"}]}},

Note it has both

So I think it's something in a specific pipe. It doesn't occur in all data - next one in feed is fine

,{"state":"updated","kind":"Event","id":"0e506ae5819fd233f68b66dc92093d234dedeb06","modified":"2020-07-22T09:50:44.492Z","data":{"url":"https://www.britishtriathlon.org/events/hole-park-mtb-duathlon_6063?utm_source=openactive&utm_medium=referral","name":"Hole Park Super MTB Duathlon Team","@type":"HeadlineEvent","@context":["https://openactive.io/"],"activity":[{"id":"https://openactive.io/activity-list#7a0d4399-d7a2-43e4-b9dc-5bf88c7a7eea","type":"Concept","inScheme":"https://openactive.io/activity-list","prefLabel":"Duathlon"}],"duration":"P1D","location":{"geo":{"type":"GeoCoordinates","latitude":51.06,"longitude":0.61},"name":"Hole Park","type":"Place","address":{"type":"PostalAddress","postalCode":"TN17 4JB","addressRegion":"Kent","streetAddress":"Hole Park, Benenden Road, Rolvenden","addressCountry":"GB","addressLocality":"Cranbrook"},"amenityFeature":[{"name":"Toilets","type":"Toilets","value":true}]},"organizer":{"name":"Tri Spirit Events","type":"Organization"},"startDate":"2016-04-03","identifier":"race-25982","description":"Returning for the 3rd year Hole Park MTB Duathlon will take place at Hole Park, Nr Rolvenden, Cranbrook, Kent on Sunday 29th March 2015 starting at 9am.With three different events to choose from Hole Park MTB Duathlons will be held within the picturesque award-winning gardens and grounds of Hole Park with views of the Weald of Kent and as fair reaching as Hastings. The run section takes in views of Hole Park orchards, while the MTB section passes through fords, crosses bridges and over fields with some testing sections to spark up the fun. This event is ideal for everyone from the beginner MTB duathlete to proven professionals.Facilities available for competitors are changing areas, on-site tearoom with home-baked food using fresh local produce, chip timing, onsite bike mechanic, bike wash area, on-site camping (additional fee), toilets, goody bags, event t-shirt, medal and prizes. Free entry for all to browse Hole Park gardens and free parking.","eventStatus":"https://schema.org/EventScheduled","btf:raceTypes":["Cross Duathlon"],"btf:eventFeatures":["Numbered racking","Secure transition","Traffic free","Aid stations","Distance markers","Results on website","Chip Timing","Catering","Camping"],"genderRestriction":"https://openactive.io/NoRestriction","btf:componentEvent":[{"name":"run","type":"btf:EventComponent","activity":[{"id":"https://openactive.io/activity-list#72ddb2dc-7d75-424e-880a-d90eabe91381","type":"Concept","inScheme":"https://openactive.io/activity-list","prefLabel":"Running"}],"btf:order":1,"identifier":"stage-59304","beta:distance":{"type":"QuantifiedValue","value":10000,"unitCode":"MTR"}},{"name":"bike","type":"btf:EventComponent","activity":[{"id":"https://openactive.io/activity-list#4a19873e-118e-43f4-b86e-05acba8fb1de","type":"Concept","inScheme":"https://openactive.io/activity-list","prefLabel":"Cycling"}],"btf:order":2,"identifier":"stage-59303","beta:distance":{"type":"QuantifiedValue","value":39000,"unitCode":"MTR"}},{"name":"run","type":"btf:EventComponent","activity":[{"id":"https://openactive.io/activity-list#72ddb2dc-7d75-424e-880a-d90eabe91381","type":"Concept","inScheme":"https://openactive.io/activity-list","prefLabel":"Running"}],"btf:order":3,"identifier":"stage-59302","beta:distance":{"type":"QuantifiedValue","value":10000,"unitCode":"MTR"}}]}},
rhiaro commented 3 years ago

This is because subEvent/superEvent processing only works on embedded rather than reference-by-URL at the moment, but the code doesn't actually check it's an embedded object.

rhiaro commented 3 years ago

Normalisations