GeoJSON and shapfiles can be a few hundred megabytes, and that becomes a problem when you are trying to make interactive online maps where the webpage size should be small.
https://mapshaper.org/ to the rescue! No installation whatever, all inside a browser, yet super fast.
But there are some problems still if you use the converted files with plotly for making choropleths. Hence this guide:
Go to https://mapshaper.org/ and import your GeoJSON file.
Make sure "detect line intersection" is checked.
If you map loads correctly, click "Simplify".
Tick "prevent shape removal", use "Visvalingam / weigthed area" if you don't have other preferences and apply.
Move the slider to any percentage. If your initial filesize is 100 MB and you slide to 1%, then output file will be 1% of 100 MB. Also click "Repair" after sliding.
Now click export.
Use whatever output format you please, but for compatibility with plotly and D3.js, you should include the output parameter gj2008
to export properly.
And you're done! yay