Giter Site home page Giter Site logo

Comments (7)

wrobstory avatar wrobstory commented on May 18, 2024

Hmmmmm - that error is definitely a path error. I know that it doesn't work properly in the notebook (without much hackery), but it should work fine running a normal server. None of the map examples work for you when serving them with a simple HTTP server?

from vincent.

davclark avatar davclark commented on May 18, 2024

Here is a vega.json file that I generated using the snippet in the vincent README, and put in the same directory as your stock vega_template.html from master. The topo.json file is accessible from the browser, and all of this is being served up by a python SimpleHTTPServer on port 8000. I get this error:

[Vega Err] [object XMLHttpRequest]

Note - this isn't a high priority for me right now, as folks seem more interested in learning D3 directly in my little corner of the world. But there is at a minimum a documentation issue to be solved here.

from vincent.

myusuf3 avatar myusuf3 commented on May 18, 2024

@wrobstory can confirm, having the same issue. I will try simple server.

from vincent.

myusuf3 avatar myusuf3 commented on May 18, 2024

@davclark that file you linked works if you use simple http server. its a simple path issue I will see if I can pin point it in code.

from vincent.

myusuf3 avatar myusuf3 commented on May 18, 2024

@wrobstory I figured it out topo files and vega file need to be served from same server. security ugh, I know.

if you go to site on vega the url and the vega file are loaded from the same domain so when it goes to look for it looks there

http://trifacta.github.io/vega/data/world-110m.json
http://trifacta.github.io/vega/vega.js

So when you are doing it in the iPython Notebook it looks on that domain in my case example.com:8888 so all you have to do is let the IPython notebook serve up those topology files.

@wrobstory As for how we are going to fix this I have a few ideas none of which are pretty. We could set access control header but we will still need a place to serve them from. I would like for this to be seamless though.

@davclark go here so you can have IPython serve up those files when you ask for them. Please make note of static/custom that precedes files names.

viola

If you need anymore help. Let me know.

from vincent.

davclark avatar davclark commented on May 18, 2024

I haven't gotten around to testing this yet, but in the meantime, I wanted to point out that if you look at https://github.com/trifacta/vega/tree/gh-pages/data, you get a list of all the files served up under trifacta.github.io/vega/data. This is obvious if you know github pages, but you can't access this the more obvious way (i.e., just doing an http GET on tf.gh.io/vega/data). I mention this more for others that might see this.

Trifacta appears to have all of the json files available in vincent_map_data... so perhaps the solution for now is to recommend datasources from trifacta's gh-pages (along with the current use of their vega.js)?

Speaking of GitHub - the topojson renderer is awesome if you've not seen it. Really clean handling of political boundaries on zooming, e.g., the world-countries.json file under discussion.

Thanks and happy new year!

from vincent.

nikisix avatar nikisix commented on May 18, 2024

@myusuf3 thanks for the sweet hack!

is this going to make it into core vincent somehow? or will ppl just be making profiles when they need to host some data?

from vincent.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.