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
''' | |
Python for Everybody / Dr. Chuck / Univ Michigan / Coursera | |
Course 5: "Capstone: Retrieving, Processing, and Visualizing Data with Python" | |
covid-top20.py: | |
Read COVID-19 JSON dataset | |
Add to a list the total deaths, name & date for each country | |
Finally, sort and report the Top 20 COVID-19 countries |
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
var av = new Avatar(0); | |
var mov = [ // coreografia | |
[ // paso 1 | |
{scale:0.3, rotate:10, x:200, y:200}, | |
{a:1,g:45}, {a:3,g:-43}, {a:5, g:5} | |
], | |
[ // paso 2 | |
{scale:0.5, rotate:0, x:210, y:210}, | |
{a:1,g:90}, {a:3,g:-88}, {a:5,g:10} | |
], |
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
var av = new Avatar(15); | |
var mov = [ // coreografia | |
[[200,230], [1,45], [3,-43], [5, 0]], // paso 1 | |
[[200,220], [1,90], [3,-88], [5, 5]], // paso 2 | |
[[200,210], [1,105], [3,-102], [5, 9]], // paso 3 | |
[[200,200], [1,128], [3,-126], [5, 5]], // paso 4 | |
]; | |
var paso=0, inc=1, maxp=mov.length, pausa=false; | |
av.scale(0.8); | |
frameRate(12); |
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
var av = new Avatar(2); | |
av.scale(0.75); | |
frameRate(35); | |
var draw = function() { | |
background(255, 255, 0); | |
av.setAngle(1, 60); | |
av.next(2); //av.rotate(2, 1); | |
println(av.getAngle(2)); | |
if (mouseIsPressed) { | |
av.setAngle(5,round(random(26,34))); |
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
var av = new Avatar(2); | |
av.scale(0.5); | |
frameRate(35); | |
av.setLimit(1,-5,90); // rango de desplazamiento (angulo limite) | |
av.setNext(1,5); // velocidad | |
var draw = function() { | |
background(155, 125, 196); | |
if (mouseIsPressed) { | |
av.next(1,5); // av.rotare(1,5); | |
} |
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
var av = new Avatar(1); | |
av.scale(0.8); | |
var draw = function() { | |
background(0,200,0); | |
if (av.getAngle(1) < 75) { av.next(1); } | |
av.next(2); | |
av.draw(200,200); | |
}; |
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
var av=[new Avatar(12), new Avatar(20)]; | |
var draw = function() { | |
background(200); | |
av[ round(random(0,1)) ].rotate( | |
round(random(0,9)), | |
random(-5,5)); | |
av[0].draw(mouseX, 200); | |
av[1].draw(mouseY, 200); | |
}; |
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
var av = new Avatar(15); | |
av.scale(0.75); | |
var dir = true; | |
var c = 0; | |
var draw = function() { | |
if (c > 10) { return; } | |
background(0, 0, 0, 100); | |
av.draw(mouseX,mouseY); | |
if ( av.getAngle(1) < 75 ) { | |
av.rotate(1,2); |
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
var av = new Avatar(2); | |
var c1 = color(255, 0, 0); | |
var c2 = color(48, 60, 199); | |
var c = c1; | |
var ang = 1; | |
var mouseClicked = function() { | |
if ( c===c1 ) { | |
c = c2; | |
} else { |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder