def get_map_data(year, loc_dict, years_dict):
    """
    Returns data needed for map creation for given year as a list.
    :param year: integer, year
    :param loc_dict: dictionary, keys - location strings, values - geo data
    :param years_dict: dictionary, keys - years, values - film dictionaries
    :return map_data: list of tuples as (film, location, coordinates)
    :return len(map_data): integer, number of all films available for given year
    """
    map_data = []
    t = years_dict[year]
    for film in t:
        processed = []
        for location in t[film]:
            if location in loc_dict:  # check if coordinates of locat. available
                if location in processed:
                    pass
                else:
                    l = loc_dict[location]
                    coordinates = [l[0]['geometry']['location']['lat'],
                                  l[0]['geometry']['location']['lng']]
                    map_data.append((film, location, coordinates))
                    processed.append(location)
            else:
                pass
    return map_data, len(map_data)