#LasCallesDeLasMujeres (TheStreetsOfWomen) meets Mapbox #mapmadness18
Taking advantage of the fun Mapbox challenge (#mapmadness18), I am going to talk about a project I’ve been recently participating in:
So, round 4 of #mapmadness18, let us begin!
I am a member of GeoChicasOSM, a community present in several Spanish-speaking countries, with the aim of closing the gender gap in #OpenStreetMap and in different areas of geo-technologies, enhancing the realization of collaborative projects and contacting women in the sector. So, as a woman, computer engineer and geo-technology developer, I could not find a better group!
On the occasion of March 8th, the group proposed to carry out an action, this is how the #lasCallesDeLasMujeres/#TheStreetsOfWomen project arose, and I had the opportunity to collaborate being in charge of the technical development.
The main objective of the project is to make visible the scarce representation of women in the public and digital spaces. To achieve it we have done two things:
- Created a world map where the minority that represent the streets named after a women is shown, compared to those named after men.
- Linked each of these famous women with their corresponding article in Wikipedia, to also show that many of them do not even appear.
SEARCHING FOR DATA
With a bit of research (and some more patience), I finally designed a “good-enough-for-now” process, to obtain the data we needed. I generated some scripts and I created a Github project with them (together with detailed instructions to use them):
This should allow anyone (with a minimum programming knowledge) to generate a .geojson file with all the information necessary to incorporate it into the project.
Basically, the process consists in:
- Defining the BBOX of a city (using for example Geofabrik’s tilecalculator)
- Downloading the planet MBTILES file from the OSM QA TILES service offered by Mapbox for data analysis, using it in combination with the TileReduce library by Mapbox, and obtaining a .geojson containing only the streets of the city.
- Extracting a plain text list with the names of the streets from the .geojson, classifying them according to its gender (“Female”/”Male”), and in case they are not classifiable, discarding them. To classify them we are currently using the NamSor API, although we are migrating the process to use a local .csv file with about 50.000 names (between men and women) obtained from public statistical institutes of our countries.
- Once the classification is finished we use the Wikipedia API to relate each female name with her corresponding Wikipedia article (in case it has it).
- Finally, we cross this data with the initial .geojson file containing all the streets of the city, and we generate a new .geojson that only contains the ones named after people, with its gender classification and with its link to wikipedia.
And now we can go to Mapbox Studio to visualize the results and check if everything has gone well:
DEVELOPING THE WEB MAP
To visualize the data we created a simple web app using the Mapbox GL JS library.
Creating the map
First we create the map object and we initialize it using the mapbox dark style for the background (this will highlight the data):
Loading the data
After that we load the .geojson files into the map:
Styling the data
Thanks to the “data driven” stylization offered by the library, we can style each feature according to its properties. In this case, we apply a different style if it is “Female” or “Male”, and if it has Wikipedia link or not:
We also add the popups to the features, stylizing them according to the gender classification too:
And finally, here we have the map! This is the final result of our process:
The project has just been released, so there are still so many things to improve (especially the ones related with the data treatment). It is also true that as more cities are added, and the volume of the data increases, it will probably be a good idea to upload the datasets to Mapbox Studio and manage them directly from there.
In any case, all the tools and resources offered by Mapbox have been a great help to achieve the final result of the project, so, thanks guys! Keep going!
See you at the next Mapbox-#mapmadness!
PS: The project is still evolving so if you read this and you want to collaborate, or suggest a new city, contact us!