Monday, September 30, 2019

Mapping Global Data Sets: JSON Format

In the previous post we used datasets stored in the CSV format. In this post we'll work with data stored in JSON format. First we'll download a data set representing all the earthquakes that have occurred in the world during the previous month. Then we’ll make a map showing the location of  these earthquakes and how significant each one was. Because the data is stored in the JSON format, we’ll...
Share:

Sunday, September 29, 2019

Handling issues arising due to missing/corrupt data

The program we made in the previous post can use data for any location. Sometimes weather stations collect different data than others, and some occasionally malfunction and fail to collect some of the data they’re supposed to. Missing data can result in exceptions that crash our programs unless we...
Share:

Friday, September 27, 2019

Adding dates to our graph using The datetime Module

In the previous post we drew a simple temperature data plot . Let’s add dates to our graph to make it more useful. The first date from the weather data file is in the second row of the file: "USW00025333","SITKA AIRPORT, AK US","2018-07-01","0.25",,"62","50" The data will be read in as a string,...
Share:

Thursday, September 26, 2019

Downloading data sets from online sources

We can find an incredible variety of data online, much of which hasn’t been examined thoroughly. The ability to analyze this data allows us to discover patterns and connections that no one else has found. We can access and visualize data stored in two common data formats, CSV and JSON. In this post,...
Share:

Wednesday, September 25, 2019

Rolling Two Dice

In the previous post we saw rolling a single dice D6. Now we'll roll two dice together. Rolling two dice results in larger numbers and a different distribution of results. The following code will create two D6 dice to simulate the way we roll a pair of dice: from die import Die from plotly.graph_objs...
Share: