If you just exported some GeoJSON that used to be a shapefile, your GeoJSON might be like a gazillion MB now. There are two major things you can try
I’d honestly try removing unused data columns first, simplifying geometries can get messy.
You should also check out topojson, which is practically industry-standard with d3 these days. Topojson takes GeoJSON and can make it 50-80% smaller!
First, use the magnifying glass with the
+ on it to zoom in so you can see your polygons up close. If we screw them up we need to know!
You’ll want to use the top menu and select
Vector > Geometry Tools > Simplify Geometries.
Now try saving it again! The big issue you’ll probably end up with is county/state/census tract/etc boundaries not quite lining up any more, which is why I recommend removing attributes first.
This is the thing that really seems to work for me - getting rid of data you just don’t need. GeoJSON stores data in a terribly long-winded way, so every additional column that you have is tons of extra space wasted.
First, get into the nuts and bolts of the layer by right-clicking it and selecting
Fields from the left-hand side. We’re going to want to edit those fields, so you’ll also want to turn on edit mode by clicking the little pencil icon.
Select the columns you don’t need (
Control + click for multiples, or
Shift + click for many in a row) and then click the Delete column button.
For my project I was only going to use the year the building was built (
YearBuilt), so I was able to remove dozens of columns, and really get my filesize down.
Now you can do the right-click,
Save As... from above and save your brand-new, super-small file!