sunlightlabs / opencongress

An open website for opening Congress.
http://www.opencongress.org
GNU General Public License v3.0
48 stars 16 forks source link

user_feeds_controller.rb in block in tracked_items at line 31 #278

Closed drinks closed 11 years ago

drinks commented 11 years ago

This is a side effect of deduping committees. We didn't update user bookmarks and now they point nowhere. @dvogel is there any way to find out after the fact what ids we remapped committees between?

drinks commented 11 years ago

The missing data:

[['id', 'name', 'subcommittee_name', 'active', 'code', 'page_views_count'], [5426, "House Judiciary", "Crime, Terrorism, Homeland Security, And Investigations", true, nil, 653], [312, "House Agriculture", "Livestock, Dairy, and Poultry", true, nil, 9919], [568, "Senate Appropriations", "Agriculture, Rural Development, Food and Drug Administration, and Related Agencies", true, nil, 5372], [316, "House Natural Resources", "National Parks, Forests, and Public Lands", true, nil, 9877], [194, "House Veterans' Affairs", "Health", true, nil, 6290], [587, "House Energy and Commerce", "Communications, Technology, and the Internet", true, nil, 8278], [562, "House Education and Labor", "Healthy Families and Communities", true, nil, 7261], [251, "Senate Health, Education, Labor, and Pensions", "Labor, Health and Human Services, Education, and Related Agencies", true, nil, 5527], [739, "House Armed Services", "Emerging Threats and Capabilities", true, nil, 1583], [540, "House Judiciary", "Immigration, Citizenship, Refugees, Border Security, and International Law", true, nil, 10015], [560, "House Education and Labor", "Health, Employment, Labor, and Pensions", true, nil, 8481], [574, "House Energy and Commerce", "Financial Services and General Government", true, nil, 4809], [561, "House Education and Labor", "Early Childhood, Elementary, and Secondary Education", true, nil, 7691], [313, "House Foreign Affairs", "Middle East and South Asia", true, nil, 5128], [609, "House Energy and Commerce", "Energy and Power", true, nil, 2517], [722, "House Homeland Security", "Cybersecurity, Infrastructure Protection, and Security Technologies", true, nil, 1578], [766, "Senate Finance", "Constitution, Civil Rights and Human Rights", true, nil, 949], [583, "House Small Business", "Rural Development, Entrepreneurship and Trade", true, nil, 3219], [707, "Senate Rules and Administration", "Constitution, Civil Rights and Human Rights", true, nil, 806], [2239, "Senate Judiciary", "Constitution, Civil Rights and Human Rights", true, nil, 895], [578, "House Natural Resources", "Insular Affairs, Oceans and Wildlife", true, nil, 4856], [553, "House Science and Technology", "Research and Science Education", true, nil, 5163], [572, "Senate Banking, Housing, and Urban Affairs", "Housing, Transportation and Community Development", true, nil, 4880], [328, "House Science and Technology", "Energy and Environment", true, nil, 6373], [279, "House Agriculture", "General Farm Commodities and Risk Management", true, nil, 6249], [584, "House Judiciary", "Courts and Competition Policy", true, nil, 4861], [282, "House Education and Labor", nil, true, nil, 21745], [284, "House Science and Technology", nil, true, nil, 10277], [543, "House Judiciary", "Constitution, Civil Rights, and Civil Liberties", true, nil, 10225], [585, "House Agriculture", "Rural Development, Biotechnology, Specialty Crops, and Foreign Agriculture", true, nil, 3540], [545, "House Science and Technology", "Technology and Innovation", true, nil, 5573], [541, "House Agriculture", "Specialty Crops, Rural Development, and Foreign Agriculture", true, nil, 5348], [292, "House Education and Labor", "21st Century Competitiveness", true, nil, 5451], [301, "House Natural Resources", "National Parks", true, nil, 4744], [310, "House Homeland Security", "Emerging Threats, Cybersecurity, and Science and Technology", true, nil, 6014], [547, "House Agriculture", "Horticulture and Organic Agriculture", true, nil, 5843], [549, "House Foreign Affairs", "Terrorism, Nonproliferation, and Trade", true, nil, 5091], [248, "House Ways and Means", "Health", true, nil, 8037], [281, "House Oversight and Government Reform", nil, true, nil, 28384], [569, "Senate Judiciary", "Surface Transportation and Merchant Marine Infrastructure, Safety and Security", true, nil, 4241], [559, "House Education and Labor", "Higher Education, Lifelong Learning, and Competitiveness", true, nil, 7934], [309, "House Homeland Security", "Transportation Security and Infrastructure Protection", true, nil, 5560], [546, "Senate Homeland Security and Governmental Affairs", "Surface Transportation and Merchant Marine Infrastructure, Safety and Security", true, nil, 3868], [314, "House Foreign Affairs", "Africa and Global Health", true, nil, 4895]]

dvogel commented 11 years ago

We collapsed committee bookmarks when deduplicating committees but these arose from two corner conditions. There were 162 total. For 98 the committee name combinations simply couldn't be matched and had to be orphaned. The remaining 94 were where the user had both that source and target committees bookmarked before the deduplication. Manually mapped the 98 in the first set and deleted the 94 in the second set.