Skip to content

Tracking Places Growth

Chad Lawlis edited this page Oct 1, 2015 · 6 revisions

Visuals

When seeding data for a park, especially a park significantly lacking coverage in Places, best practice is to capture before and after screenshots as a tangible record of Places growth.

Targeting

The areas most suitable for capturing screenshots depend on both current Places coverage and the geographic reach of the data seed. Target the areas housing the highest concentration of new data, especially the areas in which Places coverage is significantly lacking. The blanker the slate to begin with, the more impactful the "after" image will be.

Capturing

Screenshots can be captured either through Mapshot, using either X-Ray View or Park Tiles 3, or directly in Places Editor. Mapshot is preferable, given the parameters available directly through the URL (image height, width, zoom, lat, lon), while Places Editor is only useful insofar as the browser window size is manually maintained.

Capture "before" and "after" screenshots for each targeted region, along with a full view of the park (note that not all data will render at the high zoom level required to capture the entire park).

Mapshot

For each area of interest, adjust the height and width of the viewer to best fit the data seed coverage, using the sliders. Keep in mind that these images will be used to show tangible progress in Places, so 300px x 300px is probably a good minimum standard (we can always scale down without losing resolution, but can't scale up). Make sure the map is zoomed in far enough to capture the new data if using Park Tiles 3, based on the Park Tiles 3 style (i.e. the feature types will render at the selected zoom level). Make sure either X-Ray View or Park Tiles 3 is selected as the basemap and the Export retina? box is checked. Once all parameters have been set appropriately select Snap which will snap the screenshot and display it in a new tab. Copy both the Mapshot interface and output screenshot URLs, and save the .png locally (for upload to GitHub).

With the "before" image Mapshot URL on file, capturing the "after" image is as easy as returning to the same URL once the data seed is complete and it is live in Park Tiles. Repeat the process, saving the screenshot URL and output .png.

Places Editor

Follow the same process as for Mapshot, with the only difference being the need to manually record the size of the browser window when capturing each screenshot (this is not included as a parameter in the URL). A good place to do this is in the park's data-seeding README. This is a serious disadvantage compared with Mapshot, in terms of ensuring consistency between "before" and "after" images, while the one advantage is the amount of data rendered at each zoom level (the Editor preview map is intentionally designed to expose more data).

Storing

These images are currently being stored in the data-seeding directory in places-data. Create a separate directory for each park, including the park's unit code followed by the date of seeding in the directory name (e.g. thro_20150914), and include a README along with an img directory to house the actual images. The README should include Mapshot and output image URLs to enable image replication for the "after" shot and any further after shots moving forward. If using Editor, make sure to record the browser window size. The date of seeding and a link to the places-data should also be included.

Use case

These images will primarily be used in blog posts and other communications around Places growth.

Statistics

Tracking the number of geometries by feature type added to Places since the data call (July 31st, 2015).

Points

SELECT Count(*) 
FROM   (SELECT osm_id, 
               (SELECT created_time 
                FROM   api_element_info 
                WHERE  nps_render_point.osm_id = api_element_info.id 
                       AND api_element_info.geometry = 'n') AS ct 
        FROM   nps_render_point) x 
WHERE  ct >= '2015-07-31'; 

Areas

Buildings

SELECT Count(*) 
FROM   (SELECT osm_id, 
               superclass, 
               class, 
               type, 
               (SELECT created_time 
                FROM   api_element_info 
                WHERE  ( nps_render_polygon.osm_id = api_element_info.id 
                         AND api_element_info.geometry = 'w' ) 
                        OR ( nps_render_polygon.osm_id *- 1 = 
                             api_element_info.id 
                             AND api_element_info.geometry = 'r' )) AS ct 
        FROM   nps_render_polygon) x 
WHERE  ct >= '2015-07-31' 
       AND superclass = 'building'; 

Parking Lots:

SELECT Count(*) 
FROM   (SELECT osm_id, 
               superclass, 
               class, 
               type, 
               (SELECT created_time 
                FROM   api_element_info 
                WHERE  nps_render_polygon.osm_id = api_element_info.id 
                       AND ( api_element_info.geometry = 'w' 
                              OR api_element_info.geometry = 'r' )) AS ct 
        FROM   nps_render_polygon) x 
WHERE  ct >= '2015-07-31' 
       AND superclass = 'parking';

Lines

Roads:

SELECT Count(*) 
FROM   (SELECT osm_id, 
               superclass, 
               class, 
               type, 
               (SELECT created_time 
                FROM   api_element_info 
                WHERE  nps_render_line.osm_id = api_element_info.id 
                       AND api_element_info.geometry = 'w') AS ct 
        FROM   nps_render_line) x 
WHERE  ct >= '2015-07-31' 
       AND superclass = 'road'; 

Trails:

SELECT Count(*) 
FROM   (SELECT osm_id, 
               superclass, 
               class, 
               type, 
               (SELECT created_time 
                FROM   api_element_info 
                WHERE  nps_render_line.osm_id = api_element_info.id 
                       AND api_element_info.geometry = 'w') AS ct 
        FROM   nps_render_line) x 
WHERE  ct >= '2015-07-31' 
       AND superclass = 'trail';