Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added dev place page experiment setup (datacommonsorg#4773)
Added experiment setup for dev place page * Moved the dev place landing page from `/dev-place/<dcid>` to `/place/<dcid>` * Enable the experiment for a select list of 5 US states and 24 countries. * Added optional URL parameter to force rendering the dev place page for any place page. Enable by setting `?force_dev_places=true` (e.g., http://localhost:8080/place/geoId/06?force_dev_places=true) * Added optional URL param to force rendering of the classic page page (for places in the experiment group). Enable by setting `?disable_dev_places=true` * TODO: Add a sample of world cities to experiment group To generate the experiment groups, I ran: ``` # >>> import random # >>> DEV_PLACE_ALL_COUNTRY_DCIDS = ["country/ABW","country/AFG","country/AGO","country/ALB","country/AND","country/ANT","country/ARE","country/ARG","country/ARM","country/ASM","country/ATF","country/ATG","country/AUS","country/AUT","country/AZE","country/BDI","country/BEL","country/BEN","country/BES","country/BFA","country/BGD","country/BGR","country/BHR","country/BHS","country/BIH","country/BLM","country/BLR","country/BLZ","country/BMU","country/BOL","country/BRA","country/BRB","country/BRN","country/BTN","country/BWA","country/CAF","country/CAN","country/CCK","country/CHE","country/CHL","country/CHN","country/CIV","country/CMR","country/COD","country/COG","country/COK","country/COL","country/COM","country/CPV","country/CRI","country/CUB","country/CUW","country/CXR","country/CYM","country/CYP","country/CZE","country/DEU","country/DJI","country/DMA","country/DNK","country/DOM","country/DZA","country/ECU","country/EGY","country/ERI","country/ESH","country/ESP","country/EST","country/ETH","country/FIN","country/FJI","country/FLK","country/FRA","country/FRO","country/FSM","country/FXX","country/GAB","country/GBR","country/GEO","country/GGY","country/GHA","country/GIB","country/GIN","country/GLP","country/GMB","country/GNB","country/GNQ","country/GRC","country/GRD","country/GRL","country/GTM","country/GUF","country/GUM","country/GUY","country/HKG","country/HMD","country/HND","country/HRV","country/HTI","country/HUN","country/IDN","country/IMN","country/IND","country/IRL","country/IRN","country/IRQ","country/ISL","country/ISR","country/ITA","country/JAM","country/JEY","country/JOR","country/JPN","country/KAZ","country/KEN","country/KGZ","country/KHM","country/KIR","country/KNA","country/KOR","country/KWT","country/LAO","country/LBN","country/LBR","country/LBY","country/LCA","country/LIE","country/LKA","country/LSO","country/LTU","country/LUX","country/LVA","country/MAC","country/MAF","country/MAR","country/MCO","country/MDA","country/MDG","country/MDV","country/MEX","country/MHL","country/MKD","country/MLI","country/MLT","country/MMR","country/MNE","country/MNG","country/MNP","country/MOZ","country/MRT","country/MSR","country/MTQ","country/MUS","country/MWI","country/MYS","country/MYT","country/NAM","country/NCL","country/NER","country/NFK","country/NGA","country/NIC","country/NIU","country/NLD","country/NOR","country/NPL","country/NRU","country/NZL","country/OMN","country/PAK","country/PAN","country/PCN","country/PER","country/PHL","country/PLW","country/PNG","country/POL","country/PRI","country/PRK","country/PRT","country/PRY","country/PSE","country/PYF","country/QAT","country/REU","country/ROU","country/RUS","country/RWA","country/SAU","country/SDN","country/SEN","country/SGP","country/SHN","country/SLB","country/SLE","country/SLV","country/SMR","country/SOM","country/SPM","country/SRB","country/SSD","country/STP","country/SUR","country/SVK","country/SVN","country/SWE","country/SWZ","country/SXM","country/SYC","country/SYR","country/TCA","country/TCD","country/TGO","country/THA","country/TJK","country/TKL","country/TKM","country/TLS","country/TON","country/TTO","country/TUN","country/TUR","country/TUV","country/TWN","country/TZA","country/UGA","country/UKR","country/UMI","country/URY","country/USA","country/UZB","country/VAT","country/VCT","country/VEN","country/VGB","country/VIR","country/VNM","country/VUT","country/WLF","country/WSM","country/XKS","country/YEM","country/YUG","country/ZAF","country/ZMB","country/ZWE"] # >>> DEV_PLACE_ALL_US_STATE_DCIDS = ["geoId/01","geoId/02","geoId/04","geoId/05","geoId/06","geoId/08","geoId/09","geoId/10","geoId/11","geoId/12","geoId/13","geoId/15","geoId/16","geoId/17","geoId/18","geoId/19","geoId/20","geoId/21","geoId/22","geoId/23","geoId/24","geoId/25","geoId/26","geoId/27","geoId/28","geoId/29","geoId/30","geoId/31","geoId/32","geoId/33","geoId/34","geoId/35","geoId/36","geoId/37","geoId/38","geoId/39","geoId/40","geoId/41","geoId/42","geoId/44","geoId/45","geoId/46","geoId/47","geoId/48","geoId/49","geoId/50","geoId/51","geoId/53","geoId/54","geoId/55","geoId/56","geoId/72"] # >>> DEV_PLACE_EXPERIMENT_COUNTRY_DCIDS = random.sample(DEV_PLACE_ALL_COUNTRY_DCIDS, int(len(DEV_PLACE_ALL_COUNTRY_DCIDS) * 0.1)) # >>> DEV_PLACE_EXPERIMENT_US_STATE_DCIDS = random.sample(DEV_PLACE_ALL_US_STATE_DCIDS, int(len(DEV_PLACE_ALL_US_STATE_DCIDS) * 0.1)) ```
- Loading branch information