Spatial interpolation from categorical data in R The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)How to grid unevenly sampled categorical data?Method to compute and visualize the closest set of facilities from OSM dataUnderstanding the cell size argument in the kriging tool, ArcGISInterpolation of categorical data from a polygon surface with gapsHow to Convert from Point to Continuous Raster in ArcGIS 10.1?How to perform loop on raster files?Accounting for spatial autocorrelation in rastersMost suitable interpolation method - regriddingCreating polygon grid from SpatialPoints in R?Choosing interpolation method for grid data?

Button changing its text & action. Good or terrible?

Why did Peik Lin say, "I'm not an animal"?

How to grep and cut numbes from a file and sum them

Are my PIs rude or am I just being too sensitive?

ELI5: Why do they say that Israel would have been the fourth country to land a spacecraft on the Moon and why do they call it low cost?

How to tell if two pearson correlations from the same sample differ significanly

Can't put ground on the correct place (circuitikz)

What force causes entropy to increase?

"... to apply for a visa" or "... and applied for a visa"?

Windows 10: How to Lock (not sleep) laptop on lid close?

Simulating Exploding Dice

Am I ethically obligated to go into work on an off day if the reason is sudden?

First use of “packing” as in carrying a gun

Is it ok to offer lower paid work as a trial period before negotiating for a full-time job?

Is there any ipmitool similar software for Windows?

Homework question about an engine pulling a train

Does Parliament hold absolute power in the UK?

Are there continuous functions who are the same in an interval but differ in at least one other point?

Hopping to infinity along a string of digits

Identify 80s or 90s comics with ripped creatures (not dwarves)

Are spiders unable to hurt humans, especially very small spiders?

University's motivation for having tenure-track positions

Use a PHP file as action for a form in a WordPress plugin, what's the correct way?

Typeface like Times New Roman but with "tied" percent sign



Spatial interpolation from categorical data in R



The 2019 Stack Overflow Developer Survey Results Are In
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)How to grid unevenly sampled categorical data?Method to compute and visualize the closest set of facilities from OSM dataUnderstanding the cell size argument in the kriging tool, ArcGISInterpolation of categorical data from a polygon surface with gapsHow to Convert from Point to Continuous Raster in ArcGIS 10.1?How to perform loop on raster files?Accounting for spatial autocorrelation in rastersMost suitable interpolation method - regriddingCreating polygon grid from SpatialPoints in R?Choosing interpolation method for grid data?



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








4















I have a spatial point data set, where each point represents a person pronouncing a word in a specific fashion. Let's say I have six different pronunciations.



In an earlier iteration, I aggregated the point data to a hexagonal grid, the color represents the dominant pronunciation in the hexagon while the opacity represents its dominance, see: https://www.srf.ch/static/srf-data/data/2016/dialektkarten-karte/



Now I'd like to spatially interpolate the data to get a continuous surface, similar as Josh Katz did: http://www4.ncsu.edu/~jakatz2/files/dialectposter.png



enter image description here



He uses something he calls "k-nearest neighbor kernel smoothing" but he's not publishing his R code so I don't fully understand how that is supposed to work with categorical data. I perfectly understand on how to do it with continuous variables, but not with the latter.



The pseudo-algorithm I came up with so far:



  • Repeat the "final estimate" formula for each pronunciation, using yi = 1 for points where that pronunciation is used, yi = 0 if not. By doing so, you get a grid for each pronunciation. The cells represent the probabilities of the respective pronunciation appearing at that grid cell.

  • Now, find the most probable pronunciation in each grid cell. This determines the cell color (hue). Its probability determines the color value (i.e.: the higher, the darker, and vice versa).

  • Find a way to map that resulting grid / raster - might be tricky because it contains two variables that need to be mapped to visual variables (dominant pronunciation and its probability).

But maybe this is completely off - and also, I wonder whether there are R packages for spatial interpolation of categorical data. So far I have only found knn methods and the like and I suppose I have to build something myself.










share|improve this question

















  • 2





    Have you tried kknn? cran.rstudio.com/web/packages/kknn/kknn.pdf This package looks like it implements exactly what Katz has done.

    – Liam G
    May 31 '17 at 10:14











  • Seems like what I'm looking for, yes. Thanks a lot! Right now I'm trying to figure out what the different parameters exactly mean - do you know of any tutorial or paper apart from that manual? I will try to post an answer to my own question once I come up with a good solution for my case.

    – wnstnsmth
    Jun 1 '17 at 19:02

















4















I have a spatial point data set, where each point represents a person pronouncing a word in a specific fashion. Let's say I have six different pronunciations.



