Massachusetts safe town/city selector by county and community
This interactive visualization helps users select safe towns and cities across Massachusetts by filtering crime data by county or community type. The map displays the top five lowest crime-rate areas for any chosen selection, with circle size proportional to crime ratio and hover tooltips revealing additional details. Built with React and D3, the visualization uses d3.geoPath with a geoAlbers projection to render Massachusetts county boundaries from TopoJSON data, while d3.scaleSqrt sizes the crime-rate circles over the state map. Crime statistics come from a 2016 Massachusetts crime dataset.
AI-generated descriptionThis viz aims to help people choose area based on crime rate at different Massachusetts communities (city, suburb, rural) and counties.
User can choose desired county or community, then top 5 safest city/town (low crime rate) will show at the map (please note: not all town has the data, some county could have less than 5 city/town data )
Data based on: Masschusetts Crime dataset for 2016.
Geo Shape file are from here
The download Shape file did not contain coordination. Therefore, it is first converted to geojson by ogr2ogr
Geojson then reprocessed by mapshaper to Topojson.
Topojson file is loaded to Github gist
Crime data csv is loaded to gist
Menu are created to help user filter data
circle size are corresponding to the crime ratio
hover over circle will show additional info