DEV Community

Francisco Carrillo Pérez
Francisco Carrillo Pérez

Posted on

Restaurants with vegetarian options in USA

Some months ago, I found this Kaggle's Dataset with restaurants that serve vegetarian and vegan food in the US. I thought I could do something interesting with it.

I've been procrastinating it until last week when I proposed myself that I would use it to learn how to implement a web interactive map.

At first, I plot the data with Plotly to see how it works. It was interesting, but it didn't work as good as I thought, because the dataset is really large.

Then I thought, why not using a JavaScript library and then use it with HTML and CSS for creating a webpage? That's how I found LeafletJS which is an amazing library for plotting geolocation data in a map.

Since the dataset is quite large, I've also used a plugin for LeafletJS that is called MarkerClusterer which cluster the points based in their proximity.

The result could be checked here and all the code could be found in the Github repository.

I hope this could help someone!

Happy coding :)

Paco

Top comments (4)

Collapse
 
andy profile image
Andy Zhao (he/him)

As a vegan always trying to eat with friends who are not, thank you!

Collapse
 
pacocp profile image
Francisco Carrillo Pérez

You're welcome! I wish I had the same dataset but for Spain since I'm vegetarian haha

Collapse
 
eqmapbox profile image
Erin Quinn • Edited

Hey (sorry) Francisco, love it ;). You should go for density extrusions in GL JS - blog.mapbox.com/dive-into-large-da....

Collapse
 
pacocp profile image
Francisco Carrillo Pérez

Thank you very much! I would check it out