GoogleTranslate Service


Using Google interactive charts and WordPress to visualise data

August 25th, 2012 by Graham Attwell

This is a rare techy post (and those of you who know me will also know that my techy competence is not so great so apologies for any mistakes).

Along with a university partner, Pontydysgu bid for a small contract to develop a system to allow the visualisation of labour market data. The contractors had envisaged a system which would update automatically from UK ONS quarterly labour market data: a desire clearly impossible within the scope of the funding.

So the challenge was to design something which would make it easy for them to manually update the data with visualisations being automatically updated from the amended data. Neither the contractors or indeed the people we were working with in the university had any great experience of using visualisation or web software.

The simplest applications seemed to me to be the best for this. Google spreadsheets are easy to construct and the interactive version of the chart tools will automatically update when embedded into a WordPress bog.

Our colleagues at the university developed a comprehensive spreadsheet and added some 23 or so charts.  So far so good. Now was the time to develop the website. I made a couple of test pages and everything looked good. I showed the university researchers how to edit in WordPress and how to add embedded interactive charts. And that is where the problems started. They emailed us saying that not only were their charts not showing but the ones i had added had disappeared!

The problem soon became apparent. WordPress, as a security feature, strips what it sees as dangerous JavaScript code. We had thought we could get round this by using a plug in called Raw.  However in a WordPress multi-site, this plug in will only allow SuperAdmins to post unfiltered html. This security seems to me over the top. I can see why wordpress.com will prevent unfiltered html. And I can see why in hosted versions unfiltered html might be turned off as a default. But surely, on a hosted version, it should be possible for Superadmins to have some kind of control over what kind of content different levels of users are allowed to post. The site we are developing is closed to non members so we are unlikely to have a security risk and the only Javascript we are posting comes from Google who might be thought to be trusted.

WordPress is using shortcodes for embeds. But there are no shortcodes for Google Charts embed. There is shortcode for using the Google Charts API but that would invalidate our aim of making the system easy to update. And of course, we could instead post an image file of the chart, but once more that would not be dynamically updated.

In the end my colleague Dirk hacked the WordPress code to allow editors to post unfiltered html but this is not an elegant answer!

We also added the Google code to Custom Fields allowing a better way to add the embeds.

Even then we hot another strange and time wasting obstacle. Despite the code being exactly the same, code copied and posted by our university colleagues was not being displayed. The only difference in the code is that when we posted it it had a lot of spaces, whist theirs appeared to be justified. It seems the problem is a Copy/ Paste bug in Microsoft Explorer 9, which is the default bowser in the university, which invalidates some of the javascript code. The work around for this was for them to install Firefox.

So (fingers crossed) it all works. But it was a struggle. I would be very grateful for any feedback – either on a better way of doing what we are trying to achieve – or on the various problems with WordPress and Google embed codes. Remember, we are looking for something cheap and easy!

 

Leave a Reply

Spam Protection by WP-SpamFree Plugin

  • Search Pontydysgu.org

    News Bites

    MOOCs and beyond

    A special issue of the online journal eLearning Papers has been released entitled MOOCs and beyond. Editors Yishay Mor and Tapio Koshkinen say the issue brings together in-depth research and examples from the field to generate debate within this emerging research area.

    They continue: “Many of us seem to believe that MOOCs are finally delivering some of the technology-enabled change in education that we have been waiting nearly two decades for.

    This issue aims to shed light on the way MOOCs affect education institutions and learners. Which teaching and learning strategies can be used to improve the MOOC learning experience? How do MOOCs fit into today’s pedagogical landscape; and could they provide a viable model for developing countries?

    We must also look closely at their potential impact on education structures. With the expansion of xMOOC platforms connected to different university networks—like Coursera, Udacity, edX, or the newly launched European Futurelearn—a central question is: what is their role in the education system and especially in higher education?”


    The cost of austerity and privatisation

    There is growing concern over the consequences of the English (Scotland, Wales and Northern Ireland have different policies) government’s cutbacks and privatisation of  careers guidance for young people. The International Centre for Guidance Studies reports on a discussion paper called ‘Cost to the Economy of Government Policy on Career Guidance: A Business Case for Funding and Strengthening Career Guidance in Schools‘ from Lizzie Taylor who is an Careers England Affiliate Member. “The report claims that the economic consequence of current government policy on career education is an escalating annual cost to young people in reduced and lost earnings, reaching £676m p.a. in 2018 before dropping back slightly to £665 m p.a.2022. The total cost in reduced and lost earnings to young people in the period 2013 to 2022 is estimated as £3.2bn.”


    Open Education 2030

    The Institute for Prospective Technological Studies (IPTS) –part of the Joint Research Center of the European commission –  is calling upon experts and practitioners to come up with visionary papers and imaginative scenarios on how Open Education in 2030 in Europe might look with a major focus on Open Educational Resources and Practices, in different education sectors.

    The foresight scenarios submitted can be normative or descriptive, idealistic or provocative, critical or imaginary, reflective or polemic, imaginative or concrete, comprehensive or selective, general or specific. They should be both inspiring and scientifically sound.

    Submissions are free to choose any angle, subject, approach, but they say the future vision and/or scenario should address the key question of how Open Education in 2030 in Europe might look, and include the role of OER.

    More details from the EU Europa website.


    PLE Conference Update

    I wasn’t overoptimistic about the Personal Learning Environments Conference this year. Discussions about PLEs have been subsumed in the hype over MOOCs. And most conferences are struggling with the ongoing recession. But I am delighted that we have received 59 submissions including a number of great proposals for interactive workshops.

    The PLE Conference takes place on 10 and 12 July in Berlin.


    Twitter

    Follow Graham Attwell on Twitter Follow Cristina Costa on Twitter Follow Dirk Stieglitz on Twitter

    Other Pontydysgu Spaces

  • Sounds of the Bazaar AudioBoo

  • Recent Posts

  • Archives

  • Meta

  • Upcoming Events

      There are no events.
  • Categories