Python - Search plugin of Folium doesn't appear - python-3.x

I'm trying to reproduce the following jupyter notebook :
https://nbviewer.jupyter.org/github/jtbaker/folium/blob/geojsonmarker/examples/plugin-Search.ipynb
But once I'm trying to create the map I had to make a few changes to the search plugin because of the documentation:
citysearch = Search(layer=citygeo,
geom_type='Point',
placeholder="Search for a US City",
collapsed=True,
search_label='nameascii'
).add_to(m)
becomes, according to the folium documentation here :
citysearch = Search(data=citygeo,
geom_type='Point',
search_label='nameascii'
).add_to(m)
The issue is that, at best the search plugin doesn't appear and at worse my folium map isn't displayed. Does anyone have this problem as well ? Or is there any dependecies I've forgot ?

Alright found the solution after couple days of research,
The example in the notebook is using a new search.pyfile which isn't updated in the folium document yet (as the working version is from december 23 2018 so it's very recent)
I just went to the pluginfolder to change the search.py with the github newest version Here Then it doesn't update automatically to my notebooks so I just created a new one and there it works !
OR simpler way : update folium to version 0.8.0 and it will work so just do pip install folium==0.8.0 (just went out yesterday)

I have the same problem as you. When you press F12 in your browser, you'll see that there's an JS-error. I tried replacing data=citygeo by data=citygeo.to_json() - which will display your map - but still doesn't show the searchbox.
My guess it has something to do with a bug in the latest new version of Folium. Hopefully it gets fixed soon.

Related

PyDTMC output graph overlaps on code in a notebook

I just installed PyDTMC and use it in a Jupyter notebook.
Following the examples on this page https://pypi.org/project/PyDTMC/ leads to a surprising result: plot_graph() overlaps on code above.
How could I fix that?
(m.plot_graph(mc, dpi=200) shows the full graph, but I don't like this workaround)
Note: jupyter-notebook 6.3.0, Python 3.8.5, PyDTMC 4.9.0 (on Archlinux)
The problem was mentioned here https://github.com/TommasoBelluzzo/PyDTMC/issues/6 with a fixing suggestion. Fix applied in this fork https://github.com/yagu0/PyDTMC.
It's still unclear why the figure size needs to be augmented (setting a higher dpi also works, but doesn't look like a clean solution). So I let this post open, in case of someone could explain :-)

Rattle(useGtkBuilder = TRUE) starts Rattle, but Rattle itself is frozen

I have version 3.4.0 of R. on Windows 7. I installed the library rattle. There were errors, but I found out from Stackoverflow that using rattle( useGtkBuilder = TRUE) solves the problem.
It did - only partially. Now, when I load the CSV file, and click on the execute button, in the Rattle GUI, nothing happens !
All the menu options are apparently working, but no file is getting loaded.
Any idea ?
I could solve this problem, in the following way..
>install.packages("rattle", repos="http://rattle.togaware.com", type="source")
>install.packages("https://cran.r-project.org/bin/windows/contrib/3.3/RGtk2_2.20.31.zip", repos=NULL)
>library(RGtk2)
>library(rattle)
>rattle()
There were several messages asking me to install packages related to Cairo and XML, which i allowed to proceed.
Dont know why it exactly worked..but everything is working fine, and i ran a logistic regression model, and the results and the log-code, look just super.
Thanks and hope it helps other users, towards a simple/lucid way out,
Regards,
Raghavendra B
As per the Rattle trouble shooting page, the current version of Rattle on CRAN has an issue with the most recent release of RGtk2 on CRAN. A fix is being readied for CRAN at present but in the meantime the following should fix it for RGtk2 2.20.33:
> install.packages("https://togaware.com/access/rattle_5.0.14.tar.gz",
repos = NULL,
type = "source")

How to build and run Light Table without error?

