bookwhen / opendata

Documentation, Changelog and Issues related to the Bookwhen RPDE endpoint
0 stars 1 forks source link

Timezone distribution in sub event #3

Closed alza-bitz closed 6 years ago

alza-bitz commented 7 years ago

Hi there, I downloaded your data and ran a query to see the distribution of timezones in the items, this is what I got:

[alex@deneb 2017-10-06T14:15:00Z]$ cd ~/Projects
[alex@deneb 2017-10-06T14:15:00Z]$ git clone https://github.com/imin-ltd/rpde-scripts.git
[alex@deneb 2017-10-06T14:15:00Z]$ cd ~/Projects/rpde-scripts
[alex@deneb 2017-10-06T14:15:00Z]$ mkdir -p provider/bookwhen/2017-10-06T14:15:00Z
[alex@deneb 2017-10-06T14:15:00Z]$ cd provider/bookwhen/2017-10-06T14:15:00Z
[alex@deneb 2017-10-06T14:15:00Z]$ pwd
/home/alex/Projects/rpde-scripts/provider/bookwhen/2017-10-06T14:15:00Z
[alex@deneb 2017-10-06T14:15:00Z]$ ../../../walk-rpde.sh https://bookwhen.com/api/openactive/event_types

...wait...

[alex@deneb 2017-10-06T14:15:00Z]$ jq -s '[.[].items[] | select(.state == "updated" and all(.data.subEvent[]; has("startDate"))) | .data.subEvent[].startDate | match(".{19}(.*)")] | 
[{zone: .[].captures[].string}] | 
group_by(.zone) | 
[.[] | {zone: unique_by(.zone)| .[].zone, count: length}]' rpde-*.json
[
  {
    "zone": "+00:00",
    "count": 29
  },
  {
    "zone": "+01:00",
    "count": 67
  },
  {
    "zone": "+02:00",
    "count": 20
  },
  {
    "zone": "+03:00",
    "count": 21
  },
  {
    "zone": "-04:00",
    "count": 63
  },
  {
    "zone": "-05:00",
    "count": 12
  }
]

Please can you explain what's going on with your data here?

Thanks!

gregjoy1 commented 6 years ago

Hi Alex, Thanks for your interest in Bookwhen's OpenActive feed. Your question is quite open ended I'm afraid and I'm not sure what it is you are asking exactly? I also dont have access to walk-rpde.sh so I dont know exactly what it is returning. Also it appears that the OA feed returns some dates formatted like 2015-04-22 (which wont match /.{19}(.*)/) and some formatted like 2014-05-31T11:15:00Z which will match. Which may explain your limited results, if thats whats your asking?