[ckan-dev] Integration with third-party services on data.gov

Matthew Fullerton matthew at smartlane.de
Thu May 21 12:35:42 UTC 2015


We've added the export to CartoDB and export to geojson.io. The code in our template in our extension looks [a bit like*] this:

[with]in ckanext / smartlane / templates / package / snippets / resource_item.html:

{% block resource_item_explore_links %}
	{{ super() }}
	{% if res.format == 'GeoJSON' and not pkg.private %}
		<li>
		<a href="http://geojson.io/#data=data:text/x-url,{{ res.url }}" target="_blank">
			<i class="icon-share"></i>
			{{ _('Visualize (geojson.io)') }}
		</a>
		</li>
	{% endif %}
	{% if res.format in ('GeoJSON', 'CSV', 'TAB', 'TSV', 'SHAPE', 'KML', 'KMZ', 'XLS', 'XLSX', 'GPX', 'OSM', 'ODS') and not pkg.private %}
		<li>
		<a href="http://oneclick.cartodb.com/?file={{ res.url }}&provider=smartlane.io&logo=https://smartlane.io/base/images/smartlane.png" target="_blank">
			<i class="icon-share"></i>
			{{ _('Visualize (cartoDB)') }}
		</a>
		</li>
	{% endif %}
{% endblock %}

*I am doing other things in that file so our's doesn't look quite like that, but it should work :)

Best,
Matt
 
 
-- 
Projekt SMARTLANE 
  
matthew at smartlane.de 
T +49.89.289.28575
 F +49.89.289.22333 
www.smartlane.de  

  
EXIST-Gründungsvorhaben „Tapestry“ 
c/o Lehrstuhl für Verkehrstechnik 
Technische Universität München
 Arcisstraße 21
 80333 München 
  
Gefördert vom Bundesministerium für Wirtschaft und Technologie  
aufgrund eines Beschlusses des Deutschen Bundestages. 
      

Von: ckan-dev <ckan-dev-bounces at lists.okfn.org> im Auftrag von Juan Pane <juanpane at gmail.com>
Gesendet: Donnerstag, 19. März 2015 21:20
An: CKAN Development Discussions
Betreff: Re: [ckan-dev] Integration with third-party services on data.gov
  

noted, we will see if we can implement these extensions here in Paraguay


Juan 


On 19 March 2015 at 06:46, Adrià Mercader  <adria.mercader at okfn.org> wrote:
 Hi all,

Just wanted to point CKAN devs to the fantastic work that  data.gov has
been doing to integrate with 3rd party services for further exploring
data, currently plotly and CartoDB:

http://www.data.gov/meta/open-apps/

http://catalog.data.gov/dataset/national-park-boundariesf0a4c

If you are interested on doing something similar on your site the
implementation seems quite straight-forward (if someone from Data.gov
is listening please feel free to give more details), and you can add
your comments to this issue:


https://github.com/GSA/data.gov/issues/602

Adrià
_______________________________________________
ckan-dev mailing list
ckan-dev at lists.okfn.org
https://lists.okfn.org/mailman/listinfo/ckan-dev
Unsubscribe:  https://lists.okfn.org/mailman/options/ckan-dev
 
    


More information about the ckan-dev mailing list