Re: [Qgis-user] Joining data to a shape file by country name when the names don't match exactly

2016-11-07 Thread Nicolas Cadieux
Hi,
If you need a user interface, you're probably looking at a plugin.  I have no 
experience for that.  I am sorry to see that the excel function didi not work 
for you.  I normally turn it off also as it gives rather funny results.  I 
thought this could be one situation where it could work.  The way you are doing 
it is the way I would have done it.  I normally use some find and replace 
function  before to correct the big repeatable errors like extra spaces or 
small caps.  Nothing beats a well made database.

Good luck
Nicolas


> Le 6 nov. 2016 à 15:03, Joe Lertola [via OSGeo.org] 
>  a écrit :
> 
> Thanks, 
> 
> I will keep in mind the idea of making a plugin if I need to accomplish this 
> task more often in the future. I don’t know if the Python console would work 
> because there would need to be an interface for the user to manually select 
> records that can not be matched exactly. Can that be written for code that 
> goes into the Python console?
> 
> I did use that vlookup function in Excel which is great when the names match 
> exactly. But the close match algorithm is not good because it is more likely 
> than not to find the wrong country name. What you need to do when a record 
> does not match is to manually correct it. This is tedious when there are a 
> lot of names that don’t match.
> 
> -Joe
> 
> 
>> On Nov 6, 2016, at 10:21 AM, Nicolas Cadieux <[hidden email]> wrote:
>> 
>> Hi,
>> Stick to Excel for now.  Keep in mind that Python can be used in the Python 
>> console.  Building a for al plugin may not be necessary.  Have you tried the 
>> vlookup function?  It has a "close match algorithm " by default.  That may 
>> help.
>> Nicolas
>> 
>>> Le 5 nov. 2016 à 22:30, Joe Lertola [via OSGeo.org] <>> href="x-msg://38/user/SendEmail.jtp?type=node&node=5294502&i=0" 
>>> target="_top" rel="nofollow" link="external" class="">[hidden email]> a 
>>> écrit :
>>> 
>>> I used to program in my youth so I am familiar with programming concepts. 
>>> But I would have to learn python and how to create plugins for Qgis from 
>>> scratch. So that is not a project that will happen very fast if I do it. If 
>>> it turns out that I have to create a lot of maps like this I might start 
>>> looking into it. For now I will stick to Excel.
>>> -Joe
>>> 
>>> 
>>> 
>>> Thanks,
>>> -Joe
>>> 
>>> 
 On Nov 5, 2016, at 9:57 AM, Nicolas Cadieux <>>> href="x-msg://38/user/SendEmail.jtp?type=node&node=5294475&i=0" 
 target="_top" rel="nofollow" link="external" class="">[hidden email]> 
 wrote:
 
 Very interesting Nyall 
 
 That makes me remember that the vlookup in excel also has a "bests match" 
 by default.  I always turn it off because it uses the first found possible 
 match.  I wonder if it uses the same type of "Fuzzy" logic...?  
 
 Nicolas
 
> Le 4 nov. 2016 à 23:22, Nyall Dawson [via OSGeo.org] <  
> class="">x-msg://34/user/SendEmail.jtp?type=node&node=5294431&i=0"
>  target="_top" rel="nofollow" link="external" class="">[hidden email]> a 
> écrit :
> 
> 
> On 5 Nov 2016 12:13 PM, "Joe Lertola" <  
> class="">x-msg://34/user/SendEmail.jtp?type=node&node=5294406&i=0"
>  target="_top" rel="nofollow" link="external" class="">[hidden email]> 
> wrote:
> >
> > Hello.
> >
> > Today I made a thematic map by joining a list of data that had country 
> > names to a shape file of world countries. I had to spend a lot of time 
> > working in Excel to make my data names match the names in the shape 
> > file. A lot of them already matched but there were many that didn’t. 
> > For example the the shape file had Ivory Coast and the data had Cte 
> > d’Ivoire as the name. Is there any way to do this in Qgis instead of 
> > Excel? Years ago I recall doing this in ArcMap. There was a tool that 
> > matched up the data where it could and then for each record that wasn’t 
> > matched you could choose the matching record manually. Any help would 
> > be greatly appreciated.
> 
> How good are your python skills? Sounds like a perfect candidate for a 
> new processing algorithm. QgsStringUtils has methods for performing 
> "fuzzy" matching of strings, so a lot of the hard work is already done.
> 
> Nyall
> 
> >
> > Thanks,
> > -Joe
> >
> >
> > ___
> > Qgis-user mailing list
> >  >  
> > class="">x-msg://34/user/SendEmail.jtp?type=node&node=5294406&i=1"
> >  target="_top" rel="nofollow" link="external" class="">[hidden email]
> > List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
> > Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
> 
> 
> ___ 
> Qgis-user mailing list 
>   
> class="">x-msg://34/user/SendEmail.jtp?type=node&node=5294406&i=2"
>  target="_top" rel="nof

