Create custom Map for Highmaps using Shapefiles and QGIS - highcharts

I try to create a custom Map with Highcharts – I need german job center districts. I've done it the way it is described here.
I imported the shapefiles to QGIS an created a highcharts map here. But on this way, all information like the name oft he district got lost. Is there a way to keep it? Because there are a lot of districts – I don't want to write all single names by my own.

I was able to generate GeoJSON from the provided shapefile (the one that you provided me with via email) and place it in the JSFiddle boilerplate (http://jsfiddle.net/highcharts/xbzxfx2L/). Empty map displayed without any problems. To add values to the regions and also to display data labels you need to add adequate data and link it to the mapData (more about it in the API link below). I have prepared an example for you. Simply, copy the content of created GeoJSON (generated from the shapefile using QGIS, as described here: https://www.highcharts.com/docs/maps/custom-geojson-maps) to the textarea and click run button. The map with the values should show up. Also, you could try to use map of Germany from our maps collection. It can be found here: http://code.highcharts.com/mapdata/.
API Reference:
https://api.highcharts.com/highmaps/series.map.joinBy
Example:
http://jsfiddle.net/w20e8vja/

Related

Google ImportXML from QGIS metadata file

I am trying to capture elements of an qmd file (that is xml markup) using Google Sheets importxml. Based on How to use importXML function with a file from Google Drive? I think I've got the file importing correctly but can't seem to capture any of the tags.
Here's what I am trying -
=importXML("https://drive.google.com/uc?id=1AI2C8hQnSOuuoyJXizYBszGmpMXW8xxT&export=download","\\identifier")
Here's what the qmd/xml file looks like
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
<qgis version="3.9.0-Master">
<identifier>Z:/My Drive/Mangoesmapping/Spatial Projects/2019/DSC/132_Ongoing_Asset_Updates/Working/Sewerage_Updates/Sewerage_Manholes_InspectionShafts.TAB</identifier>
<parentidentifier>Sewerage Manhole Infrastructure</parentidentifier>
<language>AUS</language>
<type>dataset</type>
<title>Sewerage Manholes within Douglas Shire Council</title>
<abstract>Sewerage Manholes within Douglas Shire Council. Most data has been updated based on field work, review of existing AsCon files and discussion with council staff responsible for the assets in 2018/2019. In Port Douglas most of the infrastructure has been surveyed in. </abstract>
<keywords vocabulary="gmd:topicCategory">
<keyword>Infrastructure</keyword>
<keyword>Sewerage</keyword>
If I use
=importXML("https://drive.google.com/uc?id=1AI2C8hQnSOuuoyJXizYBszGmpMXW8xxT&export=download","*")
I get
But I really would like to just get the elements I want by placing the importxml for each tag in the cell I need it in.
You want to retrieve ### of <identifier>###</identifier> from https://drive.google.com/uc?id=1AI2C8hQnSOuuoyJXizYBszGmpMXW8xxT&export=download
I could understand like above. If my understanding is correct, how about this answer?
Issue:
In your question, the formula of =importXML("https://drive.google.com/uc?id=1AI2C8hQnSOuuoyJXizYBszGmpMXW8xxT&export=download","\\identifier") uses \\identifier as the xpath. From your data you want to retrieve the values, it seems that you are trying to retrieve ### of <identifier>###</identifier>.
In this case, in order to Selects nodes in the document from the current node that match the selection no matter where they are, // is required to be used instead of \\. This can be seen at the document of here.
Modified formula:
So =importXML("https://drive.google.com/uc?id=1AI2C8hQnSOuuoyJXizYBszGmpMXW8xxT&export=download","\\identifier") can be modified as follows.
=importXML("https://drive.google.com/uc?id=1AI2C8hQnSOuuoyJXizYBszGmpMXW8xxT&export=download","//identifier")
As other xpath, from your data in your question, you can also use the xpath of /qgis/identifier instead of //identifier. So you can also use the following formula.
=importXML("https://drive.google.com/uc?id=1AI2C8hQnSOuuoyJXizYBszGmpMXW8xxT&export=download","/qgis/identifier")
References:
IMPORTXML
XPath Tutorial

Google Sheet find cell by URL parameter

I have a database of elements, each element has its own QR Code. After reading the code I would like to be able to open the worksheet on a specific tab and jump to the appropriate cell (according to the element name). Calling a worksheet through a URL with the #gid parameter allows you to open a tab.... the "range" parameter allows you to jump to a specific cell.... and what if I want to search for an item by name? Something like: https://docs.google.com/spreadsheets/d/1fER4x1p.../edit#gid=82420100&search=element_name.... is it possible?
Google has not introduced this yet
But you can look into Google Script (Googles SpreadSheets macros like) to achieve this.
Also a simpler approach will be to just filter the data, but this will change your requirement obviously. For example you can create a Filter with the name you are looking for and then you will get the URL.
This is the URL to a Sample of this, it should open the
Spreadsheet and filter the data when loaded. This is the Icon to
look for to create the filters
here is some documentation for you to get started on Google App Script, but I don't have a direct link to let you know how to catch the parameters for it to process them. What I can tell you is that this is a much more complicated approach than just a URL because it involves programmatic processing on the Spreadsheet side.

How to integrate latitude/longitude into a dataset and display it on map

I am new with CKAN but I got some experience and I can add some customized fields into a dataset.
We are going to use a dataset to record either publication but some measurements as well. A resource will be some file of measurements.
We want to be able to geolocate the place where measurements have been made.
It's the reason why I installed ckanext-geospacial.
The goal is to be able to have aditional field in a dataset or resource to save, at least, latitude, longitude, altitude.
We also would like to have a map (as google map or something else...), with a marker of the measurement place.
First, I am not sure if I choose the right ckan extension. Does ckanext-spatial will help me?
In any case, I would appreciate your help
to choose the best extension for my need
to setup ckanext-spatial.
I installed ckanext-spatial and I got the following warming messages, while I test the installation:
user#pc:/usr/lib/ckan/default/src/ckanext-spatial$ sudo -u postgres psql -d ckan_default -c "SELECT postgis_full_version()"
NOTICE: Function postgis_gdal_version() not found. Is raster support enabled and rtpostgis.sql installed?
NOTICE: Function postgis_topology_scripts_installed() not found. Is topology support enabled and topology.sql installed?
NOTICE: Function postgis_raster_scripts_installed() not found. Is raster support enabled and rtpostgis.sql installed?
NOTICE: Function postgis_raster_lib_version() not found. Is raster support enabled and rtpostgis.sql installed?
What should I do?
Second question; how can I use the ckanext-spatial within a dataset? How can I use it to display location?
In order to view geolocalized data as markers on a map you just need the Data Explorer plugin, which includes a Map View (I think CKAN's installation already includes this plugin).
As a prerequisite for the Data Explorer plugin to work, you also need the DataStore extension, which saves the rows of the .csv resources as records in a database, such allowing more efficient access to the data.
Once you have the data in the DataStore and the DataExplorer's recline_view added to the ckan.plugins line in CKAN's configuration file, you will be able to use the Map View to select the fields storing the latitude and longitude values and see the markers on the map (if your resources have two fields named latitude and longitude, or lat and lon, they will be automatically detected and used as coordinates).
If I understand correctly, the ckanext-spatial plugins provides spatial queries, so if you just want a map with markers you don't need it.

I want to display graphs and compare them

Display the points at which they merge , I was not able to find any library .....
Displaying any form of charts in iOS can be done in 2 ways.
Using webView to load a html string with the javascript files imported into it.
Using stringByAppendingFormat you can change the data points and refresh the webview.
http://www.fusioncharts.com/blog/2012/02/create-charts-for-iphone-and-ipad-apps-using-fusioncharts-xt/
Using a library to display them Natively. Something like Charts by Daniel Iohen Gindi. It is a bit extensive so just use the line Charts in your case and ignore the others.
https://github.com/danielgindi/Charts
Using the 2nd method (native) will always perform better, but the simplicity of html5 charts make it very easy to implement
To obtain points when lines meet is basically saying when 2 data has the same value. So you can just add an if statement and print the value out or store it as a variable.

gmaps4rails: HOW TO automatically add makers for locations matching a key word

I need to add markers for locations matching a specific keyword on my map.
Such as "hotel" for instance.
I need to obtain the same result as when I search for that keyword on maps.google.com, only I want this search to be done automatically using gmaps4rails. I would add my location with a different marker on top.
cheers,
joel
the process would be:
Ajax version
you already have a map from gmaps4rails displayed
submit a form remotely to your server
create the proper query on your records in your controller, simply respond with .to_gmaps4rails
use the js replaceMarkers function to clear the map and display the markers from the server response.
use the geolocation functions of the client browser (beware, not available on all of them) + the js addMarkers function to display the user position.
I wrote the relevant documentation here
Standard version
get the proper objects from your controller
create the json from them
create your map
add a js callback to create the marker with user's position

Resources