We recently visited a small Spanish town that is using social media in a new way. Our research lab is studying the town to learn how these technologies might help communities around the world become more responsive to their citizens. This is a brief report on what we know so far.

For the last four years, a town in southern Spain has been conducting a remarkable experiment in civic life. Jun (pronounced “hoon”) has been using Twitter as its principal medium for citizen-government communication. Leading the effort is Jun’s Mayor, José Antonio Rodríguez Salas, a passionate believer in the power of technology to solve problems and move society forward.

Since launching the initiative in 2011, Rodríguez Salas has been recruiting his 3,500 townspeople to not only join the social network but have their Twitter accounts locally verified at town hall. This extra step isn’t necessary to participate in the conversation — Twitter is open to anyone — but it helps town employees know they’re dealing with actual residents.

In the most basic scenario, a citizen who has a question, request or complaint tweets it to the mayor or one of his staff, who work to resolve the matter. For instance, in the sequence of tweets shown below (which we pulled from the 2014 Twitter data and translated into English), at 10:48 pm a citizen tells the mayor that a street lamp is out on Maestro Antonio Linares Street. Nine minutes later, the mayor replies that he’ll have the town electrician fix it the next day. The mayor’s tweet includes the Twitter handle of the electrician, who is automatically notified that he’s been mentioned and sees the exchange. That tweet is a public promise that the town will indeed take action, and to underline this it ends with the hashtag #JunGetsMoving. The next day, the electrician tweets a photo of the repaired fixture, thanking the citizen for his help and repeating the hashtag

A citizen alerts the mayor to a broken street lamp. Two tweets later, it’s fixed.

Governments have been responding to citizens for centuries. But digital networks have made it possible to build much faster, more efficient feedback loops. Each of the participants in the above transaction wrote a single text of less than 140 characters, and in less than 24 hours the problem was solved.

There are numerous cases of public officials responding to tweets. U.S. Senator Cory Booker made headlines several times for doing so when he was mayor of Newark, New Jersey. For a big city U.S. mayor, this was considered unusual behavior and therefore newsworthy. In Jun, however, it has been systematically adopted as the way things get done every day. If Rodriguez Salas didn’t respond to an urgent citizen tweet, it would make headlines.

Because these communications occur on a public social platform, they can be seen by everyone in the community. This “mutual visibility” (sometimes called “mutual transparency”) serves as both a carrot and a stick. On one hand, the government’s performance comes under greater public scrutiny. If a broken streetlight isn’t fixed, everyone knows it and the slacking employee is more likely to be disciplined or, if it becomes a pattern, fired. That’s the stick.

But the good work done by public servants is also now visible to all and thus more likely to be recognized and rewarded. The carrots can be as small as a message being favorited or retweeted (the electrician received both), or as great as winning the esteem of one’s neighbors and new status in the community. The operator of the town’s street-sweeping machine, whose entertaining tweets have made him a local celebrity, told us that having his daily work seen and appreciated on the social platform has changed his life.

According to the mayor, this system is saving the town time and money. Tweeting is quicker than fielding and returning phone calls, which used to consume his day. He says these efficiencies have allowed him to reduce the police force from four employees to just one. Jun’s sole police officer told us he now receives 40 to 60 citizen tweets per day, ranging from the serious (there’s been a bad car accident) to the trivial (my neighbor is singing at all hours, please make him stop). He noted that being accessible to the public on a 24/7 social network has its downsides; to protect his family time, on arriving home in the evening he turns off his phone. But what if there’s an emergency, we asked. Answer: It’s a small town and everyone knows where he lives.

Jun citizens also use Twitter to voice their views on local issues. At town council meetings, which are streamed live on the web, those not physically present may participate by tweeting questions and comments, which appear on a screen in the council chamber.

Beyond government, the social network is broadly integrated into the town’s everyday life, used for a wide variety of tasks such as publicizing social and cultural events, booking medical appointments, following youth sports teams, and just keeping up with neighbors. The town employee who tweets the school lunch menu each weekday told us on that on weekends she enjoys sharing some of her family’s home life via tweets. One retiree who learned to use Twitter at a technology education center run by the town said the network has become his principal news source. “It’s just like a newspaper!” he enthused, noting that the mayor tweets so often about national and global events, he’s a one-man media outlet.

Jun essentially runs on Twitter, a groundbreaking use of social technology that, as far as we know, is unique. All over the world, digital technologies play a growing role in community management. In their book, The Responsive City, Stephen Goldsmith and Susan Crawford write about “the emerging cadre of officials and civic activists who are using the new data tools to transform city government” in Boston, Chicago, New York and elsewhere. The New York City police department recently started using Twitter to connect with citizens. But Jun is the first community to use a social medium comprehensively for all civic communication. And it happened in an entirely home-grown way. For the first couple of years, Twitter the company was not even aware of the experiment.

Our academic research group at the MIT Media Lab, the Laboratory for Social Machines, was founded last fall with a generous grant from Twitter, and one of us has a work relationship with Twitter. But the company doesn’t select or shape our research projects, and our interest in Jun is ultimately not about one platform: It’s about the future of all social media and their potential to reshape how communities large and small work. For studying these questions, Jun is an ideal laboratory, small enough that you can get a holistic feel for the place in a couple of days, and large enough that over time, through data analysis and on-the-ground research, meaningful lessons can be extracted. That’s our hope, anyway.

