Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 Data sorting  
12 comments  




2 VA House of Delegates  
1 comment  




3 Map inclusion  
1 comment  













Template talk:Infobox United States legislative district




Page contents not supported in other languages.  









Template
Talk
 

















Read
Edit
Add topic
View history
 








Tools
   


Actions  



Read
Edit
Add topic
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Get shortened URL
Download QR code
 




Print/export  



Download as PDF
Printable version
 
















Appearance
   

 






From Wikipedia, the free encyclopedia
 


Data sorting

[edit]

Moved from User talk:Pppery

 – * Pppery * it has begun... 18:16, 10 June 2020 (UTC)[reply]

Hi Pppery! I saw your note on Template:Infobox_United_States_legislative_district when you reverted my change earlier. I'm really sorry for breaking your page(s). I tested it on several pages before deploying, and it seemed to be working correctly. Do you mind pointing me to which page(s) broke so I can test it out more and see what the issue was?

Thanks!

Brooklynpedestrian (talk) 01:02, 10 June 2020 (UTC)[reply]

Texas Senate, District 3 is one example. * Pppery * it has begun... 01:43, 10 June 2020 (UTC)[reply]
Thanks! Looks like a simple fix where I was accidentally using percent_asian instead of percent_hispanic. You can take a look at the fix in the template's sandbox, and I've also added a suite of test cases to make it easier to spot if things go wrong next time someone makes changes. Do you have any other concerns, Pppery? Brooklynpedestrian (talk) 05:44, 10 June 2020 (UTC)[reply]
While your code does now appear to work, I still don't see what the point of it is; it feels like unnecessary feature creep to me. * Pppery * it has begun... 14:07, 10 June 2020 (UTC)[reply]
Thank you for the feedback. There are three improvements that this makes:
1. It organizes the demographic and political party information from greatest to least so that it’s not in an arbitrary order. I feel that this is a readability improvement when scanning this info.
2. It actually simplifies the logic of the template. You pass all of the data points into a sorting algorithm and let that handle the order rather than saying “ok if ‘Democratic’ isn’t defined, we’re not going to display this section at all or if percent_white isn’t defined, we’re not going to display the section at all, and then we’re going to display the data in this specific order.”
3. Maintainability is improved, as instead of figuring out where a new demographic or political party needs to go in the order, you simply plug it in to the sorter.
Thanks, and please let me know what you think. Brooklynpedestrian (talk) 17:39, 10 June 2020 (UTC)[reply]
First of all, your code is objectively more complicated, in that it invokes a 1,273-byte Lua module, whereas the previous code had a simple #if statement doing the same thing.
Many of your changes are addressing a non-existent problem: this template had only been edited 8 times in the 7 years between its creation and your first edit to it, and none of them added support for additional demographics or political parties. Nor do I see any reason to expect the primary demographic or political groupings to change in the future. There's no point in making something that has never happened easier.
Are there actually any Legislative districts (the example in the documentation doesn't count) in which neither the Democrats nor the Republicans have a plurality? If not (and I think it is unlikely), then there's no point in adding complexity to support a non-existent use case?
The thing that is least obviously bloat is sorting the demographics, which may be a minor improvement, but isn't worth invoking even more custom Lua code for in my opinion. * Pppery * it has begun... 18:32, 10 June 2020 (UTC)[reply]
For the purposes of this discussion, I'm fine dropping points 2 and 3 that I made above. However, I do still think point 1 stands. There are already districts across the country where white is not the primary demographic (e.g. New York's 57th State Assembly district). A sorted list is easier to process for the reader than an out-of-order one, and I believe our goal with these templates should be to help the reader process information as best we can. Brooklynpedestrian (talk) 20:00, 10 June 2020 (UTC)[reply]
An addendum, there are a handful of districts throughout the US where nonaffiliated/independent voters outnumber either the Republicans or the Democrats. New York's 57th State Assembly district that I mentioned earlier is one of several in New York, and I know there are several in Nebraska as well, among I'm sure other states. Brooklynpedestrian (talk) 21:51, 10 June 2020 (UTC)[reply]
"No party preference" is kind of like "other", so it makes sense that it always goes at the bottom. I don't have strong objections to sorting the demographics, but just don't consider it worth the code complexity. * Pppery * it has begun... 21:32, 11 June 2020 (UTC)[reply]
I would suggest that for changes like this, if we think it would be better for readers (which it sounds like we either think yes it would or we're neutral), then the code complexity is less important. I would argue that readers aren't worried about code complexity; they just want the best reading experience.
Also to refute your earlier comment, the Lua module it's invoking is only roughly half of the page size. Only one 13-line function is being invoked.
If we're still in disagreement here, I'm happy to seek some third opinions. Brooklynpedestrian (talk) 21:39, 11 June 2020 (UTC)[reply]
Response to third opinion request:
Hello. After reading through this talk page, it seems like it makes more sense to sort logically, even if it adds a little code complexity. Especially if it is, as Brooklyn Pedestrian stated, 13 lines.Wildjerry (talk) 16:08, 18 June 2020 (UTC) Wildjerry (talk) 16:08, 18 June 2020 (UTC)[reply]

VA House of Delegates

[edit]

would it be possible to update this template to allow for the distinction of house of delegates (lower house) in addition to state assembly and house of representatives. would allow for it to be used in state legislative pages for the state of Virginia House of Delegates Epluribusunumyall (talk) 20:51, 17 August 2020 (UTC)[reply]

Map inclusion

[edit]

Hi! Would it be possible to add an Image_map parameter to include a maplink to OpenStreetMap areas of district boundaries? Penndyl (talk) 17:27, 27 December 2022 (UTC)[reply]


Retrieved from "https://en.wikipedia.org/w/index.php?title=Template_talk:Infobox_United_States_legislative_district&oldid=1232098261"

Categories: 
Template-Class United States articles
NA-importance United States articles
Template-Class United States articles of NA-importance
Template-Class United States Government articles
NA-importance United States Government articles
WikiProject United States Government articles
WikiProject United States articles
 



This page was last edited on 1 July 2024, at 23:10 (UTC).

Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



Privacy policy

About Wikipedia

Disclaimers

Contact Wikipedia

Code of Conduct

Developers

Statistics

Cookie statement

Mobile view



Wikimedia Foundation
Powered by MediaWiki