In an earlier iteration, I aggregated the point data to a hexagonal grid, the color represents the dominant pronunciation in the hexagon while the opacity represents its dominance, see: https://www.srf.ch/static/srf-data/data/2016/dialektkarten-karte/



Now I'd like to spatially interpolate the data to get a continuous surface, similar as Josh Katz did: http://www4.ncsu.edu/~jakatz2/files/dialectposter.png



enter image description here



He uses something he calls "k-nearest neighbor kernel smoothing" but he's not publishing his R code so I don't fully understand how that is supposed to work with categorical data. I perfectly understand on how to do it with continuous variables, but not with the latter.



The pseudo-algorithm I came up with so far:



  • Repeat the "final estimate" formula for each pronunciation, using yi = 1 for points where that pronunciation is used, yi = 0 if not. By doing so, you get a grid for each pronunciation. The cells represent the probabilities of the respective pronunciation appearing at that grid cell.

  • Now, find the most probable pronunciation in each grid cell. This determines the cell color (hue). Its probability determines the color value (i.e.: the higher, the darker, and vice versa).

  • Find a way to map that resulting grid / raster - might be tricky because it contains two variables that need to be mapped to visual variables (dominant pronunciation and its probability).

But maybe this is completely off - and also, I wonder whether there are R packages for spatial interpolation of categorical data. So far I have only found knn methods and the like and I suppose I have to build something myself.










share|improve this question

















  • 2





    Have you tried kknn? cran.rstudio.com/web/packages/kknn/kknn.pdf This package looks like it implements exactly what Katz has done.

    – Liam G
    May 31 '17 at 10:14











  • Seems like what I'm looking for, yes. Thanks a lot! Right now I'm trying to figure out what the different parameters exactly mean - do you know of any tutorial or paper apart from that manual? I will try to post an answer to my own question once I come up with a good solution for my case.

    – wnstnsmth
    Jun 1 '17 at 19:02













4












4








4


0






I have a spatial point data set, where each point represents a person pronouncing a word in a specific fashion. Let's say I have six different pronunciations.



In an earlier iteration, I aggregated the point data to a hexagonal grid, the color represents the dominant pronunciation in the hexagon while the opacity represents its dominance, see: https://www.srf.ch/static/srf-data/data/2016/dialektkarten-karte/



Now I'd like to spatially interpolate the data to get a continuous surface, similar as Josh Katz did: http://www4.ncsu.edu/~jakatz2/files/dialectposter.png



enter image description here



He uses something he calls "k-nearest neighbor kernel smoothing" but he's not publishing his R code so I don't fully understand how that is supposed to work with categorical data. I perfectly understand on how to do it with continuous variables, but not with the latter.



The pseudo-algorithm I came up with so far:



  • Repeat the "final estimate" formula for each pronunciation, using yi = 1 for points where that pronunciation is used, yi = 0 if not. By doing so, you get a grid for each pronunciation. The cells represent the probabilities of the respective pronunciation appearing at that grid cell.

  • Now, find the most probable pronunciation in each grid cell. This determines the cell color (hue). Its probability determines the color value (i.e.: the higher, the darker, and vice versa).

  • Find a way to map that resulting grid / raster - might be tricky because it contains two variables that need to be mapped to visual variables (dominant pronunciation and its probability).

But maybe this is completely off - and also, I wonder whether there are R packages for spatial interpolation of categorical data. So far I have only found knn methods and the like and I suppose I have to build something myself.










share|improve this question














I have a spatial point data set, where each point represents a person pronouncing a word in a specific fashion. Let's say I have six different pronunciations.



In an earlier iteration, I aggregated the point data to a hexagonal grid, the color represents the dominant pronunciation in the hexagon while the opacity represents its dominance, see: https://www.srf.ch/static/srf-data/data/2016/dialektkarten-karte/



Now I'd like to spatially interpolate the data to get a continuous surface, similar as Josh Katz did: http://www4.ncsu.edu/~jakatz2/files/dialectposter.png



enter image description here



He uses something he calls "k-nearest neighbor kernel smoothing" but he's not publishing his R code so I don't fully understand how that is supposed to work with categorical data. I perfectly understand on how to do it with continuous variables, but not with the latter.



