resources to create data collection map in R or Python? - python

I am trying to create an interactive map in R or Python that could be hosted on a website and shared via a link. Creating interactive map is no problem, however I want users with the link to be able to edit the map.
i.e zoom into an area and click on a point and add data to the map.
I would be happy to use R or Python to do this but cannot find any resources to put me in the correct direction. All the resources I am seeing are using pre-existing data whereas I want to create new data on the map and allow others with access to be able to edit to.
Does anyone know some good resources for this type of application?
Thank you.

Related

How to make a particular visualization in Python

So this may not be the right forum to ask this question but
I don't know what this type of visualization is called (hence I'm not able to google it). The dynamic version where the colors run up the semi-circle as the graphic loads.
Any tips on how to create this in Python? Although I guess once I know what its called, I can google how to make it in Python. :)
What is the right place to ask such a question? Some sub-reddit?
Thx
This is called a "Radial Bar Chart", the Data Visualization catalogue link has recommendations.
If you want Python specifically, there is a previous thread on plotting in matplotlib with polar coordinates (Circular Barplot), but I don't think this will handle your preference to "[dynamically update colors] as the graphic loads."
This page from AMCharts has an in-browser version that seems like it would fit. Dump your data into json and it should work.

How to create a static skeleton of a map using folium with over layers(markers) changing every hour which is hosted over a website using flask?

I am sorry if the question is confusing or doesn't make sense, this is my first project and I'll try to explain it to the best of my capabilities.
At first, I thought I would just be hosting a single map that I created using folium and inherited the template of the map into the website which is created with flask, therefore I didn't do any hardcoding in the main app.py file, however, it seemed really basic. So now using machine learning algorithms, I want to display different things over the map which makes some predictions for every hour of the day.
THE PROBLEM: It will take longer than expected to generate a new map every hour of the day (plus storing a new map so many times will be expensive in terms of storage).
MY SOLUTION: Have a skeleton map because the area that I will be making predictions on is localized, so have that area as the basic map and change the upper layers that will have the predictions displayed (basically heat map) every hour.
Is this a correct approach? Please recommend a right path to implement this. I am open to trying new things as long as it gets the job done. Would really appreciate any help regarding this. Thanks in advance
Folium does not support WebSockets if anything add new javascript to fetch data dynamically, but the best way would be to fetch data instead of rendering html everytime, it would help with the speed issue as well. Also, look into leaflets that would help too.
If you want to generate your map faster, you can use directly the Javascript library Leaflet to create the map (it is the library that is used to render the map with Folium). You need to send the data of your predictions from your backend in Flask to your front-end in Javascript with Leaflet in your HTML template (Jinja2).

What is the best way to present interactive dashboards without creating a web app

Recently I've been seeking ways to represent dashboards interactively.
The idea is to have a file that could be stored somewhere in the cloud and whenever someone wants to see those dashboards - just to go there and open that file(could be HTML file) and there he can find the dashboards with filters, sliders, etc.
Which is the best way to do that?
P.S. I am using python.
Regards
You can use bokeh or dash. (https://demo.bokeh.org/)
Personally i use bokeh, you can generate html file with all your data and a cool and simple dataviz for exemple :https://demo.bokeh.org/movies
Here is an example with filter on a stand alone file, it is what your looking for ?
First the dashboard with different pan and one filter :
then the user can choose an option in the list :
and finally we display the selected option :

How to update a plotly graph with new data in Python?

I am using Chart Studio. How do I update my graph with new data, without losing previously uploaded data? I cannot upload everything all at once every time, because uploads are "limited to 524.288 KB". So I have to upload incrementally. Is this possible? By the way, fileopt='extend' does not work in the new version upgrade, but that is the type of functionality I am looking for.
I did not discover how to extend traces however I did find out how to get around the upload limit. The method involves generating charts on github pages which can be used to create iframes, without file size limits. This is an effective workaround for me. More information here: https://towardsdatascience.com/how-to-create-a-plotly-visualization-and-embed-it-on-websites-517c1a78568b

Using Django as a map source for openlayer UI

I am thinking of creating a web application that shows a map of a city (from openstreetmaps data). I would like to create a layer on top which represents markers. I foresee that I will have a database of numerous markers, which will be shown on the map as layer. I have come across openstreetmap, openlayers, geodjango etc but am unable to figure out how to make all these fit together to solve my issue. I am comfortable using Django and Python. Can someone help me understand the following:
How to host OSM data on my own server using Django and acting as a Mapserver (or map source) for openlayers?
How to ask openlayer to talk to this server to render the map or overlays?
I'm sorry if some part of my question does not make sense; it is because my understanding how these components is quite hazy at the moment.
Displaying markers at coordinates is the easy part. The harder part is hosting your own base map. Here is one way I think you could do it:
Obtain the OpenStreetMap data for the area you are interested in.
Develop a stylesheet for your map, or use an existing one. Mapnik is an option.
Use Tilecache to serve cached image tiles of the map at various scale levels. This would have to run in addition to your django app.
Another option would be to use Tiledrawer to set up an Amazon EC2 server serving your base map without having to manually configure everything.
Stack Overflow is only letting me post two links, so you will have to search for the websites of Tilecache and Mapnik, but they are easy to find.
References:
https://gis.stackexchange.com/questions/10162/how-to-set-up-an-osm-server-with-tilecache-and-mapnik

Categories

Resources