Lanz1e / diversidade-uber-sjc

:oncoming_taxi: Reproduction of the racial study with Uber services originally made by from Jennifer Stark and Nick Diakopoulos. This one is adapted for the city of São José dos Campos, Brazil. :mortar_board:

Repository from Github https://github.comLanz1e/diversidade-uber-sjcRepository from Github https://github.comLanz1e/diversidade-uber-sjc

Análise do serviço de Uber em São José dos Campos 🎓

RESULTADO

Este trabalho teve como objetivo realizar uma análise quantitativa em cima dos tempos obtidos dos servidores do Uber – tempos médios para a chegada de um carro em uma rua – em conjunto com os dados do Censo 2010 – diversidade racial – para a cidade de São José dos Campos. Ao decorrer do desenvolvimento deste estudo foi desenvolvido scripts em Python para requisições, criação de objetos e automação de tarefas, técnicas de mapeamento com o Wikimapia visando obter os polígonos de cada setor e o Google Maps para pegar as coordenadas das ruas destes polígonos. 75,6% (289) dos setores da cidade (382) se mantiveram nos grupos ótimo, bom e regular com aproximadamente 30% a 40% de negros em sua população.

PARA QUEM DESEJA VISUALIZAR

Você tem duas escolhas, a primeira sendo a mais fácil e melhor para visualização e que eu recomendo FORTEMENTE, ou então a segunda, sendo mais complexa e menos intuitiva.

  • Baixe todos os polígonos na pasta KMLs (apenas os que estão nas pastas com prefixo "grupo", o restante, Zona Central, Zona Leste, etc. não são necessários) e jogue todos os arquivos dentro do Google Earth. Esse jeito vai facilitar sua vida 100x mais do que o método a baixo, e lhe proporcionará uma interface mais amigável para o manuseio e visualização dos polígonos.

  • Na pasta interface está armazenado arquivos que possibilitam a visualização do mapa com os setores classificados em cores. Basta baixar todos os arquivos da pasta, depois todos os polígonos na pasta KMLs (apenas os que estão nas pastas com prefixo "grupo", o restante, Zona Central, Zona Leste, etc. não são necessários) e então coloque todos no mesmo diretório. Após reunir todos os arquivos, você precisará emular um pequeno servidor para poder iniciar o mapa e os arquivos, para isso eu recomendo o uso da extensão Web Server for Chrome, ela possibilita hostear páginas web de um diretório local, e este é o jeito mais simples que encontrei de importar os arquivos .KML com o arquivo .HTML sem que desse erro.

PARA QUEM DESEJA REPRODUZIR

Neste repositório estão os arquivos necessários para quem desejar realizar o estudo em qualquer outra cidade. Para saber como utilizar os arquivos aqui listados, abra o arquivo TG_LUCAS MICHAEL SILVA DOS SANTOS.pdf e vá seguindo a partir do Capítulo 3 da documentação.

ENGLISH

This repository contains files that were used to reproduce the work originally made by from Jennifer Stark and Nick Diakopoulos: Uber seems to offer better service in areas with more white people. That raises some tough questions. This one is adapted for the city of São José dos Campos, Brazil. 🚖

Follow these steps if you also want to replicate:

  • If you want to make an interface with colored map polygons like the original work, you'll need to work with Wikimapia or some other mapping tool of your desire, I recommend you Wikimapia because there are a lot of cities that are already mapped, so you'll only need to download the polygons and color them based on your classification groups - which I'll explain a little further.

  • After you create/download the polygons from the city you're working on, you'll need to get at least 2 coordinates for each neighborhood that you download/made and create a .JSON Object that contains the ID, name and points (coordinates). See this file. Each coordinate will represent a street that you'll request the wait time from Uber's servers.

  • Now you'll head over to Uber Developer, get an API Key and put it in UberToken inside this file. Then, use the array of Neighborhoods inside this file and start this one. The average of all wait times collected from a neighborhood will be stored in a file called uber_map.csv inside the data folder. If the Array is too large, you'll have to request the Times in fractions of 80 coordinates (around that at maximum), or else the server will throw an Exception at your face 💣 💥

  • You'll use the wait time (Uber’s estimate for how long you will wait between requesting your car, and it's arrival) from Uber's server to create the classification groups, great, then good, regular, bad and the last one, terrible. The colors you choose for the groups, you'll also apply them on the polygons.

  • To make your work easier, I also recommend you to create a file like this and separate each neighborhood with the color of your choice. And to use Sublime Text 3, you can make a great use of its tools to automate your work, like Find in Folder, Replace in Folder, etc. Also, in this folder you can use the scripts to create a Neighborhood Object faster by inputting the street coordinate (it must be this exact format " -23.191134° -45.882679°". You get it by pressing Ctrl + Shift + C in Google Earth). And the other one is for downloading the polygons from Wikimapia, first you input the name of the Neighborhood and then the Object ID (which you can find in the URL when you click a Neighborhood in Wikimapia).

  • After everything is done, I recommend you to color the KML files and import them into Google Earth to get the awesome view of your colored polygons. 🚩 yay!

PS If you have any doubt, open the file TG_LUCAS MICHAEL SILVA DOS SANTOS.pdf, look for "3 DESENVOLVIMENTO DO TRABALHO" and follow every step in the document, it is in Portuguese, but it has a lot of images, and you can translate the texts on Google Translate.

About

:oncoming_taxi: Reproduction of the racial study with Uber services originally made by from Jennifer Stark and Nick Diakopoulos. This one is adapted for the city of São José dos Campos, Brazil. :mortar_board:


Languages

Language:Python 100.0%