okfn / ibp-explorer

[ARCHIVED] Data Explorer for the Open Budget Survey, built in collaboration with the International Budget Partnership.
http://survey.internationalbudget.org
7 stars 5 forks source link

Year filtering behaviour for document linking in aquariam.js #113

Open brew opened 7 years ago

brew commented 7 years ago

The explorer app requests data from the data-client which is cached as countries.json. This countries list includes data about document availability for specified time periods, e.g.: '2015', '2016', 'December 2016'.

Additional information is added to the country/question entry about document links within Google Drive (driveId and/or groupParentId), that provides the necessary data to the tracker app to build links from a country's availability page to documents within Google Drive. This is achieved by a process of discovering documents and directories within Google Drive, and matching them with availability entries from the Indaba API.

At some point, these year groupings were changed from 'YYYY' to 'Month YYYY' format, to enable multiple releases within a given year.

A starting boundary year exists (hard-coded as '2016') that starts this document linking behaviour from '2016', and all date groupings that match the 'Month YYYY' format.

There is a date displayed on the Availability page describing when the last API update occurred. It is defined manually as an env var, TRACKER_LAST_UPDATE.