Re: [Qgis-user] Joining data to a shape file by country name when the names don't match exactly

2016-11-06 Thread Joe Lertola
Thanks, 

I will keep in mind the idea of making a plugin if I need to accomplish this 
task more often in the future. I don’t know if the Python console would work 
because there would need to be an interface for the user to manually select 
records that can not be matched exactly. Can that be written for code that goes 
into the Python console?

I did use that vlookup function in Excel which is great when the names match 
exactly. But the close match algorithm is not good because it is more likely 
than not to find the wrong country name. What you need to do when a record does 
not match is to manually correct it. This is tedious when there are a lot of 
names that don’t match.

-Joe


> On Nov 6, 2016, at 10:21 AM, Nicolas Cadieux  
> wrote:
> 
> Hi,
> Stick to Excel for now.  Keep in mind that Python can be used in the Python 
> console.  Building a for al plugin may not be necessary.  Have you tried the 
> vlookup function?  It has a "close match algorithm " by default.  That may 
> help.
> Nicolas
> 
> Le 5 nov. 2016 à 22:30, Joe Lertola [via OSGeo.org ] 
> <[hidden email] > a 
> écrit :
> 
>> I used to program in my youth so I am familiar with programming concepts. 
>> But I would have to learn python and how to create plugins for Qgis from 
>> scratch. So that is not a project that will happen very fast if I do it. If 
>> it turns out that I have to create a lot of maps like this I might start 
>> looking into it. For now I will stick to Excel.
>> -Joe
>> 
>> 
>> 
>> Thanks,
>> -Joe
>> 
>> 
>>> On Nov 5, 2016, at 9:57 AM, Nicolas Cadieux <[hidden email] 
>>> > wrote:
>>> 
>>> Very interesting Nyall 
>>> 
>>> That makes me remember that the vlookup in excel also has a "bests match" 
>>> by default.  I always turn it off because it uses the first found possible 
>>> match.  I wonder if it uses the same type of "Fuzzy" logic...?  
>>> 
>>> Nicolas
>>> 
>>> Le 4 nov. 2016 à 23:22, Nyall Dawson [via OSGeo.org ] 
>>> <>> target="_top" rel="nofollow" link="external" class="">[hidden email]> a 
>>> écrit :
>>> 
 
 On 5 Nov 2016 12:13 PM, "Joe Lertola" <>>> href="x-msg://34/user/SendEmail.jtp?type=node&node=5294406&i=0" 
 target="_top" rel="nofollow" link="external" class="">[hidden email]> 
 wrote:
 >
 > Hello.
 >
 > Today I made a thematic map by joining a list of data that had country 
 > names to a shape file of world countries. I had to spend a lot of time 
 > working in Excel to make my data names match the names in the shape 
 > file. A lot of them already matched but there were many that didn’t. For 
 > example the the shape file had Ivory Coast and the data had Cte d’Ivoire 
 > as the name. Is there any way to do this in Qgis instead of Excel? Years 
 > ago I recall doing this in ArcMap. There was a tool that matched up the 
 > data where it could and then for each record that wasn’t matched you 
 > could choose the matching record manually. Any help would be greatly 
 > appreciated.
 
 How good are your python skills? Sounds like a perfect candidate for a new 
 processing algorithm. QgsStringUtils has methods for performing "fuzzy" 
 matching of strings, so a lot of the hard work is already done.
 
 Nyall
 
 >
 > Thanks,
 > -Joe
 >
 >
 > ___
 > Qgis-user mailing list
 > >>> > href="x-msg://34/user/SendEmail.jtp?type=node&node=5294406&i=1" 
 > target="_top" rel="nofollow" link="external" class="">[hidden email]
 > List info: http://lists.osgeo.org/mailman/listinfo/qgis-user 
 > 
 > Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user 
 > 
 
 ___ 
 Qgis-user mailing list 
 >>> target="_top" rel="nofollow" link="external" class="">[hidden email] 
 List info: http://lists.osgeo.org/mailman/listinfo/qgis-user 
 
 Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user 
  
 
 If you reply to this email, your message will be added to the discussion 
 below:
 http://osgeo-org.1560.x6.nabble.com/Fwd-Joining-data-to-a-shape-file-by-country-name-when-the-names-don-t-match-exactly-tp5294403p5294406.html
  
 
 To start a new topic under Quantum GIS - User, email >>> href="x-msg://34/user/SendEmail.jtp?type=node&node=5294431&i=1" 
 target="_top" rel="nofollow" link="external" class="">[hidden email] 
 To unsubscribe from Quantum GIS - User, click here 
 .
 NAML 
 

