├── LICENSE ├── README.md ├── data.csv ├── index.html └── leaflet-map-csv.png /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Hands-On Data Visualization 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # leaflet-map-csv 2 | Build a simple Leaflet map with point markers from a CSV file. 3 | 4 | ![Screenshot](leaflet-map-csv.png) 5 | 6 | ## Demo 7 | https://handsondataviz.github.io/leaflet-map-csv/ 8 | 9 | Sample data of select universities and colleges around CT by HandsOnDataViz. 10 | 11 | ## Make your own 12 | 13 | 1. Press **Use this template** button to create a copy of this repository in your own GitHub account. 14 | 2. Put your point data data inside `data.csv`. The only relevant columns that will be read by the template 15 | are `Latitude`, `Longitude`, and `Title` (displayed in a popup). Sample data: 16 | ``` 17 | Title,Latitude,Longitude 18 | Trinity College,41.745167,-72.69263 19 | Wesleyan University,41.55709,-72.65691 20 | ``` 21 | 22 | For more information on customization, see [Leaflet documentation](https://leafletjs.com/). 23 | 24 | ## HandsOnDataViz Tutorial 25 | https://handsondataviz.org/leaflet-maps-with-csv.html 26 | 27 | ## See other Leaflet templates 28 | * [Simple Leaflet map](https://github.com/HandsOnDataViz/leaflet-map-simple) 29 | * [Leaflet map with open data APIs](https://github.com/HandsOnDataViz/leaflet-maps-open-data-apis) 30 | * [Leaflet map with data from Socrata](https://github.com/HandsOnDataViz/leaflet-socrata) 31 | * [Leaflet polygon map with tabs](https://github.com/HandsOnDataViz/leaflet-map-polygon-tabs) 32 | * [Leaflet heatmap](https://github.com/HandsOnDataViz/leaflet-heatmap) 33 | * [Searcheable Map Template](https://github.com/HandsOnDataViz/searchable-map-template-csv) 34 | * [Leaflet Maps with Google Sheets](https://github.com/HandsOnDataViz/leaflet-maps-with-google-sheets) 35 | * [Leaflet Storymaps with Google Sheets](https://github.com/HandsOnDataViz/leaflet-storymaps-with-google-sheets) 36 | -------------------------------------------------------------------------------- /data.csv: -------------------------------------------------------------------------------- 1 | Group,Title,Image,Description,Address,Latitude,Longitude,Found Address,Match Quality,Source 2 | a,Trinity College,https://www.edx.org/sites/default/files/trinity1.jpg,"Not in the link view website more not in the link","300 Summit St, Hartford CT 06106",41.745167,-72.69263,"300 SUMMIT ST, HARTFORD, CT, 06106",Exact,US Census 3 | a,Wesleyan University,https://upload.wikimedia.org/wikipedia/commons/4/41/You_are_here_-_T-shirt.jpg,"view website",45 Wyllys Ave Middletown CT 06459,41.55709,-72.65691,"45 WYLLYS AVE, MIDDLETOWN, CT, 06459",Exact,US Census 4 | a,Connecticut College,https://upload.wikimedia.org/wikipedia/commons/4/41/You_are_here_-_T-shirt.jpg,"view website","270 Mohegan Ave, New London CT",41.381435,-72.10469,"270 MOHEGAN AVE PKWY, NEW LONDON, CT, 06320",Match,US Census 5 | a,Yale University,https://upload.wikimedia.org/wikipedia/commons/4/41/You_are_here_-_T-shirt.jpg,"view website",149 Elm St New Haven CT,41.309155,-72.92635,"149 ELM ST, NEW HAVEN, CT, 06511",Match,US Census 6 | a,University of Connecticut-Storrs,https://upload.wikimedia.org/wikipedia/commons/4/41/You_are_here_-_T-shirt.jpg,"view website","369 Fairfield Way, Storrs CT 06269",41.80665,-72.25352,"369 FAIRFIELD RD, STORRS, CT, 06269",Match,US Census 7 | a,Capital Community College,https://upload.wikimedia.org/wikipedia/commons/4/41/You_are_here_-_T-shirt.jpg,"view website",950 Main St Hartford CT,41.69861,-72.72414,"950 MAIN ST, HARTFORD, CT, 06111",Match,US Census 8 | b,Dinosaur State Park,https://upload.wikimedia.org/wikipedia/commons/4/41/You_are_here_-_T-shirt.jpg,"view website",400 West St Rock Hill CT 06067,41.652546,-72.65743,"400 WEST ST, ROCKY HILL, CT, 06067",Match,US Census 9 | b,Hammonasset State Park,https://upload.wikimedia.org/wikipedia/commons/4/41/You_are_here_-_T-shirt.jpg,"view website","1288 Boston Post Road, Madison CT 06443",41.273247,-72.56934,"1288 BOSTON POST RD, MADISON, CT, 06443",Match,US Census 10 | c,State Capitol Building,https://upload.wikimedia.org/wikipedia/commons/4/41/You_are_here_-_T-shirt.jpg,State government office,"210 Capitol Ave, Hartford CT 06106",41.762848,-72.68245,"210 CAPITOL AVE, HARTFORD, CT, 06106",Exact,US Census -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | leaflet-map-csv 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 84 | 85 | 86 | -------------------------------------------------------------------------------- /leaflet-map-csv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HandsOnDataViz/leaflet-map-csv/cd6ac06fdcee19c84e12950096b2146eb01c7680/leaflet-map-csv.png --------------------------------------------------------------------------------