Forum Discussion
Custom Shape Maps Unexpected Error
- 9 years ago
Ok, I think I might know the potential cause of your issue. When you pulled the file off of GitHub, my guess is that you did not save the actual json file. Instead, you probably right-clicked in the ReadMe and did a Save As on the link to the blob. Is that correct?
GitHub shows a preview of TopoJson, GeoJson, etc. blobs on their own page. Unless you download the entire repo, you need to click through the link and save the Raw json instead of the blob preview.
deldersveld I have a question about your us-albers.counties.json file?
I can't figure out how to plot the correct county in the correct state?
Here is some sample data
These are the 3 most popular county names
(btw these are not all their occurences - I kind of narrowed them down to just the SE/4 of the country)
| County Column | Full State Name | Population | County Name | County, State | County Word |
| Jefferson County | Alabama | 659,479 | Jefferson | Jefferson County, Alabama | County |
| Washington County | Alabama | 16,877 | Washington | Washington County, Alabama | County |
| Jefferson County | Arkansas | 73,191 | Jefferson | Jefferson County, Arkansas | County |
| Lincoln County | Arkansas | 14,031 | Lincoln | Lincoln County, Arkansas | County |
| Washington County | Arkansas | 216,410 | Washington | Washington County, Arkansas | County |
| Jefferson County | Florida | 14,194 | Jefferson | Jefferson County, Florida | County |
| Washington County | Florida | 24,624 | Washington | Washington County, Florida | County |
| Jefferson County | Georgia | 16,320 | Jefferson | Jefferson County, Georgia | County |
| Lincoln County | Georgia | 7,751 | Lincoln | Lincoln County, Georgia | County |
| Washington County | Georgia | 20,676 | Washington | Washington County, Georgia | County |
| Jefferson County | Indiana | 32,458 | Jefferson | Jefferson County, Indiana | County |
| Washington County | Indiana | 27,780 | Washington | Washington County, Indiana | County |
| Jefferson County | Kansas | 18,813 | Jefferson | Jefferson County, Kansas | County |
| Lincoln County | Kansas | 3,147 | Lincoln | Lincoln County, Kansas | County |
| Washington County | Kansas | 5,629 | Washington | Washington County, Kansas | County |
| Jefferson County | Kentucky | 756,832 | Jefferson | Jefferson County, Kentucky | County |
| Lincoln County | Kentucky | 24,370 | Lincoln | Lincoln County, Kentucky | County |
| Washington County | Kentucky | 11,875 | Washington | Washington County, Kentucky | County |
| Jefferson County | Mississippi | 7,629 | Jefferson | Jefferson County, Mississippi | County |
| Lincoln County | Mississippi | 34,810 | Lincoln | Lincoln County, Mississippi | County |
| Washington County | Mississippi | 49,688 | Washington | Washington County, Mississippi | County |
| Jefferson County | Missouri | 221,396 | Jefferson | Jefferson County, Missouri | County |
| Lincoln County | Missouri | 53,860 | Lincoln | Lincoln County, Missouri | County |
| Washington County | Missouri | 25,172 | Washington | Washington County, Missouri | County |
| Lincoln County | North Carolina | 79,740 | Lincoln | Lincoln County, North Carolina | County |
| Washington County | North Carolina | 12,722 | Washington | Washington County, North Carolina | County |
| Jefferson County | Oklahoma | 6,432 | Jefferson | Jefferson County, Oklahoma | County |
| Lincoln County | Oklahoma | 34,351 | Lincoln | Lincoln County, Oklahoma | County |
| Washington County | Oklahoma | 51,577 | Washington | Washington County, Oklahoma | County |
| Jefferson County | Tennessee | 52,123 | Jefferson | Jefferson County, Tennessee | County |
| Lincoln County | Tennessee | 33,633 | Lincoln | Lincoln County, Tennessee | County |
| Washington County | Tennessee | 125,546 | Washington | Washington County, Tennessee | County |
| Jefferson County | Texas | 252,358 | Jefferson | Jefferson County, Texas | County |
| Washington County | Texas | 34,147 | Washington | Washington County, Texas | County |
| Washington County | Virginia | 54,907 | Washington | Washington County, Virginia | County |
| Jefferson County | West Virginia | 55,073 | Jefferson | Jefferson County, West Virginia | County |
| Lincoln County | West Virginia | 21,559 | Lincoln | Lincoln County, West Virginia | County |
In both PBI's regular and filled maps and in the ArcGIS visual you basically use the County, State field and you get this result...
(Note that if you don't use this field you'll get incorrect results!)
Now when we go to the topojson file - it would not plot anything using the County, State field
If i use only the County it plot like this - it plots Counties with the same name but in states which are not even included
Any advice will be much appreciated!
Thanks in advance!