Created
April 17, 2020 13:52
-
-
Save jld/180747580ad633c93c97fe8f49831c43 to your computer and use it in GitHub Desktop.
Visualization of how not to “anonymize” location data
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jitter[] := | |
RandomReal[{500, 2500}]* | |
RotationTransform[RandomReal[{0, 2*Pi}]][{1, 0}] | |
Table[With[{points = Table[jitter[], 20]}, | |
With[{annuli = Annulus[#, {500, 2500}] & /@ points}, | |
Show[Graphics[{Opacity[0.05], annuli}], | |
Graphics[{Yellow, Point /@ points, Circle[{0, 0}, 500], | |
Circle[{0, 0}, 2500]}], | |
RegionPlot[RegionIntersection @@ Region /@ annuli, | |
PlotStyle -> Red], Axes -> True]]], 3, 5] // TableForm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment