Posts

Showing posts from November, 2018

Visualizing Geographic Data- Basemap and Python

Image
The goal of this exercise was to explore the fundamentals of geographic coordinate systems and how to work with the Basemap library to plot geographic data points on maps using flight data from the open flights website. The final map examines all the routes from Dallas Fort Worth which have an absolute difference of larger than 180 degrees for either the latitude or longitude values. This is because basemap struggles to create great circles with values greater than 180 degrees.  The diagram is as follows: These are all the routes.  However these are all the airport longitudes and latitudes from the flight database as a scatterplot in using Basemap.

Harry Potter Maze Game - Python

The video shows  the latest version of my Harry Potter Maze Game. I built it using Python's Turtle module.  It is based on C.Thompson's maze game. I made some changes to make it a Harry Potter themed game.  This is using Harry Potter images and references.  So besides the treasure, there is the golden snitch and the symbol representing the treasures from the 3 brothers. The background is white so that it is easier to see the characters, enemies and treasures. The enemies movement is randomized. Enjoy!

Stop Watch The Game- Python

Here is a video of my final version of Stop Watch the Game.  It was built using SimpleGui in Python 2.  There is no sound in the video. One again, the goal of the game is to stop the Stop Watch on the whole second. This is for example 2.0 or 12.0 or 1:15.0. The player gets a point for successfully stopping the Stop Watch. The score (in Red) can be found on the upper right hand corner of the "canvas" box. The format is "hits" / "attempts". Enjoy!!

Latest Pong version using SimpleGui in Python

This is a video of the pong game using SimpleGui (from Rice University) in Python 2. The game has certain rules. In the video, I show the basic functions.  It was a lot of work but lots of fun! Unfortunately, there is no sound for the game. There is keyboard sound. If you can't see the video, select "Read more" to go to the full blog page. Enjoy!!

Data Visualization based on Edward R.Tufte in Python

Image
This is an exercise from DataQuest's Data Science (Python) track .  In this exercise, the goal is to use Edward Tufte's data story telling technique. The original chart was: In this chart the background ticks were removed. To look at STEM degrees, the charts was converted into a 2x2 matrix. In this chart, the borders are removed to make the charts cleaner. However, Tufte argues for connected charts with the "Men" and "Women" labels on the first and last charts.  He also contends that the charts should be ordered from largest variation to smallest variation to make things easier to read and better understand the relationship between charts. Thus , the final chart is:  Important notes: The data is originally from the US Department of Education. The Statistics department releases a data set annually containing the percentage of bachelor's degrees granted to women from 1970 to 2012. The data set is broken up into 17 categorie...

PONG 1st Version Using Simplegui Python

Image
I had already developed a Pong game using Turtle. This weekend, I have started to work on developing a Pong game using Simplegui in Python. This is the first version.  In this version all I have done is developed a program so that the ball bounces when it hits the wall.  I do this by changing the sign of the vector (x, y) to be negative.  I don't have a video but it works and I will show some pictures when the final game is complete.  For now, I just need to be content that I got the ball to bounce of the walls.

Maze Game (Harry Potter) in Python

Image
This is an updated version of my maze game using Python's turtle library.  I started out trying to use a wizard as the main character but I couldn't find any images that I liked. I then decided to use a Harry Potter image.  The other images in this picture are for the treasure chest and wall. I found these images on the internet. There are(were) several problems. The images where .PNG. This means that I have to convert them to .GIF to use with Turtle.  It means that when I convert the images from png to gif I lose the transparency which is why the white background shows up. I will need to change this later.  Also, the images need to be reduced from their normal sizes to 23 x 23 pixels. I will continue to work on the game, but this is the version for now. In later versions, I will put in random enemies maybe a key and try to put in the golden snitch. I will also try to make the game dimensions larger.

Twitter Analysis with NetworkX

Image
NetworkX provides basic drawing functionality.  Here is a subset of nodes based on data from Twitter.

Plotting Inset View in Python

Image
This graph examines Inset views in Python 3.  The chart represents Apple stock from 2001  to 2011. However, the Inset view examines Apple stock from 2007 to 2008. The Apple stock data comes from Yahoo finance.