Skip to content

Census getCitationsForImageJSON.php

James Cobban edited this page May 12, 2020 · 1 revision

Up: Census Implementation

Source Code

Generate a JSON document with information about the complete citation for a page identified by the URL of the image on the LAC web-site.

Parameters (passed by method=get):

Name Description
Image The URL of an census page image on the LAC web-site.

The information displayed looks like:

{
	"image" : "http://data2.collectionscanada.ca/e/e328/e008195647.jpg",
	"page6" : {
		"census" : "CA1881",
		"distid" : "159.0",
		"sdid" : "B",
		"div" : "4",
		"sched" : "1",
		"page" : "6",
		"population" : "25",
		"image" : "http://data2.collectionscanada.ca/e/e328/e008195647.jpg",
		"transcriber" : "",
		"proofreader" : ""
	},
	"page7" : {
		"census" : "CA1881",
		"distid" : "159.0",
		"sdid" : "B",
		"div" : "4",
		"sched" : "1",
		"page" : "7",
		"population" : "25",
		"image" : "http://data2.collectionscanada.ca/e/e328/e008195647.jpg",
		"transcriber" : "",
		"proofreader" : ""
	}
}

Note that this example demonstrates that a single original image may contain more than one page.

Next: matchCitations.js

Clone this wiki locally