Every file and query on data.world is an API endpoint to be consumed via any language or application. Here are a few common examples:
import pandas as pd
df = pd.read_csv('https://query.data.world/s/zgl3zbtcq5rutbq63ttfo3lhoq4saj')| var countries_data = {"type":"FeatureCollection","features":[ | |
| {"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[74.92,37.24],[74.57,37.03],[72.56,36.82],[71.24,36.13],[71.65,35.42],[71.08,34.06],[69.91,34.04],[70.33,33.33],[69.51,33.03],[69.33,31.94],[66.72,31.21],[66.26,29.85],[62.48,29.41],[60.87,29.86],[61.85,31.02],[60.84,31.5],[60.58,33.07],[60.94,33.52],[60.51,34.14],[61.28,35.61],[62.72,35.25],[63.12,35.86],[64.5,36.28],[64.8,37.12],[66.54,37.37],[67.78,37.19],[69.32,37.12],[70.97,38.47],[71.59,37.9],[71.68,36.68],[73.31,37.46],[74.92,37.24]]]]},"properties":{"name":"Afghanistan"},"id":"AF"}, | |
| {"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[19.44,41.02],[19.37,41.85],[19.65,42.62],[20.07,42.56],[20.59,41.88],[20.82,40.91],[20.98,40.86],[20.01,39.69],[19.29,40.42],[19.44,41.02]]]]},"properties":{"name":"Albania"},"id":"AL"}, | |
| {"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[2.96,36.8],[8.62,36.94],[8.18,36.52],[8.25,34.64],[7.49,33.89],[9.06,3 |
| /* | |
| Javascript is an incredibly fun and (relatively) easy language. It's also | |
| really easy to do badly... in some ways js is out to get you, so if you're | |
| ready for it, you can avoid the pitfalls and have a great time. | |
| Ideally this talk gets you thinking of Javascript as the unique, | |
| quasi-dangerous little beast that is. If you respect the ways in which it | |
| is your enemy, it will become one of your best friends. | |
| This presentation isn't intended to teach javascript (though you'll probably |
Every file and query on data.world is an API endpoint to be consumed via any language or application. Here are a few common examples:
import pandas as pd
df = pd.read_csv('https://query.data.world/s/zgl3zbtcq5rutbq63ttfo3lhoq4saj')| // load the h3 json | |
| fetch('hexed.json') | |
| .then(r => r.json()) | |
| .then(data => { | |
| // create a hex layer | |
| const hexLayer = new deck.H3HexagonLayer({ | |
| id: 'h3-hex', | |
| data: data, | |
| pickable: false, | |
| coverage: 0.9, |
| import h3 | |
| import csv | |
| import json | |
| with open('./thor_filtered.csv', newline='') as csvfile: | |
| line = csv.reader(csvfile, delimiter=',') | |
| lines = 0 | |
| results = {} | |
| for row in line: | |
| lines += 1 |
| <!DOCTYPE html> | |
| <meta charset="utf-8"> | |
| <style> | |
| body { | |
| font: 10px sans-serif; | |
| margin: 0; | |
| } | |
| path.line { |
| (function(window) { | |
| var data, | |
| xy = d3 | |
| .geo | |
| .equirectangular() | |
| .scale($('#map_container').width()) | |
| .translate([$('#map_container').width() / 2, $('#map_container').height() / 2]), | |
| path = d3 | |
| .geo | |
| .path() |
Force layout test/experiment with images
Sources:
| App.stateManager = Ember.StateManager.create({ | |
| //Swap state within this element | |
| rootElement: "#appRoot", | |
| //Simple State | |
| overview: Ember.ViewState.create({ | |
| view: App.Overview | |
| }), |
http://datamaps.markmarkoh.com/using-custom-map-data-w-datamaps/