def shieldsio_markdown_badge_generator(badge_label=None,
                                       badge_hover=None,
                                       badge_link=None,
                                       metric='count',
                                       badge_color=None,
                                       badge_style='flat-square'):
    """Generates badge generator for a badge hosted on shields.io.

    Params:
        badge_label - the label in the badge itself. For example "algorithms".
                      this label is displayed in the left box of the badge.
        badge_hover - the hover text displayed when going over the badge. Used
                      in the Markdown markup for the badge.
        badge_link - the link of the badge (in the markup).
        metric - the name of the property in the saved JSON that contains the
                 data that should be displayed in the right box of the badge.
        badge_color - the color of the badge.
        badge_style - badge style. May be: 'plastic', 'flat', 'flat-square'.
    """
    def _get_badge_url(data_url):
        url = 'https://img.shields.io/badge/dynamic/json?'
        params = {
            'label': badge_label,
            'query': metric,
            'url': data_url,
            'color': badge_color,
            'style': badge_style,
        }
        for param, value in params.items():
            if value is not None:
                url += '&' + '{key}={value}'.format(key=param, value=value)
        return url

    def _get_markup(hover, badge_url):
        hover = badge_hover or hover
        return '[![{hover}]({badge_url})]({badge_link})'.format(
            hover=hover,
            badge_url=badge_url,
            badge_link=badge_link)

    def _generator(value):
        url = _get_badge_url(value['data_url'])
        return {
            'provider': 'https://shields.io',
            'url': url,
            'markup': _get_markup(hover=value['label'], badge_url=url)
        }

    return _generator