function badgeCode(g, c, frameNumber) {
c.fillStyle = "#34495e";
c.fillRect(0, 0, width, height);
const xPos = width/3.5 + s/2;
const yPos = height/2.5 + s/2;
var projection = d3.geoOrthographic().scale(radius).translate([xPos, yPos]);
projection.rotate([240 + frameNumber * 0.5, -30 + frameNumber * 0.5]);
var path = d3.geoPath(projection, c);
c.lineWidth = 1.5;
c.fillStyle = "#3f3f3f";
c.strokeStyle = "#81a980";
c.beginPath(), c.arc(xPos, yPos, radius, 0, 2 * Math.PI), c.fill(), c.stroke();
c.lineWidth = 1.5;
c.strokeStyle = "#81a980";
c.beginPath();
path(world);
c.fill();
c.stroke();
let color = d3.color('#ffba00');
color.opacity = 0.5;
c.fillStyle = color;
path.pointRadius(cityRadius(frameNumber));
cities.features.forEach(city => {
c.beginPath();
path(city);
c.fill();
});
}