In this close-out post I shall hand over to the teams themselves to walk you through their CTC9 weekend. Check out the videos using the links below. Use the ‘ctc9’ tag to find all other blog posts about the amazing volunteering experience this weekend.
I am so glad I joined the CTC9 project as a volunteer. Blogging about this project was a tremendous experience. There are two aspects of this weekend that amazed me beyond the teams’ achievements.
The idea funnel
It was fascinating to witness the journey we all ventured on – from random ideas on post-its to distilling them down into structured approaches.
The teams seemed to develop naturally based on people’s interests. It is remarkable how smoothly people from different sectors and backgrounds worked together in a very productive way. The Code the City staff did a great job in keeping us all on track.
Here’s a quick update before the big show-and-tell later on.
The team has developed a draft version of the website tucked away on a test server. They have established the first functional search using the category ‘social isolation’. It returns a list of service providers in the area that is drawn from the three source databases. This is a big step forward, as we now know how to program a search and are able to deliver visible results on a user interface.
The team is also working on searches based on location by postcode or radius.
One expected challenge is the extraction of information from differently formatted data sources. For example, one source database does not provide contact details in dedicated address fields but in a more general description box.
Team: Soul Cats
This group went back to focusing on the public end users. They came up with various names for this new website that make it easy to find. They played with words from Scots dialect and proper King’s English. All suggestions were googled to see whether they exist already or are buried in amongst a ton of other results. Ideally, we want something unique!
The team suggested to submit a selection of words to a public forum in order to collect opinions or votes.
Team: The Professionals
The Professionals are a spin-off group from the Soul Cats. It’s a rollercoaster with those Cats! They went back to focusing on the value this website for health care professionals. In a structured approach they answered 4 key questions:
- Who are key stakeholders?
- What are key relationships?
- What are key challenges?
- What are the gains right now if this project went live?
What a beautiful sunny morning for making my way over to CTC9 HQ. It’s a slow start today. Hey, it’s Sunday…
Since we didn’t have a close-out meeting last night, we caught up with everybody’s progress in a kick-off meeting this morning. Make sure to read the update from yesterday afternoon beforehand.
Team: ALISS API
The data is flowing! We now have access to all 3 data sources: ALISS, GCD and MILO. MILO too? Yes! As it turns computing student Mikko has been working on hooking up MILO to the project as part of Team ALISS API.
Linking up GCD encountered a stumbling block after the initial success because the WiFi network ended up blocking the website used for our API. By the sounds of it, this is in hand though.
Now that we are connected to all databases, they are being combined by matching titles, identifying duplicates etc. The result will provide access to searchable data from all sources via one URL. James has already launched a temporary live demo page that connects to the databases. The first rough draft is based on story boards James designed with input from the user-focused teams last night. The website is currently at an early stage; so some buttons will work, some won’t. Feel free to rummage around.
There is also a shared file repository on github. It harbours user interface code, the backend REST API and photos from our brain storming sessions.
The next big goal is to develop the visual interface further to make search results visible to the website user. At the moment results appear only in code. The team also suggested that functionalities for location-based search and prioritising search results will require more development.
Team: Soul Cats
Teams Stripy Tops and Access All Areas have merged under the new name ‘Soul Cats’ (inspired by a T-shirt). This move made sense because both have been targeting user groups – the professional user (Stripy Tops) and the public (Access All Areas) – and now felt that their paths were converging.
The teams have drawn up more specific suggestions on user requirements based on the needs of different target groups. It’s quite impressive how yesterday’s wide-roaming discussions are now funneling into concrete scenarios and solutions. The obvious conclusion is to make the web interface simple – clear language, natural keywords, self-evident icons, sensible menu structure etc.
- options for geo-location of service providers relative to user addresses
- including info on mobility/access issues e.g. stairs
- including info on parking, public and community transport connections
- including photos of the service location, exteriors and interiors, so that people easily recognise the place once there
The next steps will involve working closer with our coders and coming up with names for the page, categories etc.
We kicked off the ‘Code The City 9 – Health Signposting’ weekend this morning bright-eyed and bushy-tailed. There are just under 20 attendees from mixed backgrounds.
We have volunteered to help solve issues around health care data. One problem is that health care data are currently maintained in (at least) three unconnected systems run by different organisations. These are ALISS, GCD (Grampian CareData) and MILO. The ultimate goal of this project is to create an open data source that provides accessible up-to-date information to the public and professionals.
After two days of intense activity and a whole heap of learning for all of us, Code The City #8, our Chatbots and AI weekend came to an end at tea time on Sunday.
It couldn’t have happened without the generous sponsorship of our two sponsors: The Health Alliance, and Fifth Ring, for which we are very grateful.
The weekend rounded off with presentations of each project, four of which we’ve captured on video (see below).
Each of the projects has its own Github repo. Links are included at the end of each project description. And, two days later, the projects are still being worked on!
Team ALISS worked on providing a chatbot interface onto healthcare and social data provided via the ALISS system.
You can find Project ALISS’s code here on Github.
You can also watch this video of Douglas Maxwell from the Alliance being interviewed about the weekend (although at the time of writing the video is offline due to an AWS problem).
This team aimed to make the quality of consultations better through using intelligent chatbot interfaces to guide users through the process – and to provide challenge by prompting citizens to comment on previous consultees’ input.
You can find the code for City-Consult at this Github repo.
The concept for NoBot came from an initial idea which was of a bot which would make scheduling meetings easier. That spawned the idea – what if the Bot’s purpose was to make you have fewer meetings by challenging you at every turn, and in the process the bot’s personality as a sarcastic gatekeeper was born.
The code for Nobot lives here on Github.
Sadly there is no video of the wind-up talk for Seymour. In short the purpose of Seymour is to help you keep your houseplants alive. (More details to come).
You can find the code for Seymour at this repo on Github.
Team: Stuff Happens
We started this project with the aim to help citizens find out what was happening in the myriad of local events which we each often seem to miss. Many local authorities have a What’s On calendar, sometimes with an RSS feed. None we found had an API unfortunately.
We identified that by pulling multiple RSS feeds into a single database then putting a bot in front of it, and either through scripting or applying some AI, it should be possible to put potential audiences in touch with what is happening.
Further, by enhancing the collected data – enriching it either manually or by applying machine logic, we could make it more easily navigable and intelligible.
Expect a full write-up of the challenges of this project, and what progress was made, on Ian’s blog,
There is no video, but you an find the project code here on Github.
This project set out to solve the problem of checking if a shop or business was still open for the day through a Facebook bot interface – as you with wander around, wondering about the question, as it were.
You can find their code here.
And finally we were joined by Rory on day two who set out to assist team Stuff-Happens through developing some of the AI around terminologies or categories. That became the:
Word Association Scorer
This is now on Github – not a bot but a set of python functions that scores a given text against a set of categories.
We had loads of positive feedback from those who attended the weekend (both old hands and newbies) and from those who watched from afar, following progress on Twitter.
We’ve published the dates for CTC9 and subsequent workshops on our front page. We hope you can join us for more creative fun.
Ian, Andrew, Steve and Bruce
This post was originally published on 10ml.com by Ian Watt
The art of scraping websites is one beset by difficulties, as I was reminded this week when re-testing a scraper that I built recently.
As part of my participation in 100 Days of Code I’ve been working on a few projects.
The first one that I tackled was a scraper to gather data from the PDF performance reports which are published on a four-weekly cycle Scotrail’s website. On the face of it this is a straightforward things to do.
- Find the link to the latest PDF on the performance page using the label “Download Monthly Performance Results”.
- Grab that PDF to archive it. (Scotrail don’t do that – they vanish each one and replace it with a new one every four weeks, so there is no archive).
- Use a service such as PDFTables which has an API, uploading the PDF and getting a CSV file in return (XSLX and XML versions are also available but less useful in this project).
- Parse the CSV file and extract a number of values, including headline figures, and four monthly measures for each of the 73 stations in Scotland.
- Store those values somewhere. I decided on clean monthly CSV output files as a failsafe, and a relational SQLite database as an additional, better solution.
Creating the scraper
So, I built the bones of the scraper in a few hours over the first couple of days of the year. I tested it on the then current PDF which was for period nine of 2016-17. That worked, first creating the clean CSV, then later adding the DB-write routines.
Boom – number 1
I then remembered that I had downloaded the previous period’s PDF. So I modified the code (to omit the downloading routine) and ran it to test the scraping routine on it – and it blew up my code. The format of the table structure in the PDF had changed with an extra blank link to the right of the first list of station names.
After creating a new version and publishing that, I sat back and waited for the publication of period 10 data. That was published in the middle of this week.
Boom – number 2
I re-ran the scraper to add that new PDF to my database – and guess what? It blew up the scraper again. What had happened? Scotrail had changed the structure of the filename of the PDF – from using dashes (as in ‘performance-display-p1617-09.pdf’) to underscores (‘performance_display_p1617_10.pdf’)
That change meant that my routine for sicking out the year and period, which is used to identify database records, broke. So I had to rewrite it. Not a major hassle – but it means that each new publication has necessitated a tweaking of the code. Hopefully in time the code will be flexible enough to accommodate minor deviations from what is expected without manual changes. We’ll see.
We’re ‘doing the wrong thing righter’ – Drucker
Of course, none of this should be necessary.
In a perfect world Scotrail would publish well structured, machine-readable open data for performance. I did email them on 26th November 2016, long before I started the scraper, both asking for past periods’ data and asking if they wanted assistance in creating Open Data. I got a customer service reply on 7th December saying that a manager would be in touch. To date (15 Jan 2017) I’ve had no further response.
The right thing
Abelio operates the Scotrail franchise under contract to the Scottish Government.
Should the terms of such contracts not put an obligation on the companies not only to put the monthly data into the public domain, but also that it be made available as good open data – and follow the Scottish Government’s on strategy for Open Data ? Extending the government’s open data obligation to those performing contracts for governments would be a welcome step forward for Scotland.
Code the City #8, which will take place in on Sat 25th to Sunday 26th February 2017, will be an exploration of the world of chatbots and AI (or Artificial Intelligence), identifying problems to tackle and quickly prototyping solutions.
>>> Book a ticket on our Eventbrite page
What are chat bots?
A chatbot is a piece of software that interacts with a customer or user to directly answer their questions. It uses existing data or information coupled with artificial intelligence to respond in a human-like way, guiding the user to a solution.
There are many examples of live chat bots in this exciting, emerging field. A chatboat could give you travel directions, tell you when its next going to rain in your area, or help you contest parking tickets. It could book you a flight and hotel, or act as a free lawyer to help the homeless get housing . The HBO series Westworld has even launched a bot to help you interact with the (fictional) holiday park!
If you are new to this field and want to get started we suggest you read the Complete Beginners Guide to Chatbots (and some of the links at the end of this article).
How will the weekend run?
We’ll apply our usual Code The City methodology:
- Bring together a diverse range of people from various backgrounds, to form teams.
- Identify problems that we’d like to apply chatbots to solve.
- Identify approaches, information and data, to guide how we develop the bots and train them
- Mix academic thinking, and user need, with open source technology and open data to develop new services
- Iterate quickly through approaches, testing ideas, failing quickly and refining our approaches.
- Prototype and demonstrate solutions to an interested audience
Who should attend?
- Service owners – and service providers
- Academics and students in the field of chatbots and artificial intelligence
- Data specialists
- Front-end and UX designers
- Bloggers and social media practitioners
- Anyone with an interest in getting involved in creating bots even for fun!
What you will do?
You will create mixed teams to workshop chatbot solutions to real world issues. Maybe these will building on the outputs of previous work we’ve done at CodeTheCity. Through rapid prototyping you will create new applications and have some fun in the process.
We’ll show you new techniques for service design, idea generation, prototyping, and rapid iterative application development – and you will show other participants some tricks and approaches, too. We’ll share knowledge and learning.
You might even get a Tshirt, and we can guarantee the best catering of any weekend workshop in the city!
To book a free ticket visit our Eventbrite page But be quick, tickets will go swiftly!
All attendees will get a year’s free membership of the Open Data Institute.
If you have any questions please get in touch.
How can I support this event?
If you are interested in sponsoring this event please, or providing other support such as access to online tools or services, please get in touch.
Useful Articles and Resources
- Chatbots Magazine
- Chatbots Aren’t A Fad – they’re a revolution
- Ten tools to build your own Chatbot.
- Building Bots for Service
- Eight Principles of Bot Design
- Chatbots – the ultimate prototyping tool.
- Introduction: Deep Learning for Chatbots, part 1 and part 2
- Eleven Examples of Conversational Commerce and Chatbots 2016
- If you are a Slack user, you can create a Slack bot to mimic your colleagues in Python.
>>> Book a ticket on our Eventbrite page
Ian writes about using open data to look at GP appointment availability on the Aberdeen ODI Node blog.