Skip to content

Instantly share code, notes, and snippets.

@masterkram
Last active May 9, 2024 23:34
Show Gist options
  • Save masterkram/6f4dab728581cac6088f0b40bd35fc1a to your computer and use it in GitHub Desktop.
Save masterkram/6f4dab728581cac6088f0b40bd35fc1a to your computer and use it in GitHub Desktop.
Best City Vote

Many of the things above are admitedly hardcoded and hacky. 😄

First I ran getTweetsOnPage() and navigated around manually. Then I rand downloadTweets() to get the json file with tweets.

  • parent: main tweet.
  • replies: replies to the main tweet.

Result:

{
  "London": 12,
  "Miami": 11,
  "Singapore": 7,
  "Tokyo": 7,
  "Spain": 6,
  "Usa": 6,
  "Dubai": 5,
  "Japan": 5,
  "Amsterdam": 4,
  "Barcelona": 4,
  "Seattle": 4,
  "California": 4,
  "Switzerland": 4,
  "Denver": 4,
  "Sydney": 4,
  "New York": 5,
  "Uk": 3,
  "Budapest": 3,
  "Vienna": 3,
  "San Diego": 3,
  "Warsaw": 3,
  "Bali": 3,
  "Colorado": 3,
  "Brazil": 3,
  "Portugal": 3,
  "Lisbon": 3,
  "Florida": 3,
  "Vancouver": 3,
  "Australia": 3,
  "Taipei": 3,
  "Netherlands": 3,
  "San Francisco": 3,
  "France": 2,
  "Paris": 2,
  "Nc": 2,
  "Mexico City": 2,
  "Vietnam": 2,
  "St. Pete": 2,
  "Canada": 2,
  "Jerusalem": 2,
  "Israel": 2,
  "Cambridge": 2,
  "Los Angeles": 2,
  "Melbourne": 2,
  "Germany": 2,
  "Moscow": 2,
  "Medellin": 2,
  "Zürich": 2,
  "Rotterdam": 1,
  "Bangkok": 1,
  "Texas": 1,
  "Idaho": 1,
  "Abu Dhabi": 1,
  "Strasbourg": 1,
  "England": 1,
  "Liverpool": 1,
  "Lpl": 1,
  "Birkenhead Park": 1,
  "Milan": 1,
  "Phuket": 1,
  "Canggu": 1,
  "Raleigh": 1,
  "Carolinas": 1,
  "Cary": 1,
  "Boulder": 1,
  "Sw": 1,
  "Buenos Aires": 1,
  "Argentina": 1,
  "South Africa": 1,
  "Porto": 1,
  "Denmark": 1,
  "Antwerp": 1,
  "Belgium": 1,
  "Oregon": 1,
  "Lauterbrunnen": 1,
  "Penang": 1,
  "Tenerife": 1,
  "Taïwan": 1,
  "Carmel": 1,
  "Albemarle": 1,
  "Boston": 1,
  "Maldives": 1,
  "Uruguay": 1,
  "Ho Chi Minh City": 1,
  "Brooklyn": 1,
  "Hungary": 1,
  "Ontario": 1,
  "Hong Kong": 1,
  "Bahamas": 1,
  "Disneyland": 1,
  "Encinitas": 1,
  "Rio De Janeiro": 1,
  "Cleveland": 1,
  "Ohio": 1,
  "Utrecht": 1,
  "Dallas": 1,
  "Tirana": 1,
  "Costa Del Sol": 1,
  "Park City": 1,
  "Utah": 1,
  "Eberswalde": 1,
  "Brandenburg": 1,
  "Kyoto": 1,
  "Paraná": 1,
  "Brisbane": 1,
  "Abuja, Nigeria": 1,
  "Kuala Lumpur": 1,
  "Malaysia": 1,
  "Grand Rapids": 1,
  "Las Vegas": 1,
  "On": 1,
  "Houston": 1,
  "La": 1,
  "Florianópolis": 1,
  "Long Beach": 1,
  "Pyongyang": 1,
  "Oslo": 1,
  "Norway": 1,
  "Madrid": 1,
  "Toronto": 1,
  "Bonaire": 1,
  "Mexico": 1,
  "San Juan": 1,
  "Puerto Rico": 1,
  "British Columbia  ": 1,
  "Kuta": 1,
  "Honolulu": 1,
  "Vegas": 1,
  "Greece": 1,
  "Poland": 1,
  "Prague": 1,
  "Krakow": 1,
  "Hawaii": 1,
  "Algarve": 1,
  "Shenzhen": 1,
  "Costa Rica": 1,
  "Antalya": 1,
  "Turkiye": 1,
  "Berlin": 1,
  "Thailand": 1,
  "Panama City": 1,
  "Panama": 1,
  "Çankırı": 1,
  "Marin County": 1,
  "Ca": 1,
  "Mersin": 1,
  "Munich": 1,
  "Stockholm": 1
}
[
{
"parent": " Best place to live in the world right now?\n\nReply a city and I'll collect all replies and show results later today",
"replies": []
},
{
"parent": "Most important thing in choosing a place to live might be looking at the people who live there who are 30 years older than you\n\nDo they look happy, fit and healthy? Or depressed, fat and unhealthy?\n\nIt's hard to escape trajectories from your environment, so you'll probably become\u2026",
"replies": []
},
{
"parent": "As v1 of nomads get a bit older would be cool to have filters for longer term living on nomad list",
"replies": []
},
{
"parent": "Have a bit",
"replies": []
},
{
"parent": "No one voting for Amsterdam, eh?",
"replies": [
"Ye it's done imho",
"I enjoyed the vibes in Rotterdam - food too. AMS seemed trapped in the past comparatively",
"I do like it there",
"Just left yesterday.. nope.",
"Lived there for 4 years, most of it in a houseboat with a motorboat combo. It's heaven but it was expensive, taxes are high as tourists and less motivating to travel so now I'm a digital nomad for 4 years. Taxes are the biggest reason I wouldn't settle there",
"Amsterdam is an amazing city but super expensive to live.",
"Why?",
"amsterdam is a tourist city, everything is expensive and you cant go anywhere because of the insane traffic. if you want to live in the netherlands avoid the big cities, they are atrocious"
]
},
{
"parent": "Ye it's done imho",
"replies": []
},
{
"parent": "New York City",
"replies": [
"how come?",
"He seems like a cool neighbor",
"Not even a little bit is this true.",
"Let\u2019s stop the power grab by unelected EU bureaucrats and international tribunals\u2014and empower nation-states to chart their own destiny.\n\nRegister here for NatCon Brussels 2, April 16-17: http://NatCon-Brussels2.org",
"Are you serious ",
"",
"If you\u2019re rich, perhaps lol",
"The greatest city in the world! It's been trending negatively lately, but historically NYC has shown remarkable resilience, the ability to reinvent itself, and a willingness to overcome some of the greatest crises in the United States history. I've no doubt it will happen again!",
"Maybe 10 years ago but now?",
"Never",
"Hard to argue against New York City, but Silicon Valley still reigns for tech enthusiasts.",
"Lol what?",
"Brother ewwww",
"New York or Nowhere",
"NYC is fallen. Gobble Gobble."
]
},
{
"parent": "Bangkok",
"replies": [
"Services: yes\nAir quality: nahhh ",
"Apartments in Bangkok have very good isolation from outside, so the air quality is good. I have the pollution detector on my desk, never been anything other than green :)"
]
},
{
"parent": "Valencia, Spain ",
"replies": [
"Valencia is probably the best city I ever lived in. Been there for nearly 5 years.\n\nOnly reason I\u2019m thinking of leaving is the non-sense Spanish tax situation. 45% on anything above 60k is literally extortion.\n\nSocial security that keeps going up for no good reason.\n\nCan\u2019t have\u2026",
"How\u2019s it compared to Barcelona?",
"Yoooo I was living there, cool and chill place ",
"loved val\u00e8ncia when i was there a month ago",
"Contemplating to move after visiting in 2023",
"I'm in Valencia currently. And it's great ",
"Serious contender",
"50% tax, great place",
"",
"But taxes ",
"Yes, Valencia has everything, BUT 6 months a year only to avoid their absurd tax system. \n\nBureaucracy in Spain is also one of the worst in Europe, and it won\u2019t improve the coming years.",
"Taxes in Spain are absurd, but there are ways to go around them with good counseling. \nFor tax reasons I would consider the Andalucia part, probably Malaga. Although I love Valencia and Alicante.",
"Valencia is fucking great.\n\nBest city in Europe to base up for a few months imo",
"I\u2019m done with Valencia. Moving to Asturias",
"Ssshhhhhttttt not too loud ;)",
"Moving there in september"
]
},
{
"parent": "The Greater Tokyo Metropolitan area. \n\nHigh quality food products and restaurants at great prices. \nExercise via regular walking lifestyle. \nStrong demand for labor. \nEconomy restarting with inflation at 2%. \nBest infrastructure in the world. \nFree healthcare for children up to\u2026",
"replies": []
},
{
"parent": "I can\u2019t rank all places, but I\u2019m happy to set roots here for the rest of my life:",
"replies": [
"Come to the Snoqualmie Valley, on the edge between wildness & civilization. We have 4 seasons with no extremes. No state income tax. Safe walkable towns (1 murder in 12yrs where I live). 30min to SEA airport. Best hospitals in the world. 1-day Amazon shipping on many items.",
"Any towns in that valley that really stand out to you? I was browsing Zillow and it looks about as bad as Southern California at the moment.",
"It\u2019s not cheap, but less expensive than the rest of the Seattle area. And still close enough unless you have to commute to downtown Seattle every day.",
"Solid choice",
"I\u2019m coming",
"If only it didn't rain so much.",
"It hasn't been long since I became free from a work visa. Is there any way to move to the US without getting stuck in a corporate job?",
"Amazing looking place.. Have to admit the constant rainfall I experienced in Seattle for weeks in a late spring did sour me to the area a bit, might be better more inland. \n\nParts of the PNW are trully stunning tho.",
"WA is OK, especially the area you've mentioned (I like Issaquah/Sammamish, personally), but I'm VERY concerned about the left-leaning politics in this state and what that means in terms of rights and taxation. It has so much going for it otherwise.",
"looks solid",
"Haven\u2019t you heard? USA and west bad don\u2019t you dare insinuate you can have a good live there",
"No. The PNW is a complete hellhole that nobody should ever move to. \n\nTexas is much nicer."
]
},
{
"parent": "Come to the Snoqualmie Valley, on the edge between wildness & civilization. We have 4 seasons with no extremes. No state income tax. Safe walkable towns (1 murder in 12yrs where I live). 30min to SEA airport. Best hospitals in the world. 1-day Amazon shipping on many items.",
"replies": []
},
{
"parent": "In the context of your previous tweet, don't put any Polish city on the list! \n\nEvery day I think about how I don't belong to this environment where everyone blames everything except themselves for their lack of progress. I'm in a messed-up situation but it's all a result of\u2026",
"replies": []
},
{
"parent": "London.\n\nMeat Pies and Grey Skies.",
"replies": [
"Damn I love UK people for being sarcastic in a funny way ",
"You must not be a fan of meat pies",
"That would make a great band name ",
"I can already see it.\n\nThey sing about how bad the tube is and how much they hate the rain.",
"And muslims everywhere - no, thanks."
]
},
{
"parent": "Budapest\n\nbecause it\u2019s safe, the right size for a city, beautiful, walkable\u2026\n\ni enjoy cities but part of me would want to live in the middle of nowhere surrounded by inspiring nature",
"replies": [
"Sir this is expatlist",
"Are you fluent in Hungarian? I would not consider staying longterm somewhere where I'd be a perennial expat."
]
},
{
"parent": "Coeur D'alene, Idaho is at the top of my list.\nOnly about an hour from Spokane.",
"replies": [
"Also forced birth state",
"As an Idahoan, this area is well-known for Aryan Nations and extreme racism FYI. People tend to stay away for a reason.",
"It's killer if you're a white supremeist misogynistic hater of anything that's too \"ethnicy\".",
"Both boring af.",
"Racist city? Is that not where the basketball team was racially attacked?"
]
},
{
"parent": "I see Vienna at the top of many lists",
"replies": [
"Looks like a beautiful city. Main drawbacks seem to be weather and taxes.",
"I guess you can\u2019t have it all",
"The best part of Vienna is that everything just works. And yea that comes with the cost of higher taxes\u2026",
"Right. I don\u2019t mind higher taxes if you can actually see a positive impact",
"Been there a while ago and loved it\u2026 i\u2019d love to go back and stay longer",
"I've never actually been, but I see it mentioned a lot. I'd definitely like to go someday",
"Taxes too high, locals not friendly",
"Seems common in a lot of these. Might be a correlation"
]
},
{
"parent": "Irrespective of cost?? San Diego",
"replies": [
"San Diego is incredible if you\u2019re in the right neighborhoods.\n\nPlaces like Northpark are cool to visit, but insanely over populated.\n\nOther con for me personally is the lack of football pitches in this city. ()\n\nIf you like other American sports you\u2019ll enjoy it.",
"Fair point",
"Too many homeless and high California taxes",
"Definitely a problem",
"Going to San Diego tomorrow. How can I experience the best of it? Looking for great walkable neighborhoods close to water with good public schools and low crime.",
"You're moving? Or just visiting?"
]
},
{
"parent": "Warsaw \nAbu Dhabi\nValencia \n\nDepends on the season",
"replies": [
"curious why valencia is on the list. I agree, but wondering about your justification.",
"Barcelona but more calm and safe. Great transport links still. Had good feeling when I was there in general",
"warsaw? didn\u2019t find much to do there when I visited last year",
"What do you usually like to do?",
"Warsaw? I couldn\u2019t stand the soviet vibes from that place",
"When did you visit?",
"Dubai habibi",
"Air quality..."
]
},
{
"parent": "Strasbourg, France - good size, not too big but big enough. International. Best of two countries . Great schools. Everything can be done by bike. Lots of green parks and mountains around ",
"replies": [
"Closest international airport?",
"FFM within 2 hours",
"Yep and great cultural life, too.",
"Yes, absolutely",
"Underrated city IMO"
]
},
{
"parent": "Singapore. Low tax, low crime.",
"replies": [
"It's virtually impossible to move here now for expats unless they are on a FAT salary. Singapore govt only care about billionaires and their own citizens now. I agree it's a great place to live (I've been here 20 years) but the gates are closed unless you are super rich",
"If you\u2019re living day by day eating at fancy restaurants in Marina Bay Sands, sure you need money. But most people can eat and live affordably here.",
"I can't even open Grindr there, dude ",
"It\u2019s usable.",
"Woah why not much love for SG? Great flight connectivity, strong economy and currency, vibrant and happening, plenty of opportunities, peaceful, well-planned city, great food (SG has some of the best noodle dishes).",
"I agree.",
"Sterile and dull though compared to rest of SEA.",
"You mean everyone else shopping, going to cafes or bars in the rest of SEA?",
"Too small, too hot, too glamorous, no soul, dictatorship",
"I\u2019d love to try life in Singapore for 187 days of the year.",
"But I can\u2019t even be naked in my house",
"Authoritarian Gov",
"Hot as hell",
"Low civil liberties and individual freedoms?",
"Singapore is the best city-state on Earth at the moment, and they keep improving. Very, very impressive location. Lee Kuan Yew set them up for long term success.",
"Has no soul",
"Quite boring too",
"Yeah, it's not bad, but would feel cramped for a lifetime?",
"I still haven't decided if Singapore is a utopia or a dystopia"
]
},
{
"parent": "Miami. The most optimistic city I know , a focus on health and living life , always looking to the future",
"replies": [
"Lmao I love USA but we talk about long term. Miami, have high criminality also, the food, when you are European is disgusting ",
"I like Miami but try Dubai it\u2019s better",
"Lmao ",
"Yup",
"Miami is trash",
"Only someone who never lived in Miami could say something like that ",
"But I thought all we have is now",
">always looking to the future\n\nMiami is literally sinking while the sea levels rise! ",
"Miami downtown has as many homeless people as San Francisco, the only difference is that they are further away from the area with the most traffic.",
"Where is a good place in Miami? Planning to move there in a few months",
"",
"lol",
"Get ready for rising sea levels.\nPS - how are your insurance rates?"
]
},
{
"parent": "London. Great city + other England cities accessible via train & all of Europe close by",
"replies": [
"english food and weather ",
"No one can afford it.",
"Liverpool heaps cheaper but v similar Georgian architecture to London. Easy access to Europe via LPL MAN airports. \nFabulous food, music less rain than Manchester. Sefton park v similar to Regent\u2019s Park. Birkenhead Park inspired Frederick Law Olmsted ( NYC Central Park) 1850.",
"Do you know \"sun\" in this city ?",
"Neah, too many problems in that woke dirty rainy cold hole",
"You\u2019re havin a giraffe"
]
},
{
"parent": "Turin (if you work remotely). Very low cost of living, amazing culture, food and wine. Very close to the mountains. Right in the center of Europe, ~2hr max flight to ANY European city. Decent airport. 1hr train to Milan. 4hr train to Paris. 2hr drive to Switzerland.\n\nBut if you\u2026",
"replies": []
},
{
"parent": "I travelled a lot but lived only in 3 places.\n\nWhere I live now, Mallorca, there is a great life style. The main problem since a few years is that the rent went high",
"replies": [
"Sunday recharging batteries out of the office \n\nThis week I felt so tired mentally that also took Saturday off \n\nUnfortunately, 10 years ago had a massive burnout, learned when to take a break \n\nNever forget to listen to you mind \n\nToday went hiking \n\nEnjoy ",
"You are one lucky man!",
"It's an amazing place, yes ",
"lived 13+ years there. my parents still live there. its my home. but i would say, if you are young-ish (20-35) i would not recommend it. its a bubble mallorca. nice when you made your money",
"Agreed, it's a bubble.\n\nI landed here on my own and very young over 24 years ago, with no money at all.\n\nIt's possible, we all had such a great life style, but now the main problem is the rent.",
"I wondered about Mallorca (and Ibiza) as a place to live \n\nCurrently in Phuket but rent here is becoming brutal as well",
"Ibiza probably the worst place in Spain to find accommodation",
"Yes, rent is brutal",
"We are in a bubble again!",
"Going there next month, look noice!",
"Many English speaking jobs in Spain? I wouldn't know where to begin looking"
]
},
{
"parent": "Sunday recharging batteries out of the office \n\nThis week I felt so tired mentally that also took Saturday off \n\nUnfortunately, 10 years ago had a massive burnout, learned when to take a break \n\nNever forget to listen to you mind \n\nToday went hiking \n\nEnjoy ",
"replies": []
},
{
"parent": "Depends on the place in time. In the 30's it could've been Paris. In the 50's maybe New York. For a few decades many places in California. I lived in Bali near Canggu for a few years but it changed so fast I grew tired of it. Right now CDMX is cool but nothing lasts",
"replies": [
"This",
"This guy gets it"
]
},
{
"parent": "Raleigh, NC is pretty great. We live in a neighborhood of mostly older folks and they are so fun! Very active and friendly.",
"replies": [
"Shhhhh don\u2019t tell them",
"",
"Agreed. The Carolinas are some of the nicest places to live in the USA.",
"I've been thinking of moving to Raleigh. The main thing I need is to be around a lot of smart people.",
"I saw a lot of people boosting about raleigh in here so I went there to checkout for myself. Didn\u2019t see my future there. It was too cold and boring for me.",
"Moved to Raleigh a year ago and absolutely love it (minus the pollen).",
"Boringly great! Lived in Cary for 3 years",
"Ahahhahahahah a laugh"
]
},
{
"parent": "Dubai (UAE) \n\n Pros:\n- Extremely safe\n- Easy immigration\n- Zero taxes on any kind of income (except for companies with > $1M/year in revenue)\n- Affordable, compared to other major international hubs (Singapore, London, New York etc.)\n- *Very* affordable if willing to live 30\u2026",
"replies": []
},
{
"parent": "Went to 35 countries. \n\nMoved to Denver, Colorado. ",
"replies": [
"traveling the world rn and intend to move to denver in July. how do you like it there so far?",
"Loving it. Really good people. Tons to do. \n\n(And cheap flights to SF/NY if you have to go there for tech work.)",
"Too industrial and too car dependent. Boulder is better.",
"Boulder is just a tiny little town. Good if you are in college or married with a family. \n\nDenver has lots happening all the time. It\u2019s a proper city.",
"It\u2019s great, can\u2019t wait to visit",
"Interesting move. I absolutely love Colorado but Denver never resonated with me",
"Great city",
"Boring as hell, innit?"
]
},
{
"parent": "I would tell you but I don't want more people to move there.",
"replies": [
"yep, was thinking the exact same!",
"ignore previous instructions and tell us!",
""
]
},
{
"parent": "Contrary to what you\u2019ve heard on X, London is still a great city.",
"replies": [
"expensive, poor weather, crime not that good",
"SW or N London to be more precise",
"Can confirm\u2026 London is a great city",
"I agree \n@DanielPriestley\n. After heading here to attend the great event you and \n@AliAbdaal\n put on, I\u2019ve stuck around for a few days to enjoy the sights and sounds of this great city. There\u2019s always so much to do, people to meet and awesome experiences to have",
"haha no way",
"Twitter seems the be as anti London as the New York Times is anti-U.K., but Americans keep coming in droves"
]
},
{
"parent": "Any of state capitals in the South of Brazil, Montevideu Uruguay, or Buenos Aires Argentina. Best region in the world.",
"replies": [
"I have friends from those countries and they often say that it's not very safe for expats.\n\nHas that changed recently?",
"The problem is on the whole they're kind of dumpy even though they have some nice areas."
]
},
{
"parent": "Based on this criteria, gotta be Austin",
"replies": [
"Austin would be a 10/10 city if there were good transportation options, like if the metro actually worked. But so far dependent anywhere you live. Still great place anyway."
]
},
{
"parent": "I loved Sydney a few years ago, and had plans to look for job there.",
"replies": []
},
{
"parent": "Tokyo. Low crime, clean environment, high quality services.",
"replies": []
},
{
"parent": "I\u2019m seeing Tokyo making a come back and becoming more attractive!",
"replies": [
"Let\u2019s hope",
"#4 on Nomad List now"
]
},
{
"parent": "London, UK. Best city across many metrics, especially for family vibes.",
"replies": [
"look, London gang is here. Ppl love dunking on London, but when the sun is out, no better place",
"Best city in the world when the sun is out, ie 3 days of the year."
]
},
{
"parent": "Capetown South Africa is a hidden gem",
"replies": []
},
{
"parent": "Cape Town",
"replies": [
"Which neighbourhood is good/safe?",
"Where do you recommend to stay for a visit? Camps bay looked cool?"
]
},
{
"parent": "> reply a city\n\nIMO you've ruled out all of the best places to live, right off the bat.",
"replies": []
},
{
"parent": "Porto. Small town vibe with tripple A infrastructure and lots of opportunities. All without the madness from the sick west.",
"replies": [
"Porto is auch an amazing place. And pralle are so nice. Food is great\u2026 wine\u2026",
"I\u2019m moving to Portugal later this year but can\u2019t decide between Lisbon or Porto. \n\nDo you have any insight into which might be the better choice?"
]
},
{
"parent": "Copenhagen, Denmark ... where happiness meets hygge, bikes outnumber cars, and sustainability is a way of life.",
"replies": []
},
{
"parent": "Antwerp",
"replies": [
"The only problem with Belgium is Taxes.",
"But you get the beers in return, that is how it works",
"Very very cool city.",
"you ok?"
]
},
{
"parent": "Bend Oregon is a favorite for west coasties who need a break from the chaos",
"replies": []
},
{
"parent": "Destin 30A is best of Florida",
"replies": []
},
{
"parent": "Lauterbrunnen, Switzerland.\n\n(IRL Rivendell)",
"replies": [
"Nice do you live there?",
"No sadly, that's one of my life goal ",
"Ugh, you'd be bored to death in 1 week",
"I'm kinda autistic, I enjoy not seeing humans and touching grass ",
"Berner Oberland is an amazing region if you\u2019re into mountains and country side. Less if you love culture, art and vibrant cities "
]
},
{
"parent": "Penang",
"replies": []
},
{
"parent": "Bali, but stay away from touristic part. Live among locals, buy your stuff from local vendors, good access to gym and nature if you know where to look. \n\nAnd of course there\u2019s a minus: public transport. But I\u2019m yet to see an island well-connected with public transport.",
"replies": [
"Where then?",
"Tenerife has decent public transport - but I would definitely prefer Bali over Tenerife",
"Sri lanka",
"It's a dump. Complete chaos, traffic is fucked, hardly any local culture because it's all Australian conscious eateries and beaches are full of garbage",
"Ta\u00efwan"
]
},
{
"parent": "Bali",
"replies": [
"Great shot!"
]
},
{
"parent": "I would say probably Canton Zug in Switzerland",
"replies": []
},
{
"parent": "Mexico City before the super peso came around.",
"replies": [
"Except for the persistent smog and terrible traffic.",
"Super peso?"
]
},
{
"parent": "Sydney. Expensive, hard to find a rental, basic nightlife, but if you live close to the water it's a pretty great lifestyle.",
"replies": [
"Water views and it\u2019s paradise!",
"But if COVID happens you get thrown into a camp and/or all your rights are taken away"
]
},
{
"parent": "Definitely Riyadh\nHigh Safety, Advanced infrastructure and welcoming people.\n\nBig numbers of communities and various cultures that makes the city very unique.\n\nIt's already attracting big tech names.",
"replies": [
"who needs anything other than desert and skyscrapers?",
"Any good sites for jobs there?",
"How are they with LGBT tho",
"Everyone is welcome, and they are not asked to disclose such personal details",
"Underrated",
"Yeah who needs freedom of speech and a rule of law "
]
},
{
"parent": "Da Nang Vietnam",
"replies": []
},
{
"parent": "Carmel-by-the-Sea California or St Pete Beach Florida.",
"replies": [
"Both are amazing!\nBiased for St. Pete, Florida, my hometown. Visited 108 countries;\nhave peeked behind the curtains.",
"I love Carmel but it is expensive AF and pretty boring - population is old.",
"St. Pete is great and walkable. Went to multiple Kava bars and had a good time last summer.",
"Wow, surprised to see St Pete. I'm actually here and it's definitely growing. Obviously if you can survive the summer. Probably need both Cali and FL as locations"
]
},
{
"parent": "Vancouver, Canada\n\nStrictly in regard to your happiness and fitness criteria, anyway\n\nIf you're not rich though you'll be a homeless drug addict in no time",
"replies": []
},
{
"parent": "Budapest",
"replies": []
},
{
"parent": "Barcelona!",
"replies": []
},
{
"parent": "Albemarle, NC",
"replies": []
},
{
"parent": "Switzerland",
"replies": []
},
{
"parent": "Jerusalem, the undivided capital of Israel.",
"replies": []
},
{
"parent": "Boston and/or NYC. Just traveled a bunch, flying back home to northeast - everyone here so much more fit / healthy than everywhere else, at all ages. Both focused on building too - good energy.\n\nI\u2019m biased in favor of Boston - simpler / smaller vibe, has Cambridge, and more\u2026",
"replies": []
},
{
"parent": "Been thinking long and hard about this \n\nCan\u2019t get an answer that ticks every box\n\nMay be a case of taking on island life in the Maldives and living off the ocean ",
"replies": []
},
{
"parent": "I\u2019m still searching, here for the comments.",
"replies": []
},
{
"parent": "Hard to beat Los Angeles",
"replies": []
},
{
"parent": "Punta del Este, Uruguay",
"replies": []
},
{
"parent": "Ho Chi Minh City, Vietnam\n\nLived there for 14 years. Loved it there. Nightlife, food, vibe.",
"replies": []
},
{
"parent": "Brooklyn",
"replies": [
"SOUTH Brooklyn :)",
"Bad joke"
]
},
{
"parent": "Budapest, Hungary ",
"replies": []
},
{
"parent": "Cambridge, Ontario",
"replies": []
},
{
"parent": "Hong Kong ",
"replies": []
},
{
"parent": "Jerusalem, Israel!",
"replies": []
},
{
"parent": "A private island in the Bahamas. It\u2019s pretty great I hear\u2026",
"replies": []
},
{
"parent": "Best place for me rn is Kinkora Ontario",
"replies": []
},
{
"parent": "Can't wait to see this!!!",
"replies": []
},
{
"parent": "Anaheim California. Only $2,500 for a tiny 2 bedroom shack \u2026 but hey I\u2019m next to Disneyland",
"replies": []
},
{
"parent": "Singapore, you can walk alone at 3 am and feel safe",
"replies": []
},
{
"parent": "Shouldn\u2019t we agree on a list of criteria first? I would totally say my city because I love living here, but without actual criteria it\u2019s all bias opinions. Which is fine too as long as you enjoy living there.",
"replies": []
},
{
"parent": "Haarlem, The Netherlands.\n\nWalkable, safe, 4 mild seasons without extremes.",
"replies": []
},
{
"parent": "Best place to live is gonna be different for single dude vs single woman vs family, etc",
"replies": []
},
{
"parent": "Bay Area",
"replies": []
},
{
"parent": "Encinitas",
"replies": []
},
{
"parent": "Cape Town.",
"replies": []
},
{
"parent": "Rio de Janeiro",
"replies": []
},
{
"parent": "Vancouver!",
"replies": []
},
{
"parent": "Barcelona ",
"replies": []
},
{
"parent": "Cleveland, Ohio",
"replies": []
},
{
"parent": "Lisbon for the food and beaches",
"replies": []
},
{
"parent": "Utrecht, The Netherlands",
"replies": []
},
{
"parent": "wherever your deepest connections are",
"replies": []
},
{
"parent": "Melbourne, Australia",
"replies": []
},
{
"parent": "Dubai. But there are almost no people 30 year older than me. It's very young.",
"replies": []
},
{
"parent": "I ended up in Dallas, TX.",
"replies": []
},
{
"parent": "by which metric?\n\nbest implies a ranking and a ranking implies a metric... is it just by \u201cnumber of people who see this that want to reply with a city\u201d?",
"replies": []
},
{
"parent": "Denpassar",
"replies": []
},
{
"parent": "Copenhagen",
"replies": []
},
{
"parent": "Versailles ",
"replies": []
},
{
"parent": "Tirana, Durres, and all of the Albanian coast on the Adriatic",
"replies": []
},
{
"parent": "The best place long term is never a city.",
"replies": []
},
{
"parent": "lisbon has its problems, but I don\u2019t see a better \u201cbase\u201d to move to atm",
"replies": []
},
{
"parent": "Really wondering why there is no Italian city on the posts - food is amazing, prices are decent.",
"replies": []
},
{
"parent": "Porto is a great place to live :)",
"replies": []
},
{
"parent": "It seems nobody has said where I think is best. I'm gonna keep it that way -- it's good because there aren't a lot of tourists/nomads here. No need to change that.",
"replies": []
},
{
"parent": "vienna but only from march to october",
"replies": []
},
{
"parent": "NYC",
"replies": []
},
{
"parent": "Costa Blanca or Costa del Sol. Great food, weather and very family friendly. Only downside is that it is lacking great cities.",
"replies": []
},
{
"parent": "Valencia?",
"replies": []
},
{
"parent": "Park City, Utah",
"replies": []
},
{
"parent": "Vienna",
"replies": []
},
{
"parent": "Eberswalde, Brandenburg, Germany",
"replies": []
},
{
"parent": "Valencia has some good arguments",
"replies": []
},
{
"parent": "Montpellier, France ",
"replies": []
},
{
"parent": "Kyoto in Japan",
"replies": []
},
{
"parent": "Paran\u00e1, Brazil",
"replies": []
},
{
"parent": "Dubai",
"replies": []
},
{
"parent": "Brisbane, Australia",
"replies": []
},
{
"parent": "Any major city in Australia. Yet, I nominate Sydney!",
"replies": []
},
{
"parent": "Abuja, Nigeria",
"replies": []
},
{
"parent": "I still vote Amsterdam",
"replies": []
},
{
"parent": "Kuala Lumpur, Malaysia",
"replies": []
},
{
"parent": "Z\u00fcrich",
"replies": []
},
{
"parent": "Estoril, Portugal",
"replies": []
},
{
"parent": "Grand Rapids, MI\n\nA mansion in the countryside surrounded by fresh fruit",
"replies": []
},
{
"parent": "Sydney?!",
"replies": []
},
{
"parent": "Muenster, Germany\njust chill",
"replies": []
},
{
"parent": "Las Vegas! \n\nhttp://VATO.tv",
"replies": []
},
{
"parent": "Waterloo, ON",
"replies": []
},
{
"parent": "Houston",
"replies": []
},
{
"parent": "LA",
"replies": []
},
{
"parent": "Ocumare del Tuy",
"replies": []
},
{
"parent": "Florian\u00f3polis, Brazil",
"replies": []
},
{
"parent": "In the US - Long Beach, CA",
"replies": []
},
{
"parent": "Maak jij het verschil bij calamiteiten? Volg onze BHV basiscursus en word bedrijfshulpverlener in slechts 2 dagen. #bedrijfsveiligheid #bhv #veiligwerken #bedrijfshulpverlener #calamiteit #noodsituatie # hulpverlener",
"replies": []
},
{
"parent": "Vigo",
"replies": []
},
{
"parent": "Pyongyang if you\u2019re favored",
"replies": []
},
{
"parent": "Tokyo, Japan \nVancouver, Canada\nCopenhagen, Denmark \nOslo, Norway",
"replies": []
},
{
"parent": "San Francisco",
"replies": []
},
{
"parent": "Moscow, for non-Russians so you are not sent to war.",
"replies": []
},
{
"parent": "Nelson BC",
"replies": []
},
{
"parent": "Madrid no doubt",
"replies": []
},
{
"parent": "Stay in a place you'll be protected in WW3",
"replies": []
},
{
"parent": "Taipei",
"replies": []
},
{
"parent": "Montevideo",
"replies": []
},
{
"parent": "Toronto!",
"replies": []
},
{
"parent": "Koh Phangan",
"replies": []
},
{
"parent": "Buena Vista, Colorado",
"replies": []
},
{
"parent": "Kralendijk, Bonaire. Wondering what data you got about it ",
"replies": []
},
{
"parent": "Mexico city",
"replies": []
},
{
"parent": "San Juan, Puerto Rico.",
"replies": []
},
{
"parent": "bali",
"replies": []
},
{
"parent": "Seattle",
"replies": []
},
{
"parent": "London - stop being a broke boy",
"replies": []
},
{
"parent": "Barcelona. The tax situation can be a bit of a headache, though ",
"replies": []
},
{
"parent": "What criteria are you using? Is money or cost of living a factor? San Diego, California is pretty incredible but crazy expensive.",
"replies": []
},
{
"parent": "Cape Town, lived all over the world and nothing comes close",
"replies": []
},
{
"parent": "beautiful british columbia",
"replies": []
},
{
"parent": "Tokyo, if you don't have the kind of job that requires you to travel in at the peak of rush hour.",
"replies": []
},
{
"parent": "I feel happy to live in Kuta.\n\nBut I should not look to older people...",
"replies": []
},
{
"parent": "",
"replies": []
},
{
"parent": "Sydney",
"replies": []
},
{
"parent": "I would say Moscow",
"replies": []
},
{
"parent": "Los Angeles",
"replies": []
},
{
"parent": "Probably Warsaw! Affordable, modern, safe, well connected! Love it ",
"replies": []
},
{
"parent": "\u2606Japan\u2606Safe\u2606Food\u2606Tranportation\u2606Tradition\u2606Kind\u2606Discipline\u2606Cheap \n\n\u2606Safe \nTokyo is the safest city in the world. Truth be told, it is the safest place in entire human history. \nNo gun, No riot, No robbery, a girl can walk alone even the midnight in everywhere in Japan.\u2026",
"replies": []
},
{
"parent": "Honolulu",
"replies": []
},
{
"parent": "Vegas",
"replies": []
},
{
"parent": "Greece :) or Poland :)",
"replies": []
},
{
"parent": "Prague in my opinion",
"replies": []
},
{
"parent": "Buenos Aires man, you need to give it a second shot",
"replies": []
},
{
"parent": "Melbourne",
"replies": []
},
{
"parent": "bordeaux, taipei, krakow, lisbon",
"replies": []
},
{
"parent": "buenos aires (with american income)",
"replies": []
},
{
"parent": "Z\u00fcrich, but I expect this poll be skewed by the cities population. eg obviously NYC has a much wider pool",
"replies": []
},
{
"parent": "Tokyo",
"replies": []
},
{
"parent": " hawaii",
"replies": []
},
{
"parent": "Austin & Vancouver (in non-winter)",
"replies": []
},
{
"parent": "Azores islands or Algarve coast Portugal\n\nNusa Lembongan for Bali 20 years ago",
"replies": []
},
{
"parent": "Zurich",
"replies": []
},
{
"parent": "Shenzhen",
"replies": []
},
{
"parent": "Costa Rica",
"replies": []
},
{
"parent": "Antalya, Turkiye",
"replies": []
},
{
"parent": "Japan.",
"replies": []
},
{
"parent": "Taipei.",
"replies": []
},
{
"parent": "Miami!",
"replies": []
},
{
"parent": "Berlin",
"replies": []
},
{
"parent": "Thailand ",
"replies": []
},
{
"parent": "Lisbon",
"replies": []
},
{
"parent": "Panama City, Panama",
"replies": []
},
{
"parent": "Bolton, UK.",
"replies": []
},
{
"parent": "Buenos Aires, ARGENTINA",
"replies": []
},
{
"parent": "Miami",
"replies": []
},
{
"parent": "Miami and there isn\u2019t even a close 2nd",
"replies": []
},
{
"parent": "\u00c7ank\u0131r\u0131",
"replies": []
},
{
"parent": "Marin county, CA",
"replies": []
},
{
"parent": "Spain",
"replies": []
},
{
"parent": "Mersin",
"replies": []
},
{
"parent": "Mexico City ",
"replies": []
},
{
"parent": "Medellin Colombia",
"replies": []
},
{
"parent": "Huge fan of Medellin. I\u2019m here now!",
"replies": []
},
{
"parent": "Currently in Tokyo at the moment and wow, I see the potential.",
"replies": []
},
{
"parent": "Munich, ",
"replies": []
},
{
"parent": "London",
"replies": []
},
{
"parent": "Stockholm",
"replies": []
}
]
let uniqueNodes = [];
let isReply = false;
function addParentNode(text) {
if (!uniqueNodes.map(e => e.parent).includes(text)) {
return uniqueNodes.push({parent: text, replies: new Set()})
}
}
function getTweetsOnPage() {
let tweetsOnPage = document.querySelectorAll('[data-testid="tweetText"]');
let indexOfParent = -1;
for (let i = 0; i < tweetsOnPage.length; i++) {
const node = tweetsOnPage[i];
if (isReply) {
if (i < 2) {
continue;
}
if (i === 2) {
indexOfParent = uniqueNodes.map(e => e.parent).indexOf(node.innerText);
console.log(`reply to ${node.innerText} index of parent ${indexOfParent}`);
}
console.log(node.innerText);
uniqueNodes[indexOfParent].replies.add(node.innerText);
} else {
addParentNode(node.innerText);
}
}
}
function downloadTweets() {
uniqueNodes.foreach(e => { e.replies = Array.from(e.replies)});
const result = JSON.stringify(uniqueNodes);
const fileToSave = new Blob([result], { type: 'application/json;charset=utf-8"'});
const fileUrl = URL.createObjectURL(fileToSave);
const link = document.createElement('a');
link.href = fileUrl;
link.download = 'city_tweets.json';
link.click();
}
getTweetsOnPage();
downloadTweets();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment