Skip to content
This repository has been archived by the owner on Jan 23, 2019. It is now read-only.

Latest commit

 

History

History
35 lines (20 loc) · 1.23 KB

README.md

File metadata and controls

35 lines (20 loc) · 1.23 KB

Represent API: Images

Represent is the open database of Canadian elected officials and electoral districts. It provides a REST API to boundary, representative, and postcode resources.

This repository stores scripts to extract images from the database. The represent-canada repository is what's running at represent.opennorth.ca.

Usage

Download and resize images:

bundle
rake download
rake resize

You now have the original images in images/original and 60x90 images in 60x90. 60x90 was chosen because the smallest image is 63 pixels wide and 95 pixels high and the most common aspect ratio is 2:3.

Consult the image sizes and aspect ratios:

rake sizes
rake ratios

Create an HTML page with all the 60x90 images:

rake html
open images.html

Remove all images:

rake clean

Contributing

If you would like to retrieve more photos with these scripts, improve our Canadian legislative scrapers to scrape images from legislative websites.

Copyright (c) 2014 Open North Inc., released under the MIT license