One oddity encountered with the source data was the use of character in the table that looks like a minus sign, but doesn’t act as a negative indicator in python:
`a= ‘−’`
`print(ord(a))`
`> 8722`
`print(float(a + ‘5.5’))`
`> ValueError: could not convert string to float: ‘−5.5’`
Replacing that character with the minus character on a US keyboard (unicode code point 45) gives the expected behavior.
`b= ‘-‘`
`print(ord(b))`
`> 45`
`print(float(b + ‘5.5’))`
`> 5.5`
That took me a minute to figure out.
A truly irrational system of government.
This is a great way of visualizing it
[deleted]
The states with 2 representatives 😙🤌
The senate is just a shitshow and will probably be the death of this country
This graph is meaningless to me.
What does it show beyond that there are 2 senators per state regardless of population, and that the house is divided proportionally?
6 comments
python matplotlib
source:
[https://en.wikipedia.org/wiki/List_of_U.S._states_and_territories_by_population](https://en.wikipedia.org/wiki/List_of_U.S._states_and_territories_by_population)
One oddity encountered with the source data was the use of character in the table that looks like a minus sign, but doesn’t act as a negative indicator in python:
`a= ‘−’`
`print(ord(a))`
`> 8722`
`print(float(a + ‘5.5’))`
`> ValueError: could not convert string to float: ‘−5.5’`
Replacing that character with the minus character on a US keyboard (unicode code point 45) gives the expected behavior.
`b= ‘-‘`
`print(ord(b))`
`> 45`
`print(float(b + ‘5.5’))`
`> 5.5`
That took me a minute to figure out.
A truly irrational system of government.
This is a great way of visualizing it
[deleted]
The states with 2 representatives 😙🤌
The senate is just a shitshow and will probably be the death of this country
This graph is meaningless to me.
What does it show beyond that there are 2 senators per state regardless of population, and that the house is divided proportionally?
Comments are closed.