This program is designed to calculate the fractal dimension of each of 50 US states (and any user inputed image). I got the idea for this project from 3Blue1Brown's video about fractals and thought it would be a cool thing to try out for myself. Link to video here -> https://www.youtube.com/watch?v=gB9n2gHsHN4
This is another project intented to expand my breadth of knowledge of Python and programming in general.
The program uses:
- Web scraping
- Image Processing
- os pathing
- MatPlotLib
- Statistical Analysis
- Cool Maths
- csv files
- GUI
Process of the project:
-
Web scrape the 50 outline images of the states off of this website: https://gisgeography.com/state-outlines-blank-maps-united-states/ (Beautiful Soup)
-
Resize, convert to binary, and skeletonize the image. (Image, ImageStat, ImageChops from Pillow) (skeletonize from skimage.morphology)
-
Cut the images up into evenly sized squares
-
Check if the state's outline is in the image:
- Tint the image some color
- Store that data
-
Stitch the bits back together and store the image files
-
Run statistical analysis to calculate fractal dimension of each image
-
Store data in csv file, extract for next step (csv)
-
Represent the data with MatPlotLib (MatPlotLib.pyplot)
-
Build GUI to show off all the data and images (Tkinter)