Skip to content

Instantly share code, notes, and snippets.

@michellemho
Last active January 12, 2017 09:30
Show Gist options
  • Save michellemho/3b864e854822dc1c5cf2c8800bf853a1 to your computer and use it in GitHub Desktop.
Save michellemho/3b864e854822dc1c5cf2c8800bf853a1 to your computer and use it in GitHub Desktop.

Map Draft

https://team.carto.com/u/michellemho-carto/builder/6b34e79e-d8a0-11e6-a9de-0e233c30368f/embed

Unfortunately, it looks like the .carto file is too big for upload to github... ~37 MB.

#Literature/News Review:

I just did some quick googling to see what people have said about cars in Paris... didn't fully read any of these, but in case you're interested in becoming more of an expert on car ownership in France!

###Paris Car Ban http://www.independent.co.uk/news/world/europe/paris-car-ban-anne-hidalgo-air-pollution-a7115791.html

###Longitudinal analysis of car ownership and car travel demand in the Paris region using a pseudo-panel data approach

http://ac.els-cdn.com/S2352146516300072/1-s2.0-S2352146516300072-main.pdf?_tid=6ddebf1a-d887-11e6-9c2a-00000aab0f6b&acdnat=1484198865_1da4982710e86544794cddcb02be43c6

This study found an elasticity of income on car ownership of 0.47. "The influence of income on car ownership is decreasing with regards to a rise in income and is even not significant for high income households. Moreover, the income is not a determinant of car ownership in the most urbanised area while it is in car dependent area."

###France Falls Out of Love with the Car

https://www.theguardian.com/world/2014/nov/09/france-car-ownership-sales-downturn

What happened to the var_codes for France in the DO?

SQL code (for my own reference)

SELECT C.*, D.dec_med12 FROM (SELECT A.P12_MEN, A.p12_rp_voi, A.p12_rp_v_1, A.p12_rp_v_2, B.cartodb_id, B.name, B.the_geom, B.the_geom_webmercator FROM "michellemho-carto".france_obs_table A JOIN
"michellemho-carto".france_vars B
ON iris=name) as C LEFT JOIN fr_income as D
on iris=name

Normalize

ALTER TABLE "michellemho-carto".france_obs_table_copy
ADD COLUMN car_ownership_rate numeric;

UPDATE france_obs_table_copy
SET car_ownership_rate = p12_rp_voi/p12_men

I think I found a bug while searching for French car ownership in the Data Observatory. Using lab-do and the DO catalog to search for the variables, I expected "P12_RP_VOIT1P" to be the var_code for households with at least one car. However, I could not find that variable in the expected obs_table (http://observatory.cartodb.com/tables/obs_afb658e9dfea096bdc3c4419839aebce9eb1335e). I did, however, find the var_code "p12_rp_voi", but I'm not sure where that came from because it's nowhere in bigmetadata... A search for "p12_rp_voi" yields nothing, but "p12_rp_voit1p" exists (https://github.com/CartoDB/bigmetadata/search?utf8=%E2%9C%93&q=P12_RP_VOIT1&type=Code). Are the var_codes being truncated for some reason?

And where did France commune-level income data go?

Do you remember what happened to the income variables? It looks like there's IRIS-level income information, but no commune-level, even though there is code written for it in the frenchincome branch in fr_commune_income.py...

Overpass Query for Paris Metro

http://overpass-api.de/api/convert?data=%2F*%0AThis%20has%20been%20generated%20by%20the%20overpass-turbo%20wizard.%0AThe%20original%20search%20was%3A%0A%E2%80%9Csubway%E2%80%9D%0A*%2F%0A%5Bout%3Ajson%5D%5Btimeout%3A25%5D%3B%0A%2F%2F%20gather%20results%0A(%0A%20%20%2F%2F%20query%20part%20for%3A%20%E2%80%9Csubway%E2%80%9D%0A%20%20way%5B%22railway%22%3D%22subway%22%5D(48.707728534760676%2C2.1148681640624996%2C48.99598755069451%2C2.5975799560546875)%3B%0A)%3B%0A%2F%2F%20print%20results%0Aout%20body%3B%0A%3E%3B%0Aout%20skel%20qt%3B&target=mapql

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment