CodeForAfrica / HURUmap

HURUmap is an interactive web platform that allows citizens and journalists to explore, visualise, and download census data. This gives them the power to give context to stories that was otherwise hard to spot. Accessible at https://hurumap.org
https://hurumap.org
GNU General Public License v3.0
8 stars 7 forks source link

Add ability to add source to charts #26

Closed kilemensi closed 5 years ago

kilemensi commented 6 years ago

Description

In order for a chart/viz to be taken serious, it must have the source of the data attributed.

This PR add ability to define source either as a link via data-source attribute on chart div (html) or as a source object in the metadata section of chart data (python). The second method also offer ability to separate the link and display title


<div id='' ...... data-source='https://link'></div>

OR


data['metadata']['source'] = {
    'title': 'Source Title',
    'link': 'https://link',
}

Type of change

Please delete options that are not relevant.

Screenshots

untitled

Checklist:

DavidLemayian commented 6 years ago

@kilemensi I guess resolve conflict and merge. :)