Re: [Qgis-user] Joining data to a shape file by country name when the names don't match exactly

2016-11-06 Thread Nicolas Cadieux
Hi,
Stick to Excel for now.  Keep in mind that Python can be used in the Python 
console.  Building a for al plugin may not be necessary.  Have you tried the 
vlookup function?  It has a "close match algorithm " by default.  That may help.
Nicolas

> Le 5 nov. 2016 à 22:30, Joe Lertola [via OSGeo.org] 
>  a écrit :
> 
> I used to program in my youth so I am familiar with programming concepts. But 
> I would have to learn python and how to create plugins for Qgis from scratch. 
> So that is not a project that will happen very fast if I do it. If it turns 
> out that I have to create a lot of maps like this I might start looking into 
> it. For now I will stick to Excel.
> -Joe
> 
> 
> 
> Thanks,
> -Joe
> 
> 
>> On Nov 5, 2016, at 9:57 AM, Nicolas Cadieux <[hidden email]> wrote:
>> 
>> Very interesting Nyall 
>> 
>> That makes me remember that the vlookup in excel also has a "bests match" by 
>> default.  I always turn it off because it uses the first found possible 
>> match.  I wonder if it uses the same type of "Fuzzy" logic...?  
>> 
>> Nicolas
>> 
>>> Le 4 nov. 2016 à 23:22, Nyall Dawson [via OSGeo.org] <>> href="x-msg://34/user/SendEmail.jtp?type=node&node=5294431&i=0" 
>>> target="_top" rel="nofollow" link="external" class="">[hidden email]> a 
>>> écrit :
>>> 
>>> 
>>> On 5 Nov 2016 12:13 PM, "Joe Lertola" <>> href="x-msg://34/user/SendEmail.jtp?type=node&node=5294406&i=0" 
>>> target="_top" rel="nofollow" link="external" class="">[hidden email]> wrote:
>>> >
>>> > Hello.
>>> >
>>> > Today I made a thematic map by joining a list of data that had country 
>>> > names to a shape file of world countries. I had to spend a lot of time 
>>> > working in Excel to make my data names match the names in the shape file. 
>>> > A lot of them already matched but there were many that didn’t. For 
>>> > example the the shape file had Ivory Coast and the data had Cte d’Ivoire 
>>> > as the name. Is there any way to do this in Qgis instead of Excel? Years 
>>> > ago I recall doing this in ArcMap. There was a tool that matched up the 
>>> > data where it could and then for each record that wasn’t matched you 
>>> > could choose the matching record manually. Any help would be greatly 
>>> > appreciated.
>>> 
>>> How good are your python skills? Sounds like a perfect candidate for a new 
>>> processing algorithm. QgsStringUtils has methods for performing "fuzzy" 
>>> matching of strings, so a lot of the hard work is already done.
>>> 
>>> Nyall
>>> 
>>> >
>>> > Thanks,
>>> > -Joe
>>> >
>>> >
>>> > ___
>>> > Qgis-user mailing list
>>> > >> > href="x-msg://34/user/SendEmail.jtp?type=node&node=5294406&i=1" 
>>> > target="_top" rel="nofollow" link="external" class="">[hidden email]
>>> > List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
>>> > Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
>>> 
>>> 
>>> ___ 
>>> Qgis-user mailing list 
>>> >> target="_top" rel="nofollow" link="external" class="">[hidden email] 
>>> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
>>> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user 
>>> 
>>> If you reply to this email, your message will be added to the discussion 
>>> below:
>>> http://osgeo-org.1560.x6.nabble.com/Fwd-Joining-data-to-a-shape-file-by-country-name-when-the-names-don-t-match-exactly-tp5294403p5294406.html
>>> To start a new topic under Quantum GIS - User, email >> href="x-msg://34/user/SendEmail.jtp?type=node&node=5294431&i=1" 
>>> target="_top" rel="nofollow" link="external" class="">[hidden email] 
>>> To unsubscribe from Quantum GIS - User, click here.
>>> NAML
>> 
>> View this message in context: Re: Joining data to a shape file by country 
>> name when the names don't match exactly
>> Sent from the Quantum GIS - User mailing list archive at Nabble.com.
>> ___
>> Qgis-user mailing list
>> [hidden email]
>> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
>> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
> 
> 
> 
> ___ 
> Qgis-user mailing list 
> [hidden email] 
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user 
> 
> If you reply to this email, your message will be added to the discussion 
> below:
> http://osgeo-org.1560.x6.nabble.com/Fwd-Joining-data-to-a-shape-file-by-country-name-when-the-names-don-t-match-exactly-tp5294403p5294475.html
> To start a new topic under Quantum GIS - User, email 
> ml-node+s1560n4125267...@n6.nabble.com 
> To unsubscribe from Quantum GIS - User, click here.
> NAML




