{"id":18473653,"url":"https://github.com/robwiederstein/ky_hist_markers","last_synced_at":"2026-04-18T12:04:00.133Z","repository":{"id":79534762,"uuid":"250515602","full_name":"RobWiederstein/ky_hist_markers","owner":"RobWiederstein","description":"Kentucky, like many states, maintains a historical marker database(KHMD). Scraping the database yielded 2226 total markers which were plotted to the center of the county located.","archived":false,"fork":false,"pushed_at":"2020-03-27T11:38:04.000Z","size":503,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-24T22:29:45.867Z","etag":null,"topics":["data-visua","geojson","gis","kentucky","leaflet","leaflet-markercluster","mapping","r","rvest","stringr","webscraping"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RobWiederstein.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-27T11:21:48.000Z","updated_at":"2021-08-25T23:00:14.000Z","dependencies_parsed_at":"2023-05-10T23:30:13.206Z","dependency_job_id":null,"html_url":"https://github.com/RobWiederstein/ky_hist_markers","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/RobWiederstein/ky_hist_markers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobWiederstein%2Fky_hist_markers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobWiederstein%2Fky_hist_markers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobWiederstein%2Fky_hist_markers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobWiederstein%2Fky_hist_markers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RobWiederstein","download_url":"https://codeload.github.com/RobWiederstein/ky_hist_markers/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobWiederstein%2Fky_hist_markers/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31967994,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"online","status_checked_at":"2026-04-18T02:00:07.018Z","response_time":103,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-visua","geojson","gis","kentucky","leaflet","leaflet-markercluster","mapping","r","rvest","stringr","webscraping"],"created_at":"2024-11-06T10:25:53.717Z","updated_at":"2026-04-18T12:04:00.108Z","avatar_url":"https://github.com/RobWiederstein.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kentucky's Historical Markers\n\u003cdiv\u003e\n\u003cbr/\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.robwiederstein.org/blog/2020/3/22/kentucky-historical-markers-or-why-kentucky-needs-an-open-data-portal\"\u003e\n    \u003cimg src=\"img/ky_historic_markers.png\" alt=\"map of kentucky\"\u003e\n  \u003c/a\u003e\nSee \u003ca href=\"https://www.robwiederstein.org/blog/2020/3/22/kentucky-historical-markers-or-why-kentucky-needs-an-open-data-portal\"\u003earticle\u003c/a\u003e.\n\u003c/p\u003e\n\u003c/div\u003e\n\n## About the Project\n\nKentucky maintains a historical marker [database](\"https://secure.kentucky.gov/kyhs/hmdb/CountyMap.aspx)(KHMD).  This project is in two discrete parts: the building of a dataframe for the map markers and the display of the markers on a leaflet map.\n\nThe KHMD fields are not assigned separate html containers so the effort transformed from web scraping (`rvest`) to a regex (`stringr`) exercise. Or, in other words, it was a jumbled mess. However, the information is both extensive and informative. The primary constraint for the mapping of Kentucky’s historic markers was the lack of coordinates.\n\nScraping the database yielded 2226 total markers.  The markers are numbered between 1 and 2,610.  There are 412 that are not included in the database for whatever reason, including poor execution on my part. The database did have the county where the markers are located so the center of each county was computed and the markers were assigned there.  \n\nFor most counties that worked pretty well.  For example, the center of Jefferson County is Louisville and locating the markers there worked well.  However, they were stacked on top of each other. Jefferson County has 228 markers.\n\nWith 228 markers assigned the same coordinates, the \"pop-up\" contents were not easily viewed.  A minimal amout of random noise was introduced (\"jitter\") so the pop-up contents could be displayed.  This ended up with markers placed on the top of strip malls and car dealerships.  The map tiles were changed to Stamen so that building outlines were excluded.\n\n### Built With\n\n* [JQuery](https://jquery.com)\n* [Leaflet](https://leafletjs.com)\n* [R](https://cran.r-project.org)\n* [https://www.convertcsv.com](https://www.convertcsv.com)\n* [Stamen](http://maps.stamen.com/#terrain/12/37.7706/-122.3782)\n* [rvest](http://rvest.tidyverse.org)\n* [Leaflet Marker Cluster](https://github.com/Leaflet/Leaflet.markercluster)\n\n### Prerequisites\n\nThe header code must reference `jquery`, `leaflet` and `leaflet market-cluster`. Leaflet, mentioned above, has excellent documentation. Crucial for the markers to cluster on the Stamen map are the following lines of code added to the header of the webpage:\n```\n\u003c!--stylesheets load first--\u003e\n\u003clink rel=\"stylesheet\" type=\"text/css\" href=\"https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.6.0/leaflet.css\" /\u003e\n\u003clink rel=\"stylesheet\" type=\"text/css\" href=\"https://cdnjs.cloudflare.com/ajax/libs/leaflet.markercluster/1.4.1/MarkerCluster.css\" /\u003e\n\u003clink rel=\"stylesheet\" type=\"text/css\" href=\"https://cdnjs.cloudflare.com/ajax/libs/leaflet.markercluster/1.4.1/MarkerCluster.Default.css\" /\u003e\n\u003c!--scripts load next--\u003e\n\u003cscript type='text/javascript' src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js'\u003e\u003c/script\u003e\n\u003cscript type=\"text/javascript\" src=\"https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.6.0/leaflet.js\"\u003e\u003c/script\u003e\n\u003cscript type='text/javascript' src='https://cdnjs.cloudflare.com/ajax/libs/leaflet.markercluster/1.4.1/leaflet.markercluster.js'\u003e\u003c/script\u003e\n\u003cscript type='text/javascript' src=\"https://cdnjs.cloudflare.com/ajax/libs/leaflet-providers/1.9.1/leaflet-providers.min.js\"\u003e\u003c/script\u003e\n\n```\n### Dependencies\n\nKentucky counties were added as a layer to the map from the Kentucky Open GIS [portal](http://kygovmaps-kygeonet.opendata.arcgis.com/datasets/5a94b295e38244a889ec1d875d6afcc5_0). An API for the full geojson feature collection is available [here](http://kygovmaps-kygeonet.opendata.arcgis.com/datasets/5a94b295e38244a889ec1d875d6afcc5_0.geojson).\n\n## Installation\n\n```\n\n#install.packages(\"devtools\")\ndevtools::install_github(\"RobWiederstein/my_functions\")\n\n#customize\ngit init\ngit clone https://github.com/RobWiederstein/my_functions.git\n```\n\n\n\u003c!-- LICENSE --\u003e\n## License\n\nDistributed under the MIT License. See [LICENSE](LICENSE.md) for more information.\n\n## Contact\n\nRob Wiederstein [@RobWiederstein](https://twitter.com/RobWiederstein) - khuon68@gmail.com\n\nProject Link: [https://github.com/RobWiederstein/covid-19-ky](https://github.com/RobWiederstein/covid-19-ky)\n\n\n\u003c!-- ACKNOWLEDGEMENTS --\u003e\n## Acknowledgements\n\n* [Kentucky Historical Society](https://history.ky.gov)\n* [Kentucky Open GIS](http://kygovmaps-kygeonet.opendata.arcgis.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobwiederstein%2Fky_hist_markers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobwiederstein%2Fky_hist_markers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobwiederstein%2Fky_hist_markers/lists"}