def get_name_to_date(G):
    """
    get dictionary mapping from doc_name to year published

    Parameters
    ----------
    G, the network object of (probably) SCOTUS dataset

    Output
    ------
    dict with keys being name, values being date in year
    """
    dates = {}
    for v in G.nodes():
        date = float(str(G.node[v]["year"]).strip())//1
        dates[G.node[v]["name"]] = int(date)
    return dates