--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Fwd-Joining-data-to-a-shape-file-by-country-name-when-the-names-don-t-match-exactly-tp5294403p5294502.html
Sent from the Quantum GIS - User mailing list archive at Nabble.com.

Re: [Qgis-user] Joining data to a shape file by country name when the names don't match exactly

2016-11-05 Thread Joe Lertola
I used to program in my youth so I am familiar with programming concepts. But I 
would have to learn python and how to create plugins for Qgis from scratch. So 
that is not a project that will happen very fast if I do it. If it turns out 
that I have to create a lot of maps like this I might start looking into it. 
For now I will stick to Excel.
-Joe



Thanks,
-Joe


> On Nov 5, 2016, at 9:57 AM, Nicolas Cadieux  > wrote:
> 
> Very interesting Nyall 
> 
> That makes me remember that the vlookup in excel also has a "bests match" by 
> default.  I always turn it off because it uses the first found possible 
> match.  I wonder if it uses the same type of "Fuzzy" logic...?  
> 
> Nicolas
> 
> Le 4 nov. 2016 à 23:22, Nyall Dawson [via OSGeo.org ] 
> <[hidden email] > a 
> écrit :
> 
>> 
>> On 5 Nov 2016 12:13 PM, "Joe Lertola" <[hidden email] 
>> > wrote:
>> >
>> > Hello.
>> >
>> > Today I made a thematic map by joining a list of data that had country 
>> > names to a shape file of world countries. I had to spend a lot of time 
>> > working in Excel to make my data names match the names in the shape file. 
>> > A lot of them already matched but there were many that didn’t. For example 
>> > the the shape file had Ivory Coast and the data had Cte d’Ivoire as the 
>> > name. Is there any way to do this in Qgis instead of Excel? Years ago I 
>> > recall doing this in ArcMap. There was a tool that matched up the data 
>> > where it could and then for each record that wasn’t matched you could 
>> > choose the matching record manually. Any help would be greatly appreciated.
>> 
>> How good are your python skills? Sounds like a perfect candidate for a new 
>> processing algorithm. QgsStringUtils has methods for performing "fuzzy" 
>> matching of strings, so a lot of the hard work is already done.
>> 
>> Nyall
>> 
>> >
>> > Thanks,
>> > -Joe
>> >
>> >
>> > ___
>> > Qgis-user mailing list
>> > [hidden email] 
>> > List info: http://lists.osgeo.org/mailman/listinfo/qgis-user 
>> > 
>> > Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user 
>> > 
>> 
>> ___ 
>> Qgis-user mailing list 
>> [hidden email]  
>> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user 
>> 
>> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user 
>>  
>> 
>> If you reply to this email, your message will be added to the discussion 
>> below:
>> http://osgeo-org.1560.x6.nabble.com/Fwd-Joining-data-to-a-shape-file-by-country-name-when-the-names-don-t-match-exactly-tp5294403p5294406.html
>>  
>> 
>> To start a new topic under Quantum GIS - User, email [hidden email] 
>>  
>> To unsubscribe from Quantum GIS - User, click here 
>> .
>> NAML 
>> 
> View this message in context: Re: Joining data to a shape file by country 
> name when the names don't match exactly 
> 
> Sent from the Quantum GIS - User mailing list archive 
>  at 
> Nabble.com .
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org 
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user


