Happy Veteran's Day!
I thought it would be fun to try web scraping in Python. I wanted to see what the longest recorded sniper kills were and found a table on Wikipedia to scrape. Since it was my first attempt at web scraping using Python, I found it pretty difficult. I used Beautiful Soup to try to scrape the Wikipedia table but didn't have much luck. I was able to inspect the element and pinpoint where to start scraping, but I had a lot of difficulty parsing and cleaning the data since the table contained hyperlinks and images. Luckily I found a Wikipedia library that makes it easier to web scrape and parse the data. There was still a bit of cleaning but it allowed me to practice coding in Python more.
I actually was surprised how long the distances were. The longest recorded sniper kill was by a Canadian who killed an ISIS insurgent from 3,540 meters (over 2 miles!). The shot took 10 seconds to reach it's mark after exiting the barrel of the rifle. To put it into perspective, the average effective range of a pistol and assault rifle is 25 to 30 meters and 300 to 500 meters respectively.
"One man can change the world with a bullet in the right place"
It was cool reading about what a sniper takes into account when shooting. Along with wind, humidity, and barometric pressure; they also have to take into account of the Earth's rotation, known as the Coriolis effect. If the bullet is traveling 1,000 yards, it could be deflected three inches to the right due to the Coriolis effect. If you're firing due east, you would have to aim six inches lower due to the earth rotating towards you and six inches higher when aiming due west.
Technical skills: web scraping html, data cleaning, concatenating columns, dual axis plots
Cover photo credit: US Army Cpl. Bertha Flores
コメント