Changeset 34907


Ignore:
Timestamp:
2021-02-21T15:05:17+13:00 (3 years ago)
Author:
davidb
Message:

Name change to better reflect what the script does

File:
1 moved

Legend:

Unmodified
Added
Removed
  • main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/prepare/voting-excel/xlsx-tocountry-jsonmetadata.py

    r34906 r34907  
    3535
    3636
    37 def create_to_country_voting_groups(data_hashmap_array):
     37def create_to_country_voting_groups(data_hashmap_array_finals):
    3838
    3939    # Example values for header-names
    40     #   (semi-) final: f, sf
     40    #   (semi-) final:      f, sf
    4141    #   Jury or Televoting: J, T
    42     #   Year: 1975
    43     #   To country: Belgium
    44     #   From country: Belgium
    45     #   Edition: 1975f, 1975sf
    46 
    47    
    48     # Filter down to just the voting results concerning finals
    49     data_hashmap_array_finals = list(filter(xlsxutil.filter_finalist_votes, data_hashmap_array))
     42    #   Year:               1975, ...
     43    #   To country:         Belgium
     44    #   From country:       Belgium
     45    #   Edition:            1975f, 1975sf
     46
     47   
     48#    # Filter down to just the voting results concerning finals
     49#    data_hashmap_array_finals = list(filter(xlsxutil.filter_finalist_votes, data_hashmap_array))
    5050
    5151    # Sort so array entries are grouped by the country receiving the votes in a given year
     
    186186    print("Number of data rows: " + str(len(data_hashmap_array)))
    187187
    188    
    189     to_country_year_voting_groups = create_to_country_voting_groups(data_hashmap_array)
     188
     189    # Filter down to just the voting results concerning finals
     190    data_hashmap_array_finals = list(filter(xlsxutil.filter_finalist_votes, data_hashmap_array))
     191
     192    print("Number of finalist voting data rows: " + str(len(data_hashmap_array_finals)))
     193   
     194    to_country_year_voting_groups = create_to_country_voting_groups(data_hashmap_array_finals)
    190195
    191196    # Debug output
Note: See TracChangeset for help on using the changeset viewer.