Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I am trying to plot County level data on a map (Qlik Sense Desktop) but unfortunately because of duplicate county names per state I am not able to do it successfully. This is resulting in plotting of a county pertaining to one state in a other State.
For Example: County Named 'Lee County' exists in both Texas & Florida.
But the correct state that is corresponding to the county in my data is for Texas only. However Qlik Sense puts Lee County in Florida.
I need to plot County level data across the United States not limiting to one state. Can some one let me know how to handle this scenario ?
As you can see in the image. I wanted to plot Texas counties on the map but some American states share same county names causing the issue. 1) How can I restrict the counties to Texas alone ? 2) How can I do this for all the states in one map ?
Hi Vsabbise,
If you use the "scope for locations" options in your point layer you can further specify the location of your cities.
I don't have exactly the same data as you and will use city instead. But the procedure is the same.
This is what it looks initially with scope set to auto. American cities are spread across the world.
If I turn off auto I get some options, one being the location type. I will first switch this from Auto to City. This is where you would pick something else. I believe admin level 2 is counties?
The next step is to specify the country that these cities are located in. It can either be a field from your data table or it can be a string (or a list of strings). In my case I'm going to start by specifying the country as a string. As you can see I've now located all the cities to the correct country.
The next step is to scope the location on Administrative level 1. Which for USA is States. In my data table for city I have a state for each city. So I will add that field. Then Sense when doing a lookup of the city location will limit the lookup to the State connected to the city.
Let me know if this helps.
Regards,
Patrik.
Hi,
try to make your county names distinct, Concatenating the State name to the county name for example.
Example:
county name: Lee_Florida or Lee_Texas
I have already done that but can Qlik Sense recognize the calculated field and map it accordingly ?
How are you displaying your counties on the map ? Coordinates ? or using data preparation ?
you should have different coordinates for each distinct county
I just have the names of the counties not their Latitude/Longitude. Generally I have some success plotting just using the names in Qlik Sense.
You are correct. The problem would be solved if I have coordinates but I don't have them right now and is there a way to deal with just the names ?
I don't think that it can be solved using the names.. It means that in Qliksense geographic repository there is only one Lee County, which is the one of Florida State.
Take a look at Gadm.org or something similar to this: https://www.census.gov/geo/maps-data/data/kml/kml_counties.html
If you can't find the counties coordinates, try using Kml files that you can found on the link above, and use GeoGetPolygonCenter to generate the central point of each county.
Hi Vsabbise,
If you use the "scope for locations" options in your point layer you can further specify the location of your cities.
I don't have exactly the same data as you and will use city instead. But the procedure is the same.
This is what it looks initially with scope set to auto. American cities are spread across the world.
If I turn off auto I get some options, one being the location type. I will first switch this from Auto to City. This is where you would pick something else. I believe admin level 2 is counties?
The next step is to specify the country that these cities are located in. It can either be a field from your data table or it can be a string (or a list of strings). In my case I'm going to start by specifying the country as a string. As you can see I've now located all the cities to the correct country.
The next step is to scope the location on Administrative level 1. Which for USA is States. In my data table for city I have a state for each city. So I will add that field. Then Sense when doing a lookup of the city location will limit the lookup to the State connected to the city.
Let me know if this helps.
Regards,
Patrik.
Awesome. This worked like charm. I can't believe I haven't tried this. Thanks a lot for your help. Qlik Sense is Awesome 🙂
Hi YoussefBelloum,
This might be helpful for certain scenarios. Thanks for your help.
Hi all, i'm trying to set the location using a list of string -> ('ITA'|'MLT') but it doesn't work. Anyone have an idea to resolve this problem?
Thx a lot.
Ale