-
1. Re: I have a question about adding small cities to Tableau map
diego.medrano Jul 27, 2016 2:54 PM (in response to Haijing Hao)Any ideas Patrick A Van Der Hyde or Shawn Wallwork?
-
2. Re: I have a question about adding small cities to Tableau map
Patrick A Van Der HydeJul 27, 2016 3:03 PM (in response to Haijing Hao)
Haijing,
you tried using the geocode import? And are you trying to use these locations with Tableau as datapoints or do you simply need a map that includes the cities in the background?
-
3. Re: I have a question about adding small cities to Tableau map
Patrick A Van Der HydeJul 27, 2016 3:16 PM (in response to Patrick A Van Der Hyde)
One big thing.. your file looks like this:
"Country,Province,District,Latitude,Longitude"
"China,江西,上饶,28.4549,117.9434"
"China,天津,东丽,39.0866,117.3143"
"China,北京,东城,39.9284,116.4164"
"China,北京,丰台,39.8584,116.2871"
"China,内蒙古,乌兰察,41.09,113"
"China,重庆,九龙坡,29.5023,106.5107"
"China,云南,保山,25.112,99.1618"
"China,新疆,克拉玛,45.5799,84.8892"
This file has a single field when it is wrapped in quotes. It needs to be :
"Country","Province","District","Latitude","Longitude"
"China","江西","上饶",28.4549,117.9434
and you may need a schema.ini file as well - this is covered here: Create a schema.ini File
Also note that - at least to my eyes - the Province and District fields are the 2 distinct fields yet I do not see these in your data rows with seperation by comma. So one of those header rows probably needs to go. Make sure the # of columns in the header row matches the number of fields availble. Using Excel to create the csv file should do this for you if the data columns are all input as described so I'm not sure how this was created.
Fix up that data and give it another try.
Patrick
-
4. Re: I have a question about adding small cities to Tableau map
Haijing Hao Jul 28, 2016 12:20 PM (in response to Patrick A Van Der Hyde)Thanks for the suggestion.
1. May I ask how to create a .csv file as you said? I have tried very complicated procedure to create a csv file containing Chinese characters as the current one.
2. My goal is to merge the file with latitude and longitude into the other file which contains measures for those unknown cities, not to map the file with latitude and longitude columns, that is very straight forward.
-
5. Re: I have a question about adding small cities to Tableau map
Haijing Hao Jul 28, 2016 12:23 PM (in response to Patrick A Van Der Hyde)I have two files. One file has many cities (districts) and their data (measure), but some of the cities cannot be recognized by Tableau. That is why I created a second file containing those unknown cities and their latitude and longitude. I want to use those two files together in Tableau to map, and to visualize the measures of all of the cities.
I have a book called Tableau Official Guide. In that book, it has a similar example. But I cannot repeat that example.
-
6. Re: I have a question about adding small cities to Tableau map
Shawn Wallwork Jul 28, 2016 3:43 PM (in response to Haijing Hao)Are you using Excel as a data source?
--Shawn
-
7. Re: I have a question about adding small cities to Tableau map
Haijing Hao Jul 28, 2016 11:23 PM (in response to Shawn Wallwork)Yes, I use Excel as my data file. Does that matter?
My case is quite similar to repeat a case in The Official Guide Tableau 9 book, but I cannot.
Haijing