Many of the Jun citizens we interviewed told us that the initiative has had a net positive effect on the town. “Twitter is a plus, it makes the town better,” one said. Another noted that “it’s an easy and fast way to connect” and that “people can build on each others’ comments.”

But it is not without its critics. One resident said he dislikes the way the mayor uses Twitter for self-promotion, and how town employees tend to parrot everything the boss says. The same person feels public servants shouldn’t use their accounts to tweet about personal matters (“I don’t care that they had paella for dinner.”) Last time Rodríguez Salas ran for reelection, his opponent urged citizens to vote “for a real mayor, not a virtual one.”

The mayor himself has a few problems with the system. He jokingly calls Twitter “the Society of the Minute” and says it has a way of making citizens more impatient with government. “In the real world, one in every 43 people has a problem with everything. On Twitter, it is one in 27” — and they always expect an immediate response.

He notes that complicated public issues are difficult to discuss on Twitter because of its format. He also acknowledges that his ad hoc method for managing the incoming — checking his phone often and responding right away — could probably be improved. Somewhat miraculously, he’s been governing the town with Twitter and virtual duct-tape, and perhaps could use a data-driven dashboard that organizes it all.

For a clearer perspective, we have begun analyzing Jun’s Twitter data, along with other town records, from the beginning of the initiative to the present. Among the questions we’re seeking to answer: Is public engagement on the rise as result of the experiment, and is the demographic composition of the conversation changing? Do citizens vote and attend town meetings more than they did in the past? Are public issues solved more efficiently? Has the use of this tool simply amplified old ways of governing Jun, or has mutual visibility shifted it in some fundamental way, perhaps towards decentralization?

We don’t yet have the answers, but an initial mapping of the Twitter data has begun opening a new window on the town. In the screen shots below of a data explorer being developed by Martin Saveski, a graduate student at the Laboratory for Social Machines, each circle represents a Jun citizen or organization. The lines between the circles represent Twitter follower relationships. The larger the circle, the more “important” the position occupied by that person in the network (for this measure of Twitter importance — by no means the only meaningful kind of importance in the community — we used PageRank, Google’s original algorithm for ranking web pages). The four colors denote different sub-networks of people within Jun who are closely tied to each other by their Twitter activity. In each figure, the personal connections of one particular citizen (the white circle) are highlighted, and further details about that person are shown in the box to the right. The first shot focuses on the mayor, the second on the electrician.

A visualization of the mayor’s connections to the community (he’s the white circle). To the right, more details about his public Twitter activity. (Click to enlarge).

For electrician Miguel Espigares (the white circle), the picture is different, reflecting his work and unique role in the town. (Visualizations by Martin Saveski)

Through such analyses, we hope to gain insights that will help Jun make its system more effective. Our longer-term goal is to determine if it can be replicated at scale in larger communities, perhaps even major cities.

One key question is the leading role played by the mayor, who has held office for the last eleven years and before that was deputy to his father. Throughout those years, Jun was a trailblazer in applying digital tools to democracy, including electronic voting and live-streamed town meetings.

Jun’s flag

Rodríguez Salas, with his relentless belief in innovation, spearheaded all these efforts. Even before the Twitter experiment, a Spanish newspaper called him “El Alcalde Digital” (The Digital Mayor) while a national TV report dubbed the town “El Increíble Jun” (The Incredible Jun). He convinced Junians to adopt a new flag with the town motto — “Love” — spelled out in binary code. Between his personal and official mayoral accounts, he has about 350,000 Twitter followers — that’s 100 times the population of Jun, and about 100,000 more followers than New York City Mayor Bill De Blasio has in his two verified accounts. This is not just any small-town mayor. He also has a warm personality and a common touch. As he walks down the street, a bunch of middle-school-aged boys run up to him shouting, “Mayor! Mayor!” and the first thing he does is make sure they’re on Twitter and he’s following them.

In short, the mayor has an unusual combination of tech sophistication and personal charisma. Is such a leader required for bringing government into the social age? Could the Jun system work in a metropolis with millions of citizens and a different kind of mayor? Rodríguez Salas thinks so and he has ideas about how.

José Antonio Rodríguez Salas, Mayor of Jun (photo by Álex Cámara)

For now, in conversation he returns often to his primary goal: making democracy more transparent and participatory. In his office, where the blue Twitter bird adorns the wall behind his desk (in the spot where a portrait of the Spanish king used to hang), he recently installed glass ceiling panels open to the sky to symbolize the new transparency. The citizens will soon have a chance to pass judgment on his work: In elections next month, they will decide whether to give him another term.

Meanwhile, we’ll be digging deeper into the data and sharing what we learn from one town’s surprising leap into the socio-political future. Stay tuned.

Deb Roy is associate professor at the MIT Media Lab where he directs the Laboratory for Social Machines, as well as Chief Media Scientist of Twitter. William Powers is a research scientist at the Laboratory for Social Machines and author of the New York Times bestseller Hamlet’s BlackBerry.