def create_flows(edges, node_id, to_col_name="to", from_col_name="from",
                 weight_col_name="weight"):
    """
    Create the geojson property object that enumerates the flow volume to and
    from a location for the fountain.

    Args:
        edges (Pandas.DataFrame): The weight for each edge to and from a pair
            of nodes contained in the node list. Should contain a column for to,
            from, and weight of that edge. Optional args for those column names.
        node_id (string): identifier of node for which to map in and out flows
        to_col_name (string): Name of the edges DataFrame column for the weight
        from_col_name (string): Name of the edges DataFrame column for from node
        weight_col_name (string): Name of the edges DataFrame column for to node
            Only used for creating geojson from CDR data, not museums

    Returns:
        tuple (dict, dict): the objects for the flows in and out of the node to
            each other node in the fountain for which there is a directed edge
    """
    in_flows = {}
    out_flows = {}
    in_edges = edges.loc[(edges[to_col_name] == node_id)]
    out_edges = edges.loc[(edges[from_col_name] == node_id)]

    for index, edge in in_edges.iterrows():
        from_id = edge[from_col_name]
        if isinstance(from_id, float):
            from_id = int(from_id)

        in_flows[from_id] = {
            'weight': edge[weight_col_name],
            'percentage': edge['perc_to']
        }

    for index, edge in out_edges.iterrows():
        to_id = edge[to_col_name]
        if isinstance(to_id, float):
            to_id = int(to_id)

        out_flows[to_id] = {
            'weight': edge[weight_col_name],
            'percentage': edge['perc_from']
        }

    return in_flows, out_flows