Real-time infographics with C2 - Births & Death

  • <img src="http://i.imgur.com/PS8Q3Yy.jpg" border="0">

    I'm using C2 to create some interactive animated infographics. This is the first one.

    real-time live births and deaths infographic

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • That's sick man

    I wanna do this kind of stuff as well some time will actual real time APIs :]

  • yes, I would love to do stuff with real 'live' data. There is so much that can be done with the csv plugin, arrays etc but if anyone can point out any tutorials or posts on here that show how to use real live data feeds I'd very much appreciate it. (weather being the obvious)

  • Hmm can do better than weather for more dynamic real time data

    youtube.com/watch

    Digg lab was amazing when it was online

  • Yes, that's great, that's the kind of stuff I'm thinking of I mentioned weather as it's the first live data source that most people figure out how to connect to, so I supposed that if anyone has had any success with C2 and live data it would most likely be something like that.

  • Awesome! smart stuff

  • Thanks Binkus!

  • Got the weather working yesterday ; Start by signing up at api.wunderground.com

    "var div = document.createElement('div');div.id = 'weather';document.body.appendChild(div)"

    ("var uR = "&"'"&Build_string&"';"&";

    jQuery(document).ready(function($) { $.ajax({ url : uR, dataType : 'jsonp', success :

    function(parsed_json) {

    var country = parsed_json['location']['country_name']; //Country Name

    var state = parsed_json['location']['state']; // Abbreviated State for example IA

    var location = parsed_json['location']['city']; //City Name

    var zip = parsed_json['location']['zip']; //Zip code

    var lat = parsed_json['location']['lat']; //Latitude

    var lon = parsed_json['location']['lon']; //Longitude

    var temp_f = parsed_json['current_observation']['temp_f']; // Temp in F

    var temp_c = parsed_json['current_observation']['temp_c']; // Temp in C

    var ob_url = parsed_json['current_observation']['ob_url']; // Full URL

    var ico = parsed_json['current_observation']['icon']; // Icon name

    var div = document.getElementById('weather');

    div.innerHTML = ico+';'+ob_url+';'+country+';'+state+';'+location+';'+temp_f+';'+temp_c+';'+zip+';'+lat+';'+lon+';';

    }})})")

  • Fantastic Noncentz705 ! I cant wait to give this a try and dissect it as soon as I have some time. Thanks so much for sharing that.

  • If you want it here's a quick capx example :

    dl.dropboxusercontent.com/u/139218609/examples/weather.capx

    There's a lot more information returned from the request then what i choose to list, chance of precipitation, wind speeds...

  • Downloaded. Good motivation for me to upgrade my C2 to the latest version to run it. On the list.

    Thanks for the capx!

  • What a fantastically useful capx Noncentz705 I would never have ever gotten there without it.

    I managed to get it working pretty quickly giving me my local weather conditions correctly with the 'autoip' option but only when first run. When I click on the button to call the function again it returns "0" on the screen. I thought perhaps I was hitting the max limit of free calls per minute but it works fine if I restart the layout, so it's just something I'm not getting about how your capx works. I'll figure it out.

    Thanks so much for the massive head start!

  • those births falling off into the abyss are rather poignant

  • fishbottle I'll have a quick look, had a slight problem myself and not sure how to fix it unfortunately... firefox previews the project perfectly, but once exported and uploaded to dropbox it loads and then I get blackscreen. Could you test for me? works fine on mobile and internet explorer.

    edit : <img src="smileys/smiley1.gif" border="0" align="middle" /> Thanks for pointing it out, I found a mistake in the capx I sent you. I uploaded a new version. I'm still having the blackscreen problem though.

  • railslave I'm sure it would be frowned upon by serious statisticians but it works for me. A little visual poetry from within the numbers.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)