Comments (7)
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.
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.
@wrobstory can confirm, having the same issue. I will try simple server.
from vincent.
@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.
@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.
If you need anymore help. Let me know.
from vincent.
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.
@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)
- Where does y2 field come from in stacked bar example
- Creating Gradient Legend with LegendProperties HOT 3
- does vincent support log scale? HOT 3
- Spacing Issue with X and y Axis
- Regression with 0.1.5 using vincent line chart
- Vincent off-by-one datetime axis bug after Monthly resampling
- Building an internal map of my house
- Need polygon lat long for Alaska, Hawaii, Guam and Puerto Rico
- Update readthedocs
- Python Bubble Maps with Different Coloring for U.S. Regions (Midwest, Southeast,...)
- zip code based heat map with vincent?
- Exporting map HOT 1
- Grouped and Stacked Bar chart
- Is there any way to update Vincent JSON plot without redrawing it?
- Some States missing from Maps
- No way to enable the grid lines
- Anything similar to "Alpha"
- How can I draw a historical map?
- How vincent can b used with the Django framework?
- Dependency Wheel/Circos Plot
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vincent.