CARTO's company blog covers location intelligence, geospatial analysis, maps, PostGIS, and cloud spatial analytics.
HN links it for geospatial posts like zip code analysis and vector versus raster maps, and commenters also use it to identify CARTO basemaps.
Would you please add an OpenStreetMap attribution[0]? It looks like you're using OSM data via OpenRailwayMap (which also requires its own attribution[1]) and Carto basemaps (which I'm not terribly familiar with, but at first glance appear to be based on OSM data[2])---each of which detail their respective attribution requirements.
Leaflet makes this incredibly simple; just add the suggested text to the attribution field when you initialize the layers:
L.tileLayer('https://
{s}.basemaps.cartocdn.com/light_all/
{z}/
{x}/
{y}
{r}.png',
{
maxZoom: 19,
attribution: '' // here!
}).addTo(map);
var railwayOverlay = L.tileLayer('https://
{s}.tiles.openrailwaymap.org/standard/
{z}/
{x}/
{y}.png',
{
attribution: '', // and here!
}).addTo(map);
[0]: https://www.openstreetmap.org/copyright
[1]: https://wiki.openstreetmap.org/wiki/OpenRailwayMap/API
[2]: https://drive.google.com/file/d/1P7bhSE-N9iegI398QYDjKeVhnbS7-Ilk/view via https://carto.com/legal
> Next up was the laborious process of determining which bus lines one could actually take to each tennis court. My approach was 100% analog, starting from the top of the alphabetical list of tennis courts (Alamo Square) and marching straight through to the end (Youngblood Coleman), noting all of the bus lines that had a stop within reasonable walking distance to a court.
As a cartography nerd myself I was surprised just one comment suggested using GIS and geospatial analysis to match bus lines to tennis courts. Actually this very analysis could be made via services that provide a visual interface such as Mapbox or CARTO.
I recommend watching this documentary where Roger Tomlinson ("father of GIS") is highlighted https://www.youtube.com/watch?v=3VLGvWEuZxI
For those interested in learning to create maps on the web and visualize geospatial data CARTO also has a free MOOC site https://carto.com/academy/
Disclosure: I used to work at CARTO
CARTO | NYC + Madrid + Seville | Customer Success, Backend, Project Manager and More | Full-time | ONSITE | https://www.carto.com
CARTO (formerly CartoDB) is the world’s leading Location Intelligence platform, enabling organizations to use spatial data and analysis for more efficient delivery routes, better behavioral marketing, strategic store placements, and much more. Data Scientists, Developers and Analysts use CARTO to optimize business processes, and predict future outcomes through the power of Spatial Data Science.
Shorter version: We make really great APIs and libraries for doing geospatial data analysis and visualization (docs: https://carto.com/developers/ )
We have really great clients from around the world, good work-life balance and vacation, and kind and knowledgeable people.
Feel free to apply at our /careers page or email me if you're interested and have questions kpennell at carto dot com
I don't think it's generally possible. The FIPS code just identifies the county (the first two digits are the state, e.g. 06 for California) and the final three identify a county in that state. So technically that column is redundant with the "county" and "state" columns; I suspect they've included it to make joining this dataset to other data that might use different name-formatting of counties/states easier.
ZIP/postal codes are generally smaller (in the county I live in there are almost a hundred ZIP codes). I'm not sure they're even guaranteed to be entirely within one county either. We tend to think of ZIP codes as boundaries but they're actually delivery routes (which if you squint can be converted into boundaries by joining the properties that those routes serve together).
You might be interested in this article: https://carto.com/blog/zip-codes-spatial-analysis/
It's a good question, and unfortunately, the answer is that zipcode does not map well to other kinds of geographical regions, or to day-to-day-reality for that matter.
To directly answer your question, it is not uncommon for zipcodes to span county boundaries. And there are even a handful that span more than one state: https://gis.stackexchange.com/questions/53918/determining-which-us-zipcodes-map-to-more-than-one-state-or-more-than-one-city
To the broader question of why zip codes can be lacking for geospatial analysis, here's a real-world situation:
https://theconversation.com/how-zip-codes-nearly-masked-the-lead-problem-in-flint-65626
Here's a more broader essay from CartoDB: https://carto.com/blog/zip-codes-spatial-analysis/
Real life implementations:
https://developers.google.com/google-ads/api/docs/query/overview https://developer.intuit.com/app/developer/qbo/docs/learn/explore-the-quickbooks-online-api/data-queries https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_sosl_intro.htm https://carto.com/developers/sql-api/
From an end user standpoint, I preferred working with such API than with the ones creating nested json filters structures to model the filtering logic. It also provides a convenient way to select fields in the response, better in my opinion than "field mask" alternative that you can find on other APIs.