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!

 

Comments are closed.

  • Search Pontydysgu.org

    News Bites

    Digital Literacy

    A National Survey fin Wales in 2017-18 showed that 15% of adults (aged 16 and over) in Wales do not regularly use the internet. However, this figure is much higher (26%) amongst people with a limiting long-standing illness, disability or infirmity.

    A new Welsh Government programme has been launched which will work with organisations across Wales, in order to help people increase their confidence using digital technology, with the aim of helping them improve and manage their health and well-being.

    Digital Communities Wales: Digital Confidence, Health and Well-being, follows on from the initial Digital Communities Wales (DCW) programme which enabled 62,500 people to reap the benefits of going online in the last two years.

    See here for more information


    Zero Hours Contracts

    Figures from the UK Higher Education Statistics Agency show that in total almost 11,500 people – both academics and support staff – working in universities on a standard basis were on a zero-hours contract in 2017-18, out of a total staff head count of about 430,000, reports the Times Higher Education.  Zero-hours contract means the employer is not obliged to provide any minimum working hours

    Separate figures that only look at the number of people who are employed on “atypical” academic contracts (such as people working on projects) show that 23 per cent of them, or just over 16,000, had a zero-hours contract.


    Resistance decreases over time

    Interesting research on student centered learning and student buy in, as picked up by an article in Inside Higher Ed. A new study published in PLOS ONE, called “Knowing Is Half the Battle: Assessments of Both Student Perception and Performance Are Necessary to Successfully Evaluate Curricular Transformation finds that student resistance to curriculum innovation decreases over time as it becomes the institutional norm, and that students increasingly link active learning to their learning gains over time


    Postgrad pressure

    Research published this year by Vitae and the Institute for Employment Studies (IES) and reported by the Guardian highlights the pressure on post graduate students.

    “They might suffer anxiety about whether they deserve their place at university,” says Sally Wilson, who led IES’s contribution to the research. “Postgraduates can feel as though they are in a vacuum. They don’t know how to structure their time. Many felt they didn’t get support from their supervisor.”

    Taught students tend to fare better than researchers – they enjoy more structure and contact, says Sian Duffin, student support manager at Arden University. But she believes anxiety is on the rise. “The pressure to gain distinction grades is immense,” she says. “Fear of failure can lead to perfectionism, anxiety and depression.”


    Other Pontydysgu Spaces

    • Pontydysgu on the Web

      pbwiki
      Our Wikispace for teaching and learning
      Sounds of the Bazaar Radio LIVE
      Join our Sounds of the Bazaar Facebook goup. Just click on the logo above.

      We will be at Online Educa Berlin 2015. See the info above. The stream URL to play in your application is Stream URL or go to our new stream webpage here SoB Stream Page.

  • Twitter

  • RT @ingram_nicola Please retweet. CFP and registration open for the next @BSABourdieuSG @britsoci event @SHU_SIoE in September. Looking forward to a reunion and a relaunch. britsoc.co.uk/events/key-bsa… Join us @ Sheffield Hallam Uni. with @ainatarabini @StephieLacey @amy_stich

    About 15 hours ago from Cristina Costa's Twitter via Twitter for Android

  • Sounds of the Bazaar AudioBoo

  • Recent Posts

  • Archives

  • Meta

  • Upcoming Events

      There are no events.
  • Categories