___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] Joining data to a shape file by country name when the names don't match exactly

2016-11-05 Thread Nicolas Cadieux
Very interesting Nyall 

That makes me remember that the vlookup in excel also has a "bests match" by 
default.  I always turn it off because it uses the first found possible match.  
I wonder if it uses the same type of "Fuzzy" logic...?  

Nicolas

> Le 4 nov. 2016 à 23:22, Nyall Dawson [via OSGeo.org] 
>  a écrit :
> 
> On 5 Nov 2016 12:13 PM, "Joe Lertola" <[hidden email]> wrote:
> >
> > Hello.
> >
> > Today I made a thematic map by joining a list of data that had country 
> > names to a shape file of world countries. I had to spend a lot of time 
> > working in Excel to make my data names match the names in the shape file. A 
> > lot of them already matched but there were many that didn’t. For example 
> > the the shape file had Ivory Coast and the data had Cte d’Ivoire as the 
> > name. Is there any way to do this in Qgis instead of Excel? Years ago I 
> > recall doing this in ArcMap. There was a tool that matched up the data 
> > where it could and then for each record that wasn’t matched you could 
> > choose the matching record manually. Any help would be greatly appreciated.
> 
> How good are your python skills? Sounds like a perfect candidate for a new 
> processing algorithm. QgsStringUtils has methods for performing "fuzzy" 
> matching of strings, so a lot of the hard work is already done.
> 
> Nyall
> 
> >
> > Thanks,
> > -Joe
> >
> >
> > ___
> > Qgis-user mailing list
> > [hidden email]
> > List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
> > Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
> 
> 
> ___ 
> Qgis-user mailing list 
> [hidden email] 
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user 
> 
> If you reply to this email, your message will be added to the discussion 
> below:
> http://osgeo-org.1560.x6.nabble.com/Fwd-Joining-data-to-a-shape-file-by-country-name-when-the-names-don-t-match-exactly-tp5294403p5294406.html
> To start a new topic under Quantum GIS - User, email 
> ml-node+s1560n4125267...@n6.nabble.com 
> To unsubscribe from Quantum GIS - User, click here.
> NAML




--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Fwd-Joining-data-to-a-shape-file-by-country-name-when-the-names-don-t-match-exactly-tp5294403p5294431.html
Sent from the Quantum GIS - User mailing list archive at Nabble.com.___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] Joining data to a shape file by country name when the names don't match exactly

2016-11-04 Thread Nicolas Cadieux
Hi,

You  always add the coordinates of the point data and then make a spatial join 
instead of a join based on names...  If not, the vlookup function in excel 
would let you see what data does not match based on the names.

Nicolas

> Le 4 nov. 2016 à 22:13, Joe Lertola [via OSGeo.org] 
>  a écrit :
> 
> Hello.
> 
> Today I made a thematic map by joining a list of data that had country names 
> to a shape file of world countries. I had to spend a lot of time working in 
> Excel to make my data names match the names in the shape file. A lot of them 
> already matched but there were many that didn’t. For example the the shape 
> file had Ivory Coast and the data had Cte d’Ivoire as the name. Is there any 
> way to do this in Qgis instead of Excel? Years ago I recall doing this in 
> ArcMap. There was a tool that matched up the data where it could and then for 
> each record that wasn’t matched you could choose the matching record 
> manually. Any help would be greatly appreciated.
> 
> Thanks,
> -Joe
> 
> 
> ___ 
> Qgis-user mailing list 
> [hidden email] 
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user 
> 
> If you reply to this email, your message will be added to the discussion 
> below:
> http://osgeo-org.1560.x6.nabble.com/Fwd-Joining-data-to-a-shape-file-by-country-name-when-the-names-don-t-match-exactly-tp5294403.html
> To start a new topic under Quantum GIS - User, email 
> ml-node+s1560n4125267...@n6.nabble.com 
> To unsubscribe from Quantum GIS - User, click here.
> NAML




--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Fwd-Joining-data-to-a-shape-file-by-country-name-when-the-names-don-t-match-exactly-tp5294403p5294405.html
Sent from the Quantum GIS - User mailing list archive at Nabble.com.___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user