def location_dict_to_geojson(org_location_dict, filename, hashed_usernames=True
    ):
    """
    CURRENTLY BROKEN!
    Outputs a dict of users : locations to a CSV file.

    Requires org_location_dict and filename, optional hashed_usernames parameter.

    Uses hashes of usernames by default for privacy reasons. Think carefully
    about publishing location data about uniquely identifiable users. Hashing
    allows you to check unique users without revealing personal information.
    """
    import hashlib
    with open(filename, 'w') as f:
        header = '\n{ "type": "FeatureCollection",\n    "features": [\n'
        f.write(header)
        for user, location in org_location_dict.items():
            if location is not None:
                if hashed_usernames:
                    user_output = hashlib.sha1(user.encode('utf-8')).hexdigest(
                        )
                else:
                    user_output = user
                line = (
                    """
    {
        "type": "Feature",
        "geometry": {
            "type": "Point",
            "coordinates": [%s, %s]
        },
        "properties": {
            "name": "%s"
        }
    },
"""
                     % (location.longitude, location.latitude, user_output))
                f.write(line)
        f.write(']}')
    f.close()
