I am familiar with coding in python for the work I do in bioinformatics. I've recently been asked to do a different type of analysis -- analyzing data and then overlaying that data over a map of the US. I figure I will need to use javascript after I write the python code to do the data analysis, but I am not familiar with creating images. What is the best way to incorporate my python data analysis with code that will produce a dynamic image?
Thanks for your help.
My Solutions
1) Just as what what other people said , you could try to use the Google Map APIs and code a bit.
2) Or you can use Openstreetmap. I would perfer openstreetmap.
I did several apps and websites based on LBS. I know how to place coordinates on maps.
If you want to finish this quickly and cooler. You may try this combination:
Django as the freamwork,
PostgreSQL as the DB backend
PostgreSQL PGIS as the geolocation handler
Openstreetmap as the map viewer
My summery:
Solution 1) is quick, faster. It needs you some hard-coding efforts.
Solution 2) is bit slower but full-featured. It's very extensive for future developing.
Hope this could help you
Related
I just learned brain.js and have been using it for quiet a while and now I have an idea for a project. I want to predict house prices for a given area in a specific city and the training data for this is inside a csv file. Now there's a couple of thousand examples in that file for It to learn from so copying/pasting all of it into the code would be a huge amount of work.
So can anyone please tell me a way of getting the neural network to learn from the csv file without me copy/pasting the data into the code?
You can use a data visualization library like D3.js.
Here's the homepage for D3.js. You can find documentation, examples, and all the information that you might need about it over here:
https://d3js.org/
There are some alternatives as well though my personal recommendation would be D3.js because is super easy to use.
Refer to this page for alternatives:
https://www.g2.com/products/d3-js/competitors/alternatives
I need to use Google Maps API in two way:
To store coordinates of a marker in database
To display objects stored in database on map
I was suggested to use gmaps.js for both. Googling I found this library that can be used as well for both purposes. I am familiar with html, css and PHP but I have minor experience with JS so I would love to avoid it. The library, if I got it correctly, generates JS code. So it would be a lot more easier to use library.
My question is about quality of both options. Which option would produce higher efficiency? The map is supposed to display a lot of markers from database.
I am sorry if this is silly question but I want to know for sure that I have chosen right tool before getting my hands dirty.
I'm working on a project to create real-time charts from data in an SQL database. I've done a lot of research on JS charting libraries and have picked out a few good ones.
My problem is that I'm not sure how to get started with linking the SQL data to the web app/site.
My HTML and CSS are fine. I'm coming on with JS and we have software that provides me with necessary SQL query code.
Where is the gap in my knowledge? Is it necessary to learn PHP in order to get this working? How about C#?
My solution will currently be a locally hosted site, running on a networked computer (not currently got server space). The solution I have already uses Excel to query the database and runs a ton of macros to generate static charts every ten minutes. This works, but I'd like to create something far more flexible, robust and interactive.
Could anybody point me to any online resources that may help me? I like ChartJS but any open-source charting library will do. I'm hoping there's a great tutorial somewhere that covers SQL to real-time charts but I just can't find one...
If you want a real time charting you need to receive information from the DB almost every second. So sending a bunch of requests is not the best way to do this. You probably need to read about websockets and how do they work. Here is an example but you may find a lot more in google. If you don't want to do it with PHP, I can assure you that it would be far more easier with node.js
For a research project we are developing a system in python which takes raw data from a real time sensor and applies different DSP filters to it. So far so good. The other part of the system should be the plotting of the data and the access to some controllers for modifying the sample rate and other parameters. The last days I have been trying to use HTML5 + javascript as the technology to do the data plotting; I am using d3.js for the graphics and mimic.js to implement the xmlrpc protocol to communicate the python side with the HTML file. After a lot of tweaking i ALMOST managed to communicate both parts of the system. However, I ran into the 'Cross origin request' error (I am using chrome).
After that I have been thinking of some other strategies in order to communicate python with the GUI:
Using a SimpleHTTPServer. However, I need to have a SimpleXMLRPCServer running so I can register the function (register_function) to pass the value. Is there a way to implement a xmlrpc within a SimpleHTTPServer?
I have been thinking about using json but I am not sure if this is the best way to go as the data streaming will be quite big and fast(4 channels with constant updates).
So after all this testing I really would appreciate a piece of advice:
Is if feasible to have such HTML5 GUI? is it efficient for plotting such amounts of data?
if so, what would be a realistic strategy to implement a communication between Python and HTML/js?
Is xmlrpc the best protocol to use?
Yep. Also you can use some JavaScript charts libraries. Such as amCharts, highcharts, plot.
Really, JSON is better.
XMLRPC isn't very light. See p.2 :)
Im using the google earth v1 javascript API to update hundreds of objects moving around in "real-time". I keep track of new, modified, and deleted entities to minimize looping in my javascript while updating placemarks, but still the biggest bottleneck is making the calls to the google earth api. Has anyone else tackled this problem? I've read a bit about dynamically streaming from a KML file on a server, but I need access to the placemark object updates in my javascript code.
There is a v3 of the Google Maps Javascript API, but the Google Earth API is at v1. It's unclear from your question if you are using both API's, and if so, how you are interacting with the Earth API.
If you provide some code showing how you are doing the updates it would be easier to offer advice on how to optimize.
That said it sounds like using straight KML with incremental Updates is the way to go for your use case, and you can still access individual placemarks using the getElementByUrl() method
To put a bow on this question. Using dynamic KML files is one way to do this if you dont need to do anything complicated with the data other than display it to the user. Because I need to do work on the data inside the webclient, I ended up using json to transfer the data and then using google.earth.executeBatch to execute my google earth api calls in the most efficient manner.
Have you looked at using Google Fusion Tables? It doesn't use the GE plug-in so....