HNHacker News
TopNewBestAskShowJobs

anvaka

1,012 karma · joined January 25, 2012

I'm a software engineer, passionate about data visualization and clever algorithms.

https://twitter.com/anvaka https://github.com/anvaka

submissionscomments
anvaka··on A Graph of Related Subreddits
Oh hey there, I'm the author of this project.

Just wanted to say thank you for sharing this! Would be happy to answer any questions - graphs are my long time hobby, and I love them!

PS: You can find more recent graphs and fun projects here: https://twitter.com/search?q=from%3Aanvaka%20min_retweets%3A...

anvaka··on City Roads – Draw all roads in a city at once
You should be able to enter counties - it may take a bit longer to download all the roads, sometimes it may take a while to download though and timeout...
anvaka··on City Roads – Draw all roads in a city at once
Should now work for all :)
anvaka··on City Roads – Draw all roads in a city at once
While this may be possible some day, you can export today as vector file and then use https://ezgif.com/svg-to-png tool to save the SVG at any resolution. Would this work?
anvaka··on City Roads – Draw all roads in a city at once
Thank you! I've added a way to export maps to SVG file, which can be edited by an SVG editor, those editors also usually support adjusting thickness and changing colors of the roads. Would this work?
anvaka··on City Roads – Draw all roads in a city at once
Should work a bit better now
anvaka··on City Roads – Draw all roads in a city at once
Done!
anvaka··on City Roads – Draw all roads in a city at once
Thank you!

The rendering is done with WebGL. I wrote a silly 2d renderer to learn more about the platform, and never documented it. Thought it would not be very useful.

Ended up using it in a lot of tiny projects, but didn't have chance to document it yet. Here it is https://github.com/anvaka/w-gl

anvaka··on City Roads – Draw all roads in a city at once
Interesting! What's the city name?
anvaka··on City Roads – Draw all roads in a city at once
If you are able to find your town here https://nominatim.openstreetmap.org/ - and the osm type for the found place is "relationship" not node - it should work.

We are trying to find a fallback for `node` types here https://github.com/anvaka/city-roads/issues/7 - we basically don't have accurate city boundaries for nodes.

anvaka··on City Roads – Draw all roads in a city at once
Do you guys think it would be worth removing the foot paths? Someone here proposes to remove them altogether: https://github.com/anvaka/city-roads/issues/3 - I'm not sure yet which direction would make more sense?
anvaka··on City Roads – Draw all roads in a city at once
Thank you!

I checked here https://nominatim.openstreetmap.org/search.php?q=New+Hartfor... - looks like all other `New Hartford` have type "node" in the database, which doesn't give boundaries of the cities.

We are thinking about fallback here: https://github.com/anvaka/city-roads/issues/7 but what might work better in short term: try entering a county name, and then zoom in onto the place. It is not as convenient as having a city boundaries, sorry about that.

anvaka··on City Roads – Draw all roads in a city at once
Yay! I'd love to know how it goes! I'm myself not sure what would be the best resolution and line thickness to do wallpapers. If you find something appealing - please share?
anvaka··on City Roads – Draw all roads in a city at once
Sincerely thank you. I'm so happy to know this!
anvaka··on City Roads – Draw all roads in a city at once
Thank you!
anvaka··on City Roads – Draw all roads in a city at once
Sorry it takes so long sometimes! I assume overpass (the back end that gives data) may experience higher loads which would affect response time! But glad it finally worked!
anvaka··on City Roads – Draw all roads in a city at once
Oh! This one is fun :)!
anvaka··on City Roads – Draw all roads in a city at once
Locally it is limited by ram, video card capabilities. Remotely it depends on overpass turbo API being able to process huge request s. Which error do you see?
anvaka··on City Roads – Draw all roads in a city at once
Thank you !
anvaka··on City Roads – Draw all roads in a city at once
Lol

I hope it has more potential than art, though art in itself is very strong and inspirational thing!

For example, one could use this tool to debug missing areas in OSM. You could also use it as a source of large natural graphs to study network flow, deseas propgation, etc.

Finally it could also be used for educational purposes: you could show various graph algorithms on this data with something more realistic than abstract graphs :)

anvaka··on City Roads – Draw all roads in a city at once
I see that it is defined as `node` in osm: https://nominatim.openstreetmap.org/details.php?place_id=164...

We need `relationship` osm type to get the boundaries...

There is an ongoing discussion on the repository to give a better fallback: https://github.com/anvaka/city-roads/issues/7

anvaka··on City Roads – Draw all roads in a city at once
Will fix the name! Thanks for catching
anvaka··on City Roads – Draw all roads in a city at once
To fetch the roads I use overpass turbo API. They are sometimes slow and timeout and sometimes limit amount of requests that we can send. So I found three endpoints of overpass turbo and rotate between them: in case when one fails I go to the next one. If none was able to handle the request, I bail out and show the error.

That said, I also cached 3,000 cities with population over 100k citizens and try the cache first, before going to overpass. That may be the reason why it is fast in some cases and slow in others.

By the way if someone has more stable/fast overpass endpoints - I will be happy to add them to the list!

anvaka··on City Roads – Draw all roads in a city at once
Hey there, I'm the author of the tool!

Just wanted to thank you for the comments, feedback and shares! I 'm very happy!

PS: If you liked that project you may find my other stuff interesting: https://twitter.com/search?q=from%3Aanvaka%20min_retweets%3A... - it's just a hobby but I love it :D

anvaka··on City Roads – Draw all roads in a city at once
thank you :)!
anvaka··on City Roads – Draw all roads in a city at once
as long as there is openstreetmap data for it It should work for rural areas as well :)
anvaka··on Peak map: Visualize the elevation of any area using a ridgeline chart
Thank you for sharing this! I think it is a very cool trick. Unfortunately it didn't work for me. Seems like whether path is closed or not is not persisted during `ctx.save()` operation: https://developer.mozilla.org/en-US/docs/Web/API/CanvasRende...

Which causes the bottom closing line to appear where it shouldn't. Here is a simple jsbin to reproduce: https://jsbin.com/luzatuteha/1/edit?html,js,output

anvaka··on Peak map: Visualize the elevation of any area using a ridgeline chart
It's always a game if chance.. I think I have tones of cool stuff that nobody ever going to see or care
anvaka··on Peak map: Visualize the elevation of any area using a ridgeline chart
When zoomed in - increase the height scale of the ridge lines. Would it look better?
anvaka··on Peak map: Visualize the elevation of any area using a ridgeline chart
The idea was that you can design products yourself. Once the map is fully rendered and settings window is closed there is a small link appears that allows you to print the results.

I think I did terrible job here by hiding it too far. For me it is a struggle between usefulness of the feature and level of annoyance it could bring to those who are not interested

← PreviousPage 3 of 6Next →