I've been trying for hours, but can't build and use Light Table. Every time I try to run deploy/LightTable, it hangs on a screen that simply says "Light Table". I receive this error*:
[14381:0519/204037:INFO:CONSOLE(27860)] "Uncaught TypeError: Cannot read property 'thread_STAR_' of undefined", source: file:///home/zaz/Desktop/LightTable/builds/lighttable-0.8.0-linux/resources/app/core/node_modules/lighttable/bootstrap.js (27860)
Here's what I've tried:
git clone https://github.com/LightTable/LightTable.git
cd LightTable
bash linux_deps.sh
./deploy/LightTable # creates frozen window, throws the error above
cd deploy
./LightTable # creates frozen window, throws the error above
./ltbin # creates frozen window, throws the error above
I also tried similar things after checking out the atom-shell branch and the 0.7.2 tag (and cleaning up all the files from the previous build). Each time, I received the error above.
Does anyone know what's going on here?
Has Light Table been completely abandoned? It seems the last commit was in March.
* Depending on the version I was trying to run, I also received other errors, but I don't think they're relevant (the error above was the only one that appeared for all versions):
[18593:0519/222845:INFO:gpu_info_collector_x11.cc(80)] NVCtrl extension does not exist.
[18593:0519/222845:ERROR:browser_main_loop.cc(226)] Gdk: gdk_window_set_icon_list: icons too large
Fontconfig warning: FcPattern object size does not accept value 11(i)
[14413:0519/204035:INFO:renderer_main.cc(212)] Renderer process started
A year later (question was written in May 2015, now is June 2016), LightTable 0.8.1 is out, and I tried both Linux binary and cloned it from git, and it works fine.
For complete info, I'm using also Atom, and although I had not problems with "Cannot read property 'something' of undefined"" in Atom core, I met such problems in two or three Atom packages.
Both editors are based on same electron platform, LightTable is beautiful eye candy with quite revolutionary REPL integration, but it needs more polish to be usable to same extent as Atom.
For example, LightTable does not have workspace saving by default, that is done via plugin. That's ridiculous.
But although Atom looks so nice and powerful compared to simple editors, with realy huuuge number of available packages/plugins, LightTable is more elegant.
As I don't want to start new semi-religious war Atom vs LightTable resembling vi-vs-emacs, I'll stop here. :)
I can't replicate your problems in LightTable v0.8.1, so I think that answers this question. If not, please add errors you get with v0.8.1.
For info about releases, please check: https://github.com/LightTable/LightTable/releases

Error Unknown variable:BouncingAtomsMorph openInWorld please correct or cancel

I'm new to Pharo ,my problem is when I try to run the BouncingAtomsMorph openInWorld example I keep getting the following error message:
Unknown variable:BouncingAtomsMorph openInWorld please correct or cancel
Please help!
Sadly Bouncing Atoms are no longer included in the standard distribution of newer Pharo versions.
To load it evaluate in a workspace or playground:
Gofer it
url: 'http://smalltalkhub.com/mc/PharoExtras/MorphExamplesAndDemos/main';
package: 'MorphExamplesAndDemos';
load.
Then
BouncingAtomsMorph new openInWorld
will work.
Pharo 5 update:
The MorphExamplesAndDemos package does no longer load correctly starting with Pharo 5. As described here, you can still look at the BouncingAtomsMorph by just clicking on Abandon when a debugger message tells you that this message is no longer understood (It's a problem with another example in the same package):
FileList class>>registerFileReader

DoNotChange was not found when adding new files

When I attempt to add a new file to the solution -- even a general C# empty class, I get an error:
The requested value 'DoNotChange' was not found. See screenshot.
This just started happening yesterday. I installed the monotouch-4.0.0.dmg, but have since rolled back to 3.2.6, but the problem remains.
I think there may be a fairly widespread issue, as this new StackOverflow question seems eerily similar.
Anyone have any ideas on how to recover?
Environment:
MonoTouch Professional 3.2.6 (4.0.0)
MonoDevelop 2.4.2 release 20402004
OSX 10.6.7
UPDATE: On a whim I tried to create a new empty .cs file outside of MT, and then add it to the project -- that worked, so at least there is a temporary workaround.
It looks like your formatting policy options are triggering a bug in the code formatter. Try resetting it by removing the file ~/.config/MonoDevelop/DefaultPolicies.xml

Resources