Using Hot Spot Analysis Plugin on QGIS 3? Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?QGIS 3 Plugin folder locationHow to install Python library (Openpyxl) in QGIS 2.18.16?Installing QGIS Statist plugin in Mac OS X?Using Space Syntax Analysis plugin for QGIS?Plugin error: Photo2shape QGIS PisaQuickMap Services plugin for QGIS corruptedsphinx to document QGIS pluginPic2Map QGIS Plugin Installation IssueWhere is uninstalled plugin tab in Plugin window of QGIS?How to install HouseNumbering Plugin for QGIS 3.2?QGIS 3 plugin not able to detect Python packagesUpdate Easy AHP plugin of QGIS 3.6
Would "destroying" Wurmcoil Engine prevent its tokens from being created?
How do I find out the mythology and history of my Fortress?
What is the meaning of the simile “quick as silk”?
Denied boarding although I have proper visa and documentation. To whom should I make a complaint?
What does the "x" in "x86" represent?
What is homebrew?
How to superpose two composite qubit states?
Need Bar Animation Gradient Fixed
What would be the ideal power source for a cybernetic eye?
Why do we bend a book to keep it straight?
Around usage results
Is safe to use va_start macro with this as parameter?
Quick way to create a symlink?
How to find 'n' nodes where all distances between them are greater than 'k'?
How to react to hostile behavior from a senior developer?
What is the longest distance a player character can jump in one leap?
Do wooden building fires get hotter than 600°C?
3 doors, three guards, one stone
Can a party unilaterally change incumbent candidates in preparation for a General election?
When a candle burns, why does the top of wick glow if bottom of flame is hottest?
Withdrew £2800, but only £2000 shows as withdrawn on online banking; what are my obligations?
If my PI received research grants from a company to be able to pay my postdoc salary, did I have a potential conflict interest too?
What does this Jacques Hadamard quote mean?
Why are the trig functions versine, haversine, exsecant, etc, rarely used in modern mathematics?
Using Hot Spot Analysis Plugin on QGIS 3?
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
Announcing the arrival of Valued Associate #679: Cesar Manara
Unicorn Meta Zoo #1: Why another podcast?QGIS 3 Plugin folder locationHow to install Python library (Openpyxl) in QGIS 2.18.16?Installing QGIS Statist plugin in Mac OS X?Using Space Syntax Analysis plugin for QGIS?Plugin error: Photo2shape QGIS PisaQuickMap Services plugin for QGIS corruptedsphinx to document QGIS pluginPic2Map QGIS Plugin Installation IssueWhere is uninstalled plugin tab in Plugin window of QGIS?How to install HouseNumbering Plugin for QGIS 3.2?QGIS 3 plugin not able to detect Python packagesUpdate Easy AHP plugin of QGIS 3.6
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I need a help on trying to use the Hot Spot Analysis Plugin on QGIS Noosa. I am not able to install the module "moran".
qgis-plugins qgis-3 installation
add a comment |
I need a help on trying to use the Hot Spot Analysis Plugin on QGIS Noosa. I am not able to install the module "moran".
qgis-plugins qgis-3 installation
intall using something like this gis.stackexchange.com/a/269766/49538
– Fran Raga
Apr 9 at 7:42
What kind of error do you encounter when you try to use the plugin?
– Kadir Şahbaz
Apr 9 at 21:16
Hi Kadir, this is the error I found: This is the error I found :Couldn't load plugin 'HotspotAnalysis' due to an error when calling its classFactory() method ModuleNotFoundError: No module named 'moran'.
– user140183
Apr 10 at 7:54
1
Please add the error message to your question.
– Kadir Şahbaz
Apr 10 at 9:20
Did you follow the instructions to install Pysal, as mentioned in the plugin description: "The plugin requires Pysal (see repository for installation instruction)" ?
– csk
Apr 11 at 19:01
add a comment |
I need a help on trying to use the Hot Spot Analysis Plugin on QGIS Noosa. I am not able to install the module "moran".
qgis-plugins qgis-3 installation
I need a help on trying to use the Hot Spot Analysis Plugin on QGIS Noosa. I am not able to install the module "moran".
qgis-plugins qgis-3 installation
qgis-plugins qgis-3 installation
edited Apr 10 at 8:22
Kadir Şahbaz
4,69221531
4,69221531
asked Apr 9 at 7:38
user140183user140183
111
111
intall using something like this gis.stackexchange.com/a/269766/49538
– Fran Raga
Apr 9 at 7:42
What kind of error do you encounter when you try to use the plugin?
– Kadir Şahbaz
Apr 9 at 21:16
Hi Kadir, this is the error I found: This is the error I found :Couldn't load plugin 'HotspotAnalysis' due to an error when calling its classFactory() method ModuleNotFoundError: No module named 'moran'.
– user140183
Apr 10 at 7:54
1
Please add the error message to your question.
– Kadir Şahbaz
Apr 10 at 9:20
Did you follow the instructions to install Pysal, as mentioned in the plugin description: "The plugin requires Pysal (see repository for installation instruction)" ?
– csk
Apr 11 at 19:01
add a comment |
intall using something like this gis.stackexchange.com/a/269766/49538
– Fran Raga
Apr 9 at 7:42
What kind of error do you encounter when you try to use the plugin?
– Kadir Şahbaz
Apr 9 at 21:16
Hi Kadir, this is the error I found: This is the error I found :Couldn't load plugin 'HotspotAnalysis' due to an error when calling its classFactory() method ModuleNotFoundError: No module named 'moran'.
– user140183
Apr 10 at 7:54
1
Please add the error message to your question.
– Kadir Şahbaz
Apr 10 at 9:20
Did you follow the instructions to install Pysal, as mentioned in the plugin description: "The plugin requires Pysal (see repository for installation instruction)" ?
– csk
Apr 11 at 19:01
intall using something like this gis.stackexchange.com/a/269766/49538
– Fran Raga
Apr 9 at 7:42
intall using something like this gis.stackexchange.com/a/269766/49538
– Fran Raga
Apr 9 at 7:42
What kind of error do you encounter when you try to use the plugin?
– Kadir Şahbaz
Apr 9 at 21:16
What kind of error do you encounter when you try to use the plugin?
– Kadir Şahbaz
Apr 9 at 21:16
Hi Kadir, this is the error I found: This is the error I found :Couldn't load plugin 'HotspotAnalysis' due to an error when calling its classFactory() method ModuleNotFoundError: No module named 'moran'.
– user140183
Apr 10 at 7:54
Hi Kadir, this is the error I found: This is the error I found :Couldn't load plugin 'HotspotAnalysis' due to an error when calling its classFactory() method ModuleNotFoundError: No module named 'moran'.
– user140183
Apr 10 at 7:54
1
1
Please add the error message to your question.
– Kadir Şahbaz
Apr 10 at 9:20
Please add the error message to your question.
– Kadir Şahbaz
Apr 10 at 9:20
Did you follow the instructions to install Pysal, as mentioned in the plugin description: "The plugin requires Pysal (see repository for installation instruction)" ?
– csk
Apr 11 at 19:01
Did you follow the instructions to install Pysal, as mentioned in the plugin description: "The plugin requires Pysal (see repository for installation instruction)" ?
– csk
Apr 11 at 19:01
add a comment |
1 Answer
1
active
oldest
votes
The module moran is a part of pysal package. So you can't install it using pip or something.
Developers of pysal changed the folder structure of the package. This is probably why you can't use the plugin or are getting errors. Hotspot Analysis plugin needs an update, but you follow such a temporary solution I explain below.
If you look at hotspot_analysis.py file (QGIS 3 Plugins folder location), you will see the lines (line numbers may be different than yours. I skipped the indentation).
Line 39 from pysal.esda.getisord import *
Line 40 from pysal.esda.moran import *
Line 41 from pysal.weights.Distance import DistanceBand
.
Line 472 thresh = pysal.min_threshold_dist_from_shapefile(path)
.
Line 600 moran = pysal.Moran(y, w)
.
Line 608 w = pysal.knnW_from_shapefile(layerName.split("|")[0], k=weightValue, p=1)
.
Line 613 w = pysal.queen_from_shapefile(layerName.split("|")[0])
Change those lines into the lines below, respectively.
from pysal.explore.esda.getisord import *
from pysal.explore.esda.moran import *
from pysal.lib.weights import DistanceBand, Queen, KNN, user
.
thresh = user.min_threshold_dist_from_shapefile(path)
.
moran = Moran(y, w)
.
w = KNN.from_shapefile(layerName.split("|")[0], k=weightValue, p=1)
.
w = Queen.from_shapefile(layerName.split("|")[0])
Save the changes and re-activate the plugin or re-open QGIS.
Thanks Kadir. You are simply Amazing. Your recommendations worked perfectly.
– user140183
Apr 10 at 9:12
But it solves temporarily. When I select a line layer, I encounter an error, as an example.
– Kadir Şahbaz
Apr 10 at 9:17
I am afraid I also encountered an error as well while performing the analysis. This is the error I got "TypeError: ufunc 'multiply' did not contain a loop with signature matching types dtype(' " Any idea how to work around this.
– user140183
Apr 10 at 9:27
If I use a 'string' field, I get the same error, too. I have no idea.
– Kadir Şahbaz
Apr 10 at 9:35
This explains why you can only use a numeric field while using ArcGIS. I will try to use a numeric field. Thanks
– user140183
Apr 10 at 9:40
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f318202%2fusing-hot-spot-analysis-plugin-on-qgis-3%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
The module moran is a part of pysal package. So you can't install it using pip or something.
Developers of pysal changed the folder structure of the package. This is probably why you can't use the plugin or are getting errors. Hotspot Analysis plugin needs an update, but you follow such a temporary solution I explain below.
If you look at hotspot_analysis.py file (QGIS 3 Plugins folder location), you will see the lines (line numbers may be different than yours. I skipped the indentation).
Line 39 from pysal.esda.getisord import *
Line 40 from pysal.esda.moran import *
Line 41 from pysal.weights.Distance import DistanceBand
.
Line 472 thresh = pysal.min_threshold_dist_from_shapefile(path)
.
Line 600 moran = pysal.Moran(y, w)
.
Line 608 w = pysal.knnW_from_shapefile(layerName.split("|")[0], k=weightValue, p=1)
.
Line 613 w = pysal.queen_from_shapefile(layerName.split("|")[0])
Change those lines into the lines below, respectively.
from pysal.explore.esda.getisord import *
from pysal.explore.esda.moran import *
from pysal.lib.weights import DistanceBand, Queen, KNN, user
.
thresh = user.min_threshold_dist_from_shapefile(path)
.
moran = Moran(y, w)
.
w = KNN.from_shapefile(layerName.split("|")[0], k=weightValue, p=1)
.
w = Queen.from_shapefile(layerName.split("|")[0])
Save the changes and re-activate the plugin or re-open QGIS.
Thanks Kadir. You are simply Amazing. Your recommendations worked perfectly.
– user140183
Apr 10 at 9:12
But it solves temporarily. When I select a line layer, I encounter an error, as an example.
– Kadir Şahbaz
Apr 10 at 9:17
I am afraid I also encountered an error as well while performing the analysis. This is the error I got "TypeError: ufunc 'multiply' did not contain a loop with signature matching types dtype(' " Any idea how to work around this.
– user140183
Apr 10 at 9:27
If I use a 'string' field, I get the same error, too. I have no idea.
– Kadir Şahbaz
Apr 10 at 9:35
This explains why you can only use a numeric field while using ArcGIS. I will try to use a numeric field. Thanks
– user140183
Apr 10 at 9:40
add a comment |
The module moran is a part of pysal package. So you can't install it using pip or something.
Developers of pysal changed the folder structure of the package. This is probably why you can't use the plugin or are getting errors. Hotspot Analysis plugin needs an update, but you follow such a temporary solution I explain below.
If you look at hotspot_analysis.py file (QGIS 3 Plugins folder location), you will see the lines (line numbers may be different than yours. I skipped the indentation).
Line 39 from pysal.esda.getisord import *
Line 40 from pysal.esda.moran import *
Line 41 from pysal.weights.Distance import DistanceBand
.
Line 472 thresh = pysal.min_threshold_dist_from_shapefile(path)
.
Line 600 moran = pysal.Moran(y, w)
.
Line 608 w = pysal.knnW_from_shapefile(layerName.split("|")[0], k=weightValue, p=1)
.
Line 613 w = pysal.queen_from_shapefile(layerName.split("|")[0])
Change those lines into the lines below, respectively.
from pysal.explore.esda.getisord import *
from pysal.explore.esda.moran import *
from pysal.lib.weights import DistanceBand, Queen, KNN, user
.
thresh = user.min_threshold_dist_from_shapefile(path)
.
moran = Moran(y, w)
.
w = KNN.from_shapefile(layerName.split("|")[0], k=weightValue, p=1)
.
w = Queen.from_shapefile(layerName.split("|")[0])
Save the changes and re-activate the plugin or re-open QGIS.
Thanks Kadir. You are simply Amazing. Your recommendations worked perfectly.
– user140183
Apr 10 at 9:12
But it solves temporarily. When I select a line layer, I encounter an error, as an example.
– Kadir Şahbaz
Apr 10 at 9:17
I am afraid I also encountered an error as well while performing the analysis. This is the error I got "TypeError: ufunc 'multiply' did not contain a loop with signature matching types dtype(' " Any idea how to work around this.
– user140183
Apr 10 at 9:27
If I use a 'string' field, I get the same error, too. I have no idea.
– Kadir Şahbaz
Apr 10 at 9:35
This explains why you can only use a numeric field while using ArcGIS. I will try to use a numeric field. Thanks
– user140183
Apr 10 at 9:40
add a comment |
The module moran is a part of pysal package. So you can't install it using pip or something.
Developers of pysal changed the folder structure of the package. This is probably why you can't use the plugin or are getting errors. Hotspot Analysis plugin needs an update, but you follow such a temporary solution I explain below.
If you look at hotspot_analysis.py file (QGIS 3 Plugins folder location), you will see the lines (line numbers may be different than yours. I skipped the indentation).
Line 39 from pysal.esda.getisord import *
Line 40 from pysal.esda.moran import *
Line 41 from pysal.weights.Distance import DistanceBand
.
Line 472 thresh = pysal.min_threshold_dist_from_shapefile(path)
.
Line 600 moran = pysal.Moran(y, w)
.
Line 608 w = pysal.knnW_from_shapefile(layerName.split("|")[0], k=weightValue, p=1)
.
Line 613 w = pysal.queen_from_shapefile(layerName.split("|")[0])
Change those lines into the lines below, respectively.
from pysal.explore.esda.getisord import *
from pysal.explore.esda.moran import *
from pysal.lib.weights import DistanceBand, Queen, KNN, user
.
thresh = user.min_threshold_dist_from_shapefile(path)
.
moran = Moran(y, w)
.
w = KNN.from_shapefile(layerName.split("|")[0], k=weightValue, p=1)
.
w = Queen.from_shapefile(layerName.split("|")[0])
Save the changes and re-activate the plugin or re-open QGIS.
The module moran is a part of pysal package. So you can't install it using pip or something.
Developers of pysal changed the folder structure of the package. This is probably why you can't use the plugin or are getting errors. Hotspot Analysis plugin needs an update, but you follow such a temporary solution I explain below.
If you look at hotspot_analysis.py file (QGIS 3 Plugins folder location), you will see the lines (line numbers may be different than yours. I skipped the indentation).
Line 39 from pysal.esda.getisord import *
Line 40 from pysal.esda.moran import *
Line 41 from pysal.weights.Distance import DistanceBand
.
Line 472 thresh = pysal.min_threshold_dist_from_shapefile(path)
.
Line 600 moran = pysal.Moran(y, w)
.
Line 608 w = pysal.knnW_from_shapefile(layerName.split("|")[0], k=weightValue, p=1)
.
Line 613 w = pysal.queen_from_shapefile(layerName.split("|")[0])
Change those lines into the lines below, respectively.
from pysal.explore.esda.getisord import *
from pysal.explore.esda.moran import *
from pysal.lib.weights import DistanceBand, Queen, KNN, user
.
thresh = user.min_threshold_dist_from_shapefile(path)
.
moran = Moran(y, w)
.
w = KNN.from_shapefile(layerName.split("|")[0], k=weightValue, p=1)
.
w = Queen.from_shapefile(layerName.split("|")[0])
Save the changes and re-activate the plugin or re-open QGIS.
answered Apr 10 at 8:18
Kadir ŞahbazKadir Şahbaz
4,69221531
4,69221531
Thanks Kadir. You are simply Amazing. Your recommendations worked perfectly.
– user140183
Apr 10 at 9:12
But it solves temporarily. When I select a line layer, I encounter an error, as an example.
– Kadir Şahbaz
Apr 10 at 9:17
I am afraid I also encountered an error as well while performing the analysis. This is the error I got "TypeError: ufunc 'multiply' did not contain a loop with signature matching types dtype(' " Any idea how to work around this.
– user140183
Apr 10 at 9:27
If I use a 'string' field, I get the same error, too. I have no idea.
– Kadir Şahbaz
Apr 10 at 9:35
This explains why you can only use a numeric field while using ArcGIS. I will try to use a numeric field. Thanks
– user140183
Apr 10 at 9:40
add a comment |
Thanks Kadir. You are simply Amazing. Your recommendations worked perfectly.
– user140183
Apr 10 at 9:12
But it solves temporarily. When I select a line layer, I encounter an error, as an example.
– Kadir Şahbaz
Apr 10 at 9:17
I am afraid I also encountered an error as well while performing the analysis. This is the error I got "TypeError: ufunc 'multiply' did not contain a loop with signature matching types dtype(' " Any idea how to work around this.
– user140183
Apr 10 at 9:27
If I use a 'string' field, I get the same error, too. I have no idea.
– Kadir Şahbaz
Apr 10 at 9:35
This explains why you can only use a numeric field while using ArcGIS. I will try to use a numeric field. Thanks
– user140183
Apr 10 at 9:40
Thanks Kadir. You are simply Amazing. Your recommendations worked perfectly.
– user140183
Apr 10 at 9:12
Thanks Kadir. You are simply Amazing. Your recommendations worked perfectly.
– user140183
Apr 10 at 9:12
But it solves temporarily. When I select a line layer, I encounter an error, as an example.
– Kadir Şahbaz
Apr 10 at 9:17
But it solves temporarily. When I select a line layer, I encounter an error, as an example.
– Kadir Şahbaz
Apr 10 at 9:17
I am afraid I also encountered an error as well while performing the analysis. This is the error I got "TypeError: ufunc 'multiply' did not contain a loop with signature matching types dtype(' " Any idea how to work around this.
– user140183
Apr 10 at 9:27
I am afraid I also encountered an error as well while performing the analysis. This is the error I got "TypeError: ufunc 'multiply' did not contain a loop with signature matching types dtype(' " Any idea how to work around this.
– user140183
Apr 10 at 9:27
If I use a 'string' field, I get the same error, too. I have no idea.
– Kadir Şahbaz
Apr 10 at 9:35
If I use a 'string' field, I get the same error, too. I have no idea.
– Kadir Şahbaz
Apr 10 at 9:35
This explains why you can only use a numeric field while using ArcGIS. I will try to use a numeric field. Thanks
– user140183
Apr 10 at 9:40
This explains why you can only use a numeric field while using ArcGIS. I will try to use a numeric field. Thanks
– user140183
Apr 10 at 9:40
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f318202%2fusing-hot-spot-analysis-plugin-on-qgis-3%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
intall using something like this gis.stackexchange.com/a/269766/49538
– Fran Raga
Apr 9 at 7:42
What kind of error do you encounter when you try to use the plugin?
– Kadir Şahbaz
Apr 9 at 21:16
Hi Kadir, this is the error I found: This is the error I found :Couldn't load plugin 'HotspotAnalysis' due to an error when calling its classFactory() method ModuleNotFoundError: No module named 'moran'.
– user140183
Apr 10 at 7:54
1
Please add the error message to your question.
– Kadir Şahbaz
Apr 10 at 9:20
Did you follow the instructions to install Pysal, as mentioned in the plugin description: "The plugin requires Pysal (see repository for installation instruction)" ?
– csk
Apr 11 at 19:01