"What defines whether a gym is in a park?: An analysis of 49 Ex-Raid locations in Western Australia"
#PokemonGO: Background:There have been some studies posted relating EX Raids to OpenStreetMap (OSM) tags. The most significant was an analysis by /u/LimboMon looking at OSM tags of 73 EX Raid gyms in Singapore. The vast majority of gyms corresponded with nests. One of the gyms was not currently tagged, but was tagged as leisure=recreation_ground in January when the last nest update occurred, suggesting that Niantic may be using older data for their definitions of parks. A Silph Road report in December determined that ~80% of EX Raids occurred in either parks or sponsored gyms, with 20% from universities, statues, monuments or churches. However this data was collected through a survey and the respondents likely does not consider the OSM tags associated with their gyms. For example, a statue might be in a location which is marked in OSM as landuse=grass. A gym which happened in my state this month was at a university, but when looking at OSM that gym actually lined up with a small park within the university grounds. There has been limited other significant research in this area. One of the challenges in this research area is that people are often unwilling to share their data as they fear it will lead to spoofers targeting their EX raid capable gyms. Additionally, analysis of third-party data has been complicated by people posting partial information (e.g. not stating whether EX Raids were before or after trial period, not stating whether they were looking at current OSM tags or historical OSM tags, not stating which OSM tags they checked, etc.) Recently I had been working on generating maps to show which gyms were in nest areas ("parks") using data from OSM. (For more information on this, see my post with instructions here. I sought to verify my map by comparing it to historical EX raid data. The following is a summary of my findings to date. Methodology:The area studied includes Perth and Mandurah (total pop. 2 million) and the regional city of Bunbury (pop. 70,000) in Western Australia. Combined these cities have over 2700 gyms. There are no sponsored gyms in Australia. Data about EX Raids was collected from the primary social networks used in each region: Discord in Perth/Mandurah and Facebook in Bunbury. I have a very high confidence in the completeness of the Bunbury EX Raid data due to the small close-knit raiding community. The Perth EX Raid data may be missing some EX Raids due to the much larger population and chance of local raiding groups who do not use the city-wide Discord. EX Raids in the dataset were restricted to those which occurred after Niantic’s late November announcement (see table below): EX Raid DatePerth/Mandurah EX RaidsBunbury EX RaidsDecember 1190December 18172December 25212 Overall the dataset included 51 EX Raids from 49 different gyms. One gym had raids on both Dec 11 and Dec 25. One gym had two EX Raids on December 25 – one from 12pm-12:45pm and another from 1:30pm-2:15pm (I haven’t seen reports on Reddit before about a single gym hosting multiple EX Raids in a single day so I found this quite interesting). For finding the OSM tags for each EX Raid gym I used the methodology described here. The OSM data was backdated to January 22, 2017. The results table below includes a list of tags that were exported. Findings:Of the 49 EX Raid gyms that were analysed, my script identified that 46/49 occurred inside parks. Three gyms did not occur within a park: Kanangra Park, Tom Firth Park, Trevor Gribble Park East. In all three cases, the gym was located 1-2 metres outside of the OSM polygon for the park. A Google Map of these three parks and the gyms is available for closer inspection here: http://ift.tt/2DBZ3WR of Tags:Each gym was inspected to find out which OSM tag(s) was/were present. 44/46 gyms had one tag only, and two gyms had two tags (one leisure=park and landuse=grass, the other was leisure=park and leisure=nature_reserve). Of the total 2700 gyms across the three cities, 970 were classified under one or more of the OSM tags. The frequency of these tags in both regular gyms and EX Raid gyms is compared in the table below. Note that percentages add up to >100% as some gyms contained multiple tags. TagNumber of gyms (%)Number of EX raid gyms (%)leisure=park806 (83%)42 (91%)natural=scrub59 (6%)0 (0%)leisure=nature_reserve51 (5%)1 (2%)landuse=recreation_ground30 (3%)4 (9%)boundary=national_park22 (2%)0 (0%)leisure=pitch18 (2%)1 (2%)landuse=grass14 (1%)1 (2%)leisure=playground9 (1%)0 (0%)leisure=garden5 (0.6%)0 (0%)natural=heath3 (0.4%)0 (0%)leisure=golf_course2 (0.2%)0 (0%)landuse=meadow1 (0.1%)0 (0%) There were no gyms in the studied area with tags associated with landuse=farmland, landuse=farmyard, landuse=orchard, landuse=vineyard or leisure=recreation_ground. This data cannot provide any evidence about whether these tags can results in gyms being EX Raid capable. Overall the frequency of tags for EX Raid gyms seems roughly proportional to the tags within the greater gym population. Notably, however, there have been 0 EX Raids at natural=scrub or boundary=national_park gyms. There was one at leisure=nature_reserve, but this area was also tagged as leisure=park so it is technically possible it may have been selected for its park tag rather than its nature_reserve tag. I have read that natural=scrub only forms nests if it has paths on OSM, so some of the areas marked as natural=scrub may not actually be nests. Also, gyms associated with these tags are typically less frequented do to their location and accessibility. There are four gyms in a large natural=scrub nest area in Bunbury, for example, which are rarely frequented because they are out of the way, almost impossible to get numbers for raids, and there are mosquitos and ticks. If Niantic is favouring gyms based on popularity then that would have the side effect of decreasing EX Raids in areas that are less popular/accessible (natural=scrub, boundary=national_park, leisure=nature_reserve). TL;DR: It is possible that all nesting tags can lead to EX raids, but there is a bias towards tags associated with areas that are more accessible and heavily frequented. EX Raid Gyms which Border Parks: Explaining Tom Firth, Kanangra and Trevor Gribble ParkI was struck my how close all of these gyms were to their respective polygons. Given that the polygons used the nest data from January 2017, I checked to see if the EX Raids used either older data or more recent data, however there had been no modifications to the parks since before 2016. My next idea was to investigate s2 cells. s2 cells are a way of mapping a 3D globe on a one-dimensional line. They range in size from level 0 (globe sized) to level 30 (tiny). Niantic uses s2 cells extensively in Ingress and Pokemon Go. Below are some examples of where s2 cells are used to control aspects of Pokemon Go. (Much credit to /u/WoodWoseWulf who contributed about half of this stuff and who set a direction for future researchers including myself.) Capture location (level 10 s2 cells) (link)Weather (level 10? TBD) (link)Distribution of EX Raids (level 12 s2 cells) (link)Biomes (level 14 s2 cells) (link)Vision range on the map (level 16 s2 cells) (link)Locations of individual spawn points (level 20 s2 cells) (link) It occurred to me that Niantic probably does not store the information about the park as a set of latitudes and longitudes, but rather as a collection of s2 cells. Websites like http://ift.tt/2B6KH3m show how you can generate s2 cells to cover a given area. www.s2map.com isn’t working at the moment, but their about page shows an example of generating a similar shape for a custom polygon (http://ift.tt/2CnZsz6). Niantic could simply use the same library to generate the s2 cells covering the park, and by controlling the level they could control how closely the shape approximates the park. This could be how nests work in the first place. If a nest is defined by level 20 cells, and a spawnpoint sits at the centre of a level 20 cell (source), then all the server would have to do to check if a spawnpoint belongs to a nest is compare the level 20 s2 cell ID of the spawnpoint to a table of nest cell IDs and see if there is a match. They could have then adapted this to identify whether gyms are in parks. They could calculate the level 20 cell id of the gym and see if it matches a park. But in certain cases it is plausible that a gym OUTSIDE the border of the park could still fall INSIDE an s2 cell which covers the park. This led to me investigating what level s2 cells could be used to define these three parks while still including their respective gyms. Unfortunately, with s2map.com’s ‘show s2 covering’ function not working, I had to go about it the long way. I used the sidewalklabs region coverer to draw a rectangle over the park area, controlling the minimum and maximum cell size to achieve the level I want. I then took a screenshot of my custom Google Map, showing the park polygon and gym pin, at the same zoom. I overlayed the two in Photoshop and used 50% opacity to line up the images, then coloured s2 cells green if they included the park polygon or red if they did not. Here are the results:Parks2 cell levelImage linkSuccessTrevor Gribble ParkLevel 20https://i.imgur.com/LcQb67G.pngYesKanangra ParkLevel 20https://i.imgur.com/LspHJjz.pngYesTom Firth ParkLevel 20https://i.imgur.com/tYCJBfX.pngYesTom Firth ParkLevel 21https://i.imgur.com/PHzcNGf.pngNoUsing level 20 cells, all three gyms would fit inside the s2 covering of their respective parks. Using level 21 or higher would not work as it would fail the Tom Firth Park case. TL;DR: It is possible that the shape of parks is stored as level 20 s2 cells. This means in certain cases a gym which is slightly outside the OSM border of a park may actually be inside for EX Raid purposes. Conclusions:If my level 20 s2 cell hypothesis is correct, then 100% of EX Raid spawns in Perth, Mandurah and Bunbury, Western Australia can be explained in terms of OSM tags. Using this information we can make better tools to predict which gyms are capable of EX Raids so that we can be more efficient with our passes and avoid spending money on non-EX Raid gyms. Directions for Future Research:Land-use tags: We need more data to establish whether all nesting tags are capable of EX Raids. We also need to determine whether the EX Raids are using data from Jan 2017 (last nest update) or from Aug 2017 (when the visual map data was taken from) or a different date entirely. s2 cells defining nest borders: I only had three parks in my dataset that I could use to establish the idea that nests are defined by level 20 s2 cells. More EX raid gyms following a similar pattern would strengthen this hypothesis. Also, if a similar pattern is used to determine whether a spawnpoint is within a nest then it should be possible to find an examples of Pokemon spawnpoints which generates nest Pokemon despite being outside the borders of the nest. With many nests now being visually coloured dark green in-game, this should be possible to observe as a nest Pokemon spawning 1-2 metres outside the apparent border of the nest. Generating a new-and-improved map tool: The map I described in my earlier post has the potential to give false negatives when gyms are sitting on the outside border of parks. If someone could develop a tool that could take latitude and longitude inputs for a polygon, and generate the level 20 s2 cells that cover that polygon, then these false negatives could be eliminated. via /r/TheSilphRoad http://ift.tt/2EjaHa6
"What defines whether a gym is in a park?: An analysis of 49 Ex-Raid locations in Western Australia"
Reviewed by The Pokémonger
on
21:27
Rating:
No comments