PINGDOM_CHECK
ArticleUse case

Web Scraping to Create Open Data: Empowering Data Accessibility

Web Scraping to Create Open Data - Embrace the power of web scraping in generating open data. Contribute to the open data movement.

Cecilia Haynes · Content Strategist

4 min read ·

Web Scraping to Create Open Data: Empowering Data Accessibility

Web scraping to create open data

Open data is the idea that some data should be freely available to everyone to use and republish as they wish, without restrictions from copyright, patents or other mechanisms of control.

https://en.wikipedia.org/wiki/Open_data

My first experience with open data was in the year 2010. I wanted to create a better app for Bicing, the local bike sharing system in Barcelona. Their website was a nightmare to use and I was tired of needing to walk to each station, trying to guess which ones had bicycles. There was no app for Android, other than a couple of unofficial attempts that didn’t work at all.

I began as most would; I searched the internet and found a library named python-bicing that was somehow able to retrieve station and bike information. This was my first time using Python and, after some investigation, I learned what the code was doing: accessing the official website, parsing the JavaScript that generated their buggy map and giving back a nice chunk of Python objects that represented bike share stations.

This I learned was called web scraping. It was like I had figured out a magic trick that would allow me to always be able to access the data I needed without having to rely on faulty websites.

The rise of OpenBicing and CityBikes

Shortly after, I launched OpenBicing, an Android app for the local bike sharing system in Barcelona, together with a backend that used python-bicing. I also shared a public API that provided this information so that nobody else had to do the dirty work ever again.

Pasted image at 2016\_03\_30 08\_02 AM

Since other cities were having the same problem, we expanded the scope of the project worldwide and renamed it CityBikes. That was 6 years ago.

Pasted image at 2016\_03\_30 08\_03 AM.png

To date, CityBikes is the most comprehensive and widely used open API for bike sharing information, with support for over 400 cities worldwide. Our API processes around 10 requests per second and we scrape each of the 418 feeds about every three minutes. Making our core library available for anyone to contribute has been crucial in maintaining and adding coverage for all of the supported systems.

Pasted image at 2016\_03\_30 06\_04 PM

The open data fallacy

We are usually regarded as "an open data project" even though less than 10% of our feeds come from properly licensed, documented and machine-readable feeds. The remaining 90% is composed of 188 feeds that are machine-readable, but not licensed nor documented and 230 that are entirely maintained by scraping HTML pages.

Graph-CityBikes

NABSA (North American BikeShare Association) recently published GBFS (General Bikeshare Feed Specification). This is clearly a step in the right direction, but I can’t help but look at the almost 60% of services we currently support through scraping and wonder how long it will take the remaining organizations to release their information, if ever. This is even more the case considering these numbers aren’t even taking into account worldwide coverage.

Over the last few years there has been a progression by transportation companies and city councils toward providing their information as "open data". Directive 2003/98/EC encourages EU member states to release information regarding public services.

Yet, in most cases, there’s little action in enforcing Public Private Partnerships (PPP) to release their public information under a non-restrictive license or even to transfer ownership of the data to city councils to be included in their open data portals.

Even with the increasing number of companies and institutions interested in participating in open data, by no means should we consider open data a reality or something to be taken for granted. I firmly believe in the future and benefits of open data, I have seen them happening all around CityBikes, but as technologists we need to stress the fact that the data is not out there yet.

The benefits of open data

When I started this project, I sought to make a difference in Barcelona. Now you can find tons of bike sharing apps that use our API on all major platforms. It doesn't matter that these are not our own apps. They are solving the same problem we were trying to fix, so their success is our success.

Besides popular apps like Moovit or CityMapper, there are many neat projects out there, some of which are published under free software licenses. Ideally, a city council could create a customization of any of these apps for their own use.

Most official applications for bike sharing systems have terrible ratings. The core business of transportation companies is running a service, so they have no real motivation to create an engaging UI or innovate further. In some cases, the city council does not even own the rights to the data, being completely at the mercy of the company providing the transportation service.

Open data over apps

When providing public services, city councils and companies often get lost in what they should offer as an aid to the service. They focus on a nice map or a flashy application, rather than providing the data behind these service aids. Maps, apps, and websites have a limited focus and usually serve a single purpose. On the other hand, data is malleable and the purest form of representation. While you can’t create something new from looking and playing with a static map (except, of course, if you scrape it), data can be used to create countless different iterations. It can even provide a bridge that will allow anyone to participate, improve and build on top of these public services.

Wrap Up

At this point, you might wonder why I care so much about bike sharing. To me it’s not about bike sharing anymore. CityBikes is just too good of an open data metaphor, a simulation in which public information is freely accessible to everyone. It shows the benefits of open data and the deficiencies that arise from the lack thereof.

We shouldn't have to create open data by scraping websites. This information should be already available, easily accessed and provided in a machine-readable format from the original providers, be they city councils or transportation companies. However, until there's another option, we’ll always have scraping.

Try Zyte API

Build your first scraper in minutes

Free trial, no credit card. From a single request to production in an afternoon.

Get started

Cecilia Haynes

Content Strategist

Cecilia's articles pair open-data investigative journalism (the Panama Papers, corruption in Peru, price-inflation tracking around holidays) with company-culture and open-source community updates from Zyte's earlier years. Recurring themes include using web data for competitive a…

More from this author

Continue reading

prompt-to-action-zyte-cdp
AI

Give your AI agent a browser: search, compare, and check product availability with Zyte CDP

What if your AI agent could use a real browser to search, click, compare products, and collect data, without you writing a selector for every step? By connecting it to a remote Zyte CDP browser, you can turn plain-language instructions into practical browser automation.

John Rooney
Building robust agentic AI workflows with rapid web data
Use case

Building robust agentic AI workflows with rapid web data

AI agents need access to public web data, right now. Tools connected to web scraping APIs empower agents to return live data quickly.

Theresia Tanzil10 min read
Enhancing AI model performance with fresh web data
Use case

Enhancing AI model performance with fresh web data

No-one likes an out-of-touch AI assistant. Fortunately, rapid refreshing can keep AI models aware of the very latest public information.

Theresia Tanzil10 min read
Web scraping on an iPhone? Yes, really!
Use case

Web scraping on an iPhone? Yes, really!

When you can scrape the web by API, a world of possibility opens up. Yes, you can extract live web data using iOS Shortcuts.

Ayan Pahwa10 min read
Introducing Zyte Web Data for Claude Code: Production-ready scraping from a prompt
Use case

Introducing Zyte Web Data for Claude Code: Production-ready scraping from a prompt

Developers are embracing agentic coding tools - but data engineers need tools with specialist scraping skills.

Valter Sciarrillo10 min read
Copilot like a pro: Eight tips that supercharged my workflow
Use case

Copilot like a pro: Eight tips that supercharged my workflow

AI-assisted coding is a revelation. But are you getting the most out of your IDE’s sidebar sidekick?

Shivanshu Srivastava10 min read

The Community · Newsletter

The best of Zyte and the data web, in your inbox.

One curated edition — new articles, product updates, and the stories shaping the data web. No noise.