The pseudo-algorithm I came up with so far:



  • Repeat the "final estimate" formula for each pronunciation, using yi = 1 for points where that pronunciation is used, yi = 0 if not. By doing so, you get a grid for each pronunciation. The cells represent the probabilities of the respective pronunciation appearing at that grid cell.

  • Now, find the most probable pronunciation in each grid cell. This determines the cell color (hue). Its probability determines the color value (i.e.: the higher, the darker, and vice versa).

  • Find a way to map that resulting grid / raster - might be tricky because it contains two variables that need to be mapped to visual variables (dominant pronunciation and its probability).

But maybe this is completely off - and also, I wonder whether there are R packages for spatial interpolation of categorical data. So far I have only found knn methods and the like and I suppose I have to build something myself.







raster r interpolation kernel-density






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked May 31 '17 at 6:06









wnstnsmthwnstnsmth

287320




287320







  • 2





    Have you tried kknn? cran.rstudio.com/web/packages/kknn/kknn.pdf This package looks like it implements exactly what Katz has done.

    – Liam G
    May 31 '17 at 10:14











  • Seems like what I'm looking for, yes. Thanks a lot! Right now I'm trying to figure out what the different parameters exactly mean - do you know of any tutorial or paper apart from that manual? I will try to post an answer to my own question once I come up with a good solution for my case.

    – wnstnsmth
    Jun 1 '17 at 19:02












  • 2





    Have you tried kknn? cran.rstudio.com/web/packages/kknn/kknn.pdf This package looks like it implements exactly what Katz has done.

    – Liam G
    May 31 '17 at 10:14











  • Seems like what I'm looking for, yes. Thanks a lot! Right now I'm trying to figure out what the different parameters exactly mean - do you know of any tutorial or paper apart from that manual? I will try to post an answer to my own question once I come up with a good solution for my case.

    – wnstnsmth
    Jun 1 '17 at 19:02







2




2





Have you tried kknn? cran.rstudio.com/web/packages/kknn/kknn.pdf This package looks like it implements exactly what Katz has done.

– Liam G
May 31 '17 at 10:14





Have you tried kknn? cran.rstudio.com/web/packages/kknn/kknn.pdf This package looks like it implements exactly what Katz has done.

– Liam G
May 31 '17 at 10:14













Seems like what I'm looking for, yes. Thanks a lot! Right now I'm trying to figure out what the different parameters exactly mean - do you know of any tutorial or paper apart from that manual? I will try to post an answer to my own question once I come up with a good solution for my case.

– wnstnsmth
Jun 1 '17 at 19:02





Seems like what I'm looking for, yes. Thanks a lot! Right now I'm trying to figure out what the different parameters exactly mean - do you know of any tutorial or paper apart from that manual? I will try to post an answer to my own question once I come up with a good solution for my case.

– wnstnsmth
Jun 1 '17 at 19:02










1 Answer
1






active

oldest

votes


















0














In the end, I figured out a method with the kknn package. If somebody is still interested in this answer, I recommend reading my blog post on the topic.






share|improve this answer























    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "79"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f242243%2fspatial-interpolation-from-categorical-data-in-r%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    In the end, I figured out a method with the kknn package. If somebody is still interested in this answer, I recommend reading my blog post on the topic.






    share|improve this answer



























      0














      In the end, I figured out a method with the kknn package. If somebody is still interested in this answer, I recommend reading my blog post on the topic.






      share|improve this answer

























        0












        0








        0







        In the end, I figured out a method with the kknn package. If somebody is still interested in this answer, I recommend reading my blog post on the topic.






        share|improve this answer













        In the end, I figured out a method with the kknn package. If somebody is still interested in this answer, I recommend reading my blog post on the topic.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Apr 7 at 16:01









        wnstnsmthwnstnsmth

        287320




        287320



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Geographic Information Systems Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f242243%2fspatial-interpolation-from-categorical-data-in-r%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Ромео және Джульетта Мазмұны Қысқаша сипаттамасы Кейіпкерлері Кино Дереккөздер Бағыттау мәзірі

            Crop image to path created in TikZ? Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)Crop an inserted image?TikZ pictures does not appear in posterImage behind and beyond crop marks?Tikz picture as large as possible on A4 PageTransparency vs image compression dilemmaHow to crop background from image automatically?Image does not cropTikzexternal capturing crop marks when externalizing pgfplots?How to include image path that contains a dollar signCrop image with left size given

            Гале (Шры-Ланка) Змест Геаграфія | Гісторыя | Інфраструктура | Славутыя мясціны | Гарады-пабрацімы | Галерэя | Спасылкі | НавігацыяHGЯOHGЯOgalle.mc.gov.lkГале на сайце ЮНЕСКАТурыстычны даведнікПорт ГалеКультура і гісторыяКаталіцкая царква ў Галерус.англ.фр.