I’m pretty sure I’ve checked this enough times to confirm it. Whenever I make a purchase, the next parish over (county to the rest of y’all) lights up.
@clonetek My MIL lives there, I’ll tell her to tell you hi. I’ve wondered who lights it up. I originally questioned if IP geolocation lit the map as I’ve purchased when over there before and seen it lit up.
If we really want to dive deep here I can shed some light on how this works. I haven’t looked at the code in a while and it hasn’t been touched since @katylava last worked on it June 29th, 2016. Maybe we’ll spot a bug or maybe we’ll agree it’s working as expected…
We use the shipping address of the order to determine placement on the map. To work with geographic data at the county-level we’ve found it best to translate the ZIP code to the FIPS county code. To achieve that, we use the USPS ZIP code crosswalk data maintained by the U.S. Department of Housing and Urban Development (yes, the one under Secretary Ben Carson).
/image ben carson
My guess (without any investigation so far) is that your ZIP code is either incorrectly or ambiguously mapped to the wrong FIPS country code in this dataset.
Also, to provide a proper heatmap we have a population density breakdown at the FIPS-level.
Here’s the ZIP to FIPS data:
Here’s the population data:
Here’s a snippet of code that puts it all together:
Maybe if @djslack is up for sharing his ZIP code with us we can collectively research if we have a data bug, or a logic bug, or something else.
@shawn Wow. Thanks for all the insight here. It’s 71037.
I started to check the FIPS code myself but didn’t see an easy way to do that on my phone.
From a look at the zip code map boundaries, it looks like it may just be mapped to the wrong FIPS code. It looks like it has a hard edge at the parish line at first glance so it shouldn’t be ambiguous.
In the rural area where I grew up, and where my mom still lives, our zip code covered portions of three different counties. If I ever ordered something and had it shipped to her I’d be curious to see if the correct county lit up, or if it would light up the county that the “town” is in.
@PurplePawprints My town is in 3 counties and only has 1 zip code. It can make for some confusion at election time for those not in the primary county as they have to travel to other towns for the polling location that corresponds to their township.
One of the county lines runs through a house on the next block; it also runs through the elementary. I received a jury summons for that 2nd county once.
The 3rd county is about a block-and-a-half from my house.
Due to consolidation, the school district is in parts of 5 or so counties.
@djslack I believe it did even before the change, but I don’t always check when I order stuff so I could be mistaken. At one point IIRC the map required 2 or 3 purchases in a county (or parish as in your case) for the county to light up.
If FIPS assigns county numbers by alphabetical order with larger numbers equating later in the alphabet, then my purchases would have registered in the correct county anyway. They still will as the largest portion of the town is in the county I live in.
When we encounter a scenario like this we pick one of the FIPS codes to map to. We were picking the last matching entry that appeared in the file.
What I hadn’t noticed before is this TOT_RATIO data. This is saying that 99.98% of the addresses for ZIP code 71037 are in FIPS code 22015 and the remaining 0.02% of the addresses are in FIP code 22119.
I’ve made a change so that if we encounter a scenario like this we pick the ZIP to FIPS mapping with the largest TOT_RATIO. In this case, it gives us a 99.98% chance that we highlight the correct county on the map (which is far better than @hollycrisson thinking we just made some shit up ).
@shawn Thanks! You are the man! I totally didn’t expect my asking a dumb question to get your attention and actually have you spend time on a fix today. Or to learn so much about how the map works behind the scenes.
Ok! Party @djslack’s house everybody!
@therealjrn whos bringing the beer?
@therealjrn
@djsjack
Since the party’s in Louisiana, will possum and gator be on the menu?
(Love Louisiana!)
Probably has to do with where your ISP routes your connection.
@jbartus I always thought it was based on shipping address. Live and learn.
@jbartus my isp would have lit up Austin, TX tonight then.
/giphy friggin gerrymandering
Through advanced mapping techniques, based on your arrow I’ve determined you live in Haughton, Louisiana on Sligo Rd. Possibly across from a church.
@MrMark My drawing finger is inaccurate enough to keep you away from my house, but surprisingly close enough that we could meet up rather easily
Cool, I live about 4 parishes over from ya.
@clonetek My MIL lives there, I’ll tell her to tell you hi. I’ve wondered who lights it up. I originally questioned if IP geolocation lit the map as I’ve purchased when over there before and seen it lit up.
If we really want to dive deep here I can shed some light on how this works. I haven’t looked at the code in a while and it hasn’t been touched since @katylava last worked on it June 29th, 2016. Maybe we’ll spot a bug or maybe we’ll agree it’s working as expected…
We use the shipping address of the order to determine placement on the map. To work with geographic data at the county-level we’ve found it best to translate the ZIP code to the FIPS county code. To achieve that, we use the USPS ZIP code crosswalk data maintained by the U.S. Department of Housing and Urban Development (yes, the one under Secretary Ben Carson).
/image ben carson
My guess (without any investigation so far) is that your ZIP code is either incorrectly or ambiguously mapped to the wrong FIPS country code in this dataset.
Also, to provide a proper heatmap we have a population density breakdown at the FIPS-level.
Here’s the ZIP to FIPS data:
Here’s the population data:
Here’s a snippet of code that puts it all together:
Maybe if @djslack is up for sharing his ZIP code with us we can collectively research if we have a data bug, or a logic bug, or something else.
@shawn Wow. Thanks for all the insight here. It’s 71037.
I started to check the FIPS code myself but didn’t see an easy way to do that on my phone.
From a look at the zip code map boundaries, it looks like it may just be mapped to the wrong FIPS code. It looks like it has a hard edge at the parish line at first glance so it shouldn’t be ambiguous.
I just assumed the map was total BS from the start. Good to know there’s “real science” behind the magic.
In the rural area where I grew up, and where my mom still lives, our zip code covered portions of three different counties. If I ever ordered something and had it shipped to her I’d be curious to see if the correct county lit up, or if it would light up the county that the “town” is in.
@PurplePawprints
/youtube Do It
@therealjrn Oh My. I didnt nean that one!
@therealjrn that video doesn’t match the lyrics of that song. Just, lol
@PurplePawprints My town is in 3 counties and only has 1 zip code. It can make for some confusion at election time for those not in the primary county as they have to travel to other towns for the polling location that corresponds to their township.
One of the county lines runs through a house on the next block; it also runs through the elementary. I received a jury summons for that 2nd county once.
The 3rd county is about a block-and-a-half from my house.
Due to consolidation, the school district is in parts of 5 or so counties.
@msklzannie What a mess. But the important question is does the Meh map light up correctly for your purchases? Now and/or before @shawn fixed it?
@djslack I believe it did even before the change, but I don’t always check when I order stuff so I could be mistaken. At one point IIRC the map required 2 or 3 purchases in a county (or parish as in your case) for the county to light up.
If FIPS assigns county numbers by alphabetical order with larger numbers equating later in the alphabet, then my purchases would have registered in the correct county anyway. They still will as the largest portion of the town is in the county I live in.
I downloaded the 2nd quarter 2017 HUD USPS ZIP crosswalk data and looked up ZIP code 71037 and I found multiple entries.
When we encounter a scenario like this we pick one of the FIPS codes to map to. We were picking the last matching entry that appeared in the file.
What I hadn’t noticed before is this
TOT_RATIO
data. This is saying that 99.98% of the addresses for ZIP code 71037 are in FIPS code 22015 and the remaining 0.02% of the addresses are in FIP code 22119.I’ve made a change so that if we encounter a scenario like this we pick the ZIP to FIPS mapping with the largest
TOT_RATIO
. In this case, it gives us a 99.98% chance that we highlight the correct county on the map (which is far better than @hollycrisson thinking we just made some shit up ).@djslack looking any better to you?
@shawn Thanks! You are the man! I totally didn’t expect my asking a dumb question to get your attention and actually have you spend time on a fix today. Or to learn so much about how the map works behind the scenes.
/giphy wow
@shawn good work!
And here I was impressed that they are so nice about damaged products. This “meh” team is quite good.
All I know for certain is that everything is @RiotDemon’s fault; however, I really want to blame Ben Carson.