TCCD project: postal code data processed
Using nodejs I've processed the original polygon-based data, which on investigation turned out to be highly problematic, into simple point-based data, using geojson-polygon-center. That results in a JSON file which is nearly 80MB, so that's not practical for use on a live static site. After some thinking and experimentation, I've ended up processing the dataset into a set of smaller files (around 1670), each of which represents one prefix (A0A), organized into folders by first letter. That results in files the largest of which is 187K, but the bulk of which are tiny; this is now practical for AJAX purposes, and the filepath/name can be predicted from the full postal code submitted by a user. Once we have the points for each of the member/riding/date components, I'll have to pre-calculate proximities for each postal code so that those files can also carry the ids of the nearest seats.