<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="https://auroregonzalez.github.io/feed.xml" rel="self" type="application/atom+xml" /><link href="https://auroregonzalez.github.io/" rel="alternate" type="text/html" /><updated>2026-07-07T00:43:53-07:00</updated><id>https://auroregonzalez.github.io/feed.xml</id><title type="html">Aurore Gonzalez</title><subtitle>Aurore Gonzalez</subtitle><author><name>Aurore Gonzalez</name><email>auroregonzalez@g.harvard.edu</email></author><entry><title type="html">Resources for pivoting to public health data science</title><link href="https://auroregonzalez.github.io/posts/2021/01/public-health-resources" rel="alternate" type="text/html" title="Resources for pivoting to public health data science" /><published>2021-01-09T00:00:00-08:00</published><updated>2021-01-09T00:00:00-08:00</updated><id>https://auroregonzalez.github.io/posts/2021/01/public-health-data-science-resources</id><content type="html" xml:base="https://auroregonzalez.github.io/posts/2021/01/public-health-resources"><![CDATA[<p>About two years into my PhD, I realized that the field I actually wanted to be in was public health, not necessarily biological engineering. Around the same time, I also fell in love with coding and data science. That’s when I realized that combining public health and data science could be an ideal career path for my technical abilities and interests and my desire to have social impact. But immersed in the world of academia, at an institution without a school of public health, and with mentors who had all chosen routes in biotech or academia, it was really hard to learn more about my options for pivoting to a career in public health.</p>

<p>So I started to scrounge around and look for opportunities for a highly-trained technical person like me to pivot into public health and social impact. I never actually ended up pursuing any of these opportunities because my former labmate started <a href="www.biobot.io">Biobot Analytics</a>, which was an obvious career fit for me. But I know not everyone is lucky enough to have a unique opportunity like Biobot, and I’ve had a few folks over the years ask me about transitioning to public health and/or data science from a PhD. So I’ll excavate the list of links and resources I’ve accumulated, in the hopes that they are one day useful to someone. (Again, I didn’t actually apply to any of these (except the Luce), so I can’t speak to what they actually are.)</p>

<h2 id="public-health-fellowships">Public Health Fellowships</h2>

<h3 id="cdc-eis">CDC EIS</h3>

<p><a href="https://www.cdc.gov/eis/index.html">https://www.cdc.gov/eis/index.html</a></p>

<p>Epidemic Intelligence Service, 2-year fellowship for doctors (healthcare professionals and PhDs). You get placed in a CDC office (you don’t get a say in where you get placed, I think) and work on the front lines of epidemiological response.</p>

<p>From informational interviews and asking around, seems that EIS is pretty legit and prestigious in public health, and are a very common way for non-MPH’s to break into a career path at the CDC.</p>

<h3 id="cdc-fellowships">CDC Fellowships</h3>

<p><a href="https://www.cdc.gov/fellowships/full-time/index.html">https://www.cdc.gov/fellowships/full-time/index.html</a></p>

<p>CDC has a list of many fellowships for bachelor’s, master’s, and PhD-level candidates. Actually, now that I look through this again this is probably the best place to start.</p>

<h3 id="orise-fellowships">ORISE Fellowships</h3>

<p><a href="https://orise.orau.gov/internships-fellowships/index.html">https://orise.orau.gov/internships-fellowships/index.html</a></p>

<p>Fellowships across a broad variety of government agencies (including the CDC), available at the undergraduate, graduate, and postdoctoral levels.</p>

<h3 id="aphl-cdc-fellowships">APHL-CDC Fellowships</h3>

<p><a href="https://www.aphl.org/fellowships/Pages/About-the-Fellowship-Program.aspx">https://www.aphl.org/fellowships/Pages/About-the-Fellowship-Program.aspx</a></p>

<p>A few different types of fellowships available with the Association of Public Health Laboratories, including a mix of lab and computational fellowships. Looks like the fellowship descriptions vary slightly, but all involve some placement in a state, local, or federal public health laboratory to do real-world public health work.</p>

<h2 id="postdocs-with-a-public-or-global-health-focus">Postdocs with a public or global health focus</h2>

<h3 id="big-data-scientist-training-enhancement-program-bd-step">Big Data-Scientist Training Enhancement Program (BD-STEP)</h3>

<p><a href="https://www.va.gov/oaa/specialfellows/programs/sf_bdstep.asp">https://www.va.gov/oaa/specialfellows/programs/sf_bdstep.asp</a></p>

<p>Looks like this is a VA-sponsored fellowship that you can apply for at multiple locations (and presumably projects). Seems like a semi-generic postdoc, except that I imagine you have excellent access to cool VA data.</p>

<h3 id="fulbright-fogarty-fellows-in-public-health">Fulbright-Fogarty Fellows in Public Health</h3>

<p><a href="https://us.fulbrightonline.org/about/types-of-awards/fulbright-fogarty-fellowships-in-public-health">https://us.fulbrightonline.org/about/types-of-awards/fulbright-fogarty-fellowships-in-public-health</a></p>

<p>Looks like this is a public health-specific Fulbright.</p>

<h3 id="global-health-program-for-fellows-and-scholars">Global Health Program for Fellows and Scholars</h3>

<p><a href="https://www.fic.nih.gov/Programs/Pages/scholars-fellows-global-health.aspx">https://www.fic.nih.gov/Programs/Pages/scholars-fellows-global-health.aspx</a></p>

<p>12-month research fellowships in low- and middle-income countries, administered through Harvard, UC Berkeley, University of California Global Health Institute, UNC, University of Washington, and Vanderbilt. I’m guessing you apply directly through one of the participating institutions, and I imagine it’s a fairly generic postdoc fellowship.</p>

<h3 id="international-research-scientist-development-award-irsda">International Research Scientist Development Award (IRSDA)</h3>

<p><a href="https://www.fic.nih.gov/Programs/Pages/research-scientists.aspx">https://www.fic.nih.gov/Programs/Pages/research-scientists.aspx</a></p>

<p>Funding for a postdoc or junior faculty to do research in a low- or middle-income country.</p>

<h2 id="international-fellowships">International fellowships</h2>

<p>These aren’t public health-specific, but you can swing a pivot into a new field with these.</p>

<h3 id="luce-scholars">Luce Scholars</h3>

<p><a href="https://www.hluce.org/programs/luce-scholars/">https://www.hluce.org/programs/luce-scholars/</a></p>

<p>Not public health-specific, but how could I not include the best fellowship in the entire world? :)</p>

<p>The Luce Scholars program places you in a job in an Asian country for a year. No requirements beyond beyond smart and driven, having a degree from a qualified institution, being a US citizen under 30, and having had little to no exposure to Asia. If you get it, you can go work at a local public health agency or public health-focused NGO.</p>

<h3 id="princeton-in-asia">Princeton in Asia</h3>

<p><a href="https://piaweb.princeton.edu/about-us">https://piaweb.princeton.edu/about-us</a></p>

<p>Like the Luce but less competitive, more participants, and less well-paid. But also has a lot more options than the Luce: the Princeton in Asia program basically funds a bunch of internships all across Asia. Lots of public health options here.</p>

<p>From my experience in Cambodia, PIA is far less structured than the Luce (you’re basically just in an internship on your own) but you have more co-fellows in your country so it’s easier to find community.</p>

<h3 id="gates-foundation-global-health-fellows">Gates Foundation Global Health Fellows</h3>

<p><a href="https://www.gatesfoundation.org/Careers/Gates-Fellowships-FAQ">https://www.gatesfoundation.org/Careers/Gates-Fellowships-FAQ</a></p>

<p>Looks like the fellowship is currently on pause, but intended to relaunch by 2022.</p>

<h3 id="global-health-corps">Global health corps</h3>

<p><a href="https://ghcorps.org/">https://ghcorps.org/</a></p>

<p>Seems similar to Princeton in Asia in that there are many placements to choose from (only in Rwanda, Uganda, Malwai, and Zambia).</p>

<h3 id="fulbright">Fulbright</h3>

<p><a href="https://us.fulbrightonline.org/">https://us.fulbrightonline.org/</a></p>

<p>Of course, there’s always a Fulbright. I wasn’t ever interested in pursuing a Fulbright because you have to come up with your own project (and I’ve heard you get basically zero support while in-country), but it’s definitely an option for folks who already have a clear idea of what they want to do.</p>

<h2 id="data-science-fellowships-and-postdoc-funding">Data science fellowships and postdoc funding</h2>

<h3 id="data-science-for-social-good">Data science for social good</h3>

<p><a href="https://www.dssgfellowship.org/">https://www.dssgfellowship.org/</a></p>

<p>One of the first and most well-regarded data science for social good fellowships. Spend a summer working closely with governments and non-profits to apply data science to have real-world social impact. Not directly public health, but I’m sure many projects are health-related!</p>

<h3 id="ibm-social-good-fellowship">IBM Social Good Fellowship</h3>

<p><a href="https://www.ibm.com/ibm/responsibility/initiatives/IBMSocialGoodFellowship.html">https://www.ibm.com/ibm/responsibility/initiatives/IBMSocialGoodFellowship.html</a></p>

<p>From the website: “The IBM Social Good Fellowship is an opportunity for graduate students and postdoctoral scholars to develop their skills and develop data science solutions that benefit humanity.”</p>

<h3 id="bids-data-science-fellows-program">BIDS Data Science Fellows Program</h3>

<p><a href="https://bids.berkeley.edu/call-data-science-fellow-applications">https://bids.berkeley.edu/call-data-science-fellow-applications</a></p>

<p>Funding for a 2-year fellowship at the Berkeley Institute for Data Science (BIDS).</p>

<h3 id="columbia-data-science-institute-postdoctoral-fellowships">Columbia Data Science Institute postdoctoral fellowships</h3>

<p><a href="https://datascience.columbia.edu/research/postdoctoral-fellows/">https://datascience.columbia.edu/research/postdoctoral-fellows/</a></p>

<p>Looks like a generic postdoc fellowship to work with Columbia DSI faculty.</p>

<p>Also in general, lots of institutions are starting up data science institutes which usually come with data science-specific opportunities.</p>

<h3 id="schmidt-science-fellows">Schmidt Science Fellows</h3>

<p><a href="https://schmidtsciencefellows.org/">https://schmidtsciencefellows.org/</a></p>

<p>Kind of like the Luce, but if it were a postdoc and for scientists wanting to pivot to a different field.</p>

<h2 id="policy-fellowships">Policy fellowships</h2>

<h3 id="aaas">AAAS</h3>

<p><a href="https://www.aaas.org/programs/science-technology-policy-fellowships">https://www.aaas.org/programs/science-technology-policy-fellowships</a></p>

<p>The classic. AAAS Science Policy Fellowships are an excellent way to get hands-on experience working on science policy issues in the federal government. The congressional (legislative) fellowship supports two people each year to go work in the office of a member of Congress (my friend just finished it, she worked with Ed Markey!). The executive fellowship has a lot more openings, and there you can work in basically any federal agency.</p>

<h3 id="the-christine-mirzayan-science--technology-policy-graduate-fellowship-program">The Christine Mirzayan Science &amp; Technology Policy Graduate Fellowship Program</h3>

<p><a href="https://mirzayanfellow.nas.edu/Default.asp">https://mirzayanfellow.nas.edu/Default.asp</a></p>

<p>I actually know very little about this one, though from the website looks like it’s at the National Academies of Sciences, Engineering, and Medicine in DC and for only 12 weeks.</p>

<h2 id="other-federal-opportunities">Other federal opportunities</h2>

<p>Honestly, the best thing you can do is to sign yourself up for as many emails from federal agencies as possible.</p>

<p>I think once you enter into one agency’s email subscription management service, it’ll give you options to sign up to other agencies’ emails as well. I find it easiest to start with the <a href="https://tools.cdc.gov/campaignproxyservice/subscriptions.aspx">CDC emails</a> and go from there. NIAID and NIH emails have been mostly useful, but there is a whole treasure trove of federal agencies with intriguing sounding names!</p>

<p>These emails are a good way not only to get notified of potential cool opportunities (including data science!), but also just to better understand that landscape of federal agencies beyond the CDC.</p>

<h3 id="public-health-service-corps">Public Health Service Corps</h3>

<p><a href="https://www.usphs.gov/">https://www.usphs.gov/</a></p>

<p>Did you know that there is an official uniformed service corps in the US Public Health Service? This is the group that’s led by the Surgeon General. I have no idea what applying or working for the public health service corps entails, but it’s good to know it exists!</p>

<h3 id="data-science-at-the-nih">Data science at the NIH</h3>

<p><a href="https://datascience.nih.gov/workforce-development/fellowship-job-opportunities">https://datascience.nih.gov/workforce-development/fellowship-job-opportunities</a></p>

<p>Looks like there’s a handful of data science-related opportunities available through the NIH’s <a href="https://datascience.nih.gov/">Office of Data Science Strategy</a>.</p>

<h2 id="job-boards">Job boards</h2>

<p>These job boards are for a mix of GovTech, political tech, public health, computational biology, and related.</p>

<ul>
  <li>
    <p>USAJobs (<a href="https://www.usajobs.gov/">https://www.usajobs.gov/</a>): federal government’s official employment site.</p>
  </li>
  <li>
    <p>US of Tech (<a href="https://www.usoftech.org/">https://www.usoftech.org/</a>): more IT and software development focused, US of Tech is trying to get skilled technical folks into government. Job and internship opportunities across a variety of agencies.</p>
  </li>
  <li>
    <p>Outer Join (<a href="https://outerjoin.us/">https://outerjoin.us/</a>): recently found this one. Not focused on anything government or public health, just generic data science postings. All are supposed to be remote-friendly.</p>
  </li>
  <li>
    <p>Progressive Data Jobs (<a href="https://www.progressivedatajobs.org/">https://www.progressivedatajobs.org/</a>): data science jobs in progressive and Democratic campaigns and organizations.</p>
  </li>
  <li>
    <p>Higher Ground Labs (<a href="https://jobs.highergroundlabs.com/">https://jobs.highergroundlabs.com/</a>): another job board for progressive tech</p>
  </li>
  <li>
    <p>Jobs That Are Left (<a href="https://groups.google.com/g/jobsthatareleft?pli=1">https://groups.google.com/g/jobsthatareleft?pli=1</a>): Google group email list for a bunch of jobs in progressive spaces. Majority of the jobs are to work on campaigns, but I’ve also seen quite a few interesting data science jobs come through this list.</p>
  </li>
  <li>
    <p>All Hands (<a href="https://www.all-hands.us/">https://www.all-hands.us/</a>): looks to be less of a job board and more of a recruiting site. You submit your resume to join the talent pool, and then they connect you to jobs? No idea how effective this is.</p>
  </li>
  <li>
    <p>Coding it Forward (<a href="https://www.codingitforward.com/">https://www.codingitforward.com/</a>): has an email list with weekly job drops. Focused a little more broadly than the other political tech ones, they focus on social impact and civic technology.</p>
  </li>
  <li>
    <p>Fast Foward Tech (<a href="https://www.ffwd.org/tech-nonprofit-jobs/">https://www.ffwd.org/tech-nonprofit-jobs/</a>): focused on tech nonprofits.</p>
  </li>
  <li>
    <p>IDD Jobs (<a href="https://iddjobs.org/">https://iddjobs.org/</a>): job board for fields related to infectious disease dynamics, which overlaps considerably with epidemiology and public health-relevant worlds.</p>
  </li>
</ul>]]></content><author><name>Aurore Gonzalez</name><email>auroregonzalez@g.harvard.edu</email></author><summary type="html"><![CDATA[About two years into my PhD, I realized that the field I actually wanted to be in was public health, not necessarily biological engineering. Around the same time, I also fell in love with coding and data science. That’s when I realized that combining public health and data science could be an ideal career path for my technical abilities and interests and my desire to have social impact. But immersed in the world of academia, at an institution without a school of public health, and with mentors who had all chosen routes in biotech or academia, it was really hard to learn more about my options for pivoting to a career in public health.]]></summary></entry><entry><title type="html">Racism as a public health crisis: how wastewater epidemiology fits in</title><link href="https://auroregonzalez.github.io/posts/2020/06/racism-public-health-wbe" rel="alternate" type="text/html" title="Racism as a public health crisis: how wastewater epidemiology fits in" /><published>2020-06-10T00:00:00-07:00</published><updated>2020-06-10T00:00:00-07:00</updated><id>https://auroregonzalez.github.io/posts/2020/06/racism-public-health-wbe</id><content type="html" xml:base="https://auroregonzalez.github.io/posts/2020/06/racism-public-health-wbe"><![CDATA[<p>Today is the <a href="https://www.particlesforjustice.org/">Strike for Black Lives</a> and a day to <a href="https://www.shutdownstem.com/">#ShutDownSTEM</a>. For white people like me, today is about recognizing and reflecting on the anti-Black racism in our society, and committing to specific actions toward ending white supremacy. One of my actions for today is to publicly reflect on how our work at <a href="www.biobot.io">Biobot Analytics</a> contributes to addressing – and potentially perpetuating – racism in public health.</p>

<p>I’ll be going through this excellent <a href="https://www.washingtonpost.com/opinions/racism-is-killing-black-people-its-sickening-them-too/2020/06/04/fe004cc8-a681-11ea-b619-3f9133bbb482_story.html">Washington Post opinion piece</a> by Dr. Michelle Williams (Dean of the faculty at the Harvard School of Public Health) and Jeffrey Sánchez (former MA State Rep and fellow at HSPH):</p>

<h2 id="racism-is-killing-black-people-its-sickening-them-too"><a href="https://www.washingtonpost.com/opinions/racism-is-killing-black-people-its-sickening-them-too/2020/06/04/fe004cc8-a681-11ea-b619-3f9133bbb482_story.html">Racism is killing black people. It’s sickening them, too.</a></h2>

<p>I read this the other day and saw that wastewater epidemiology has a role to play in essentially every issue brought up in the piece. I’ve been thinking about many of these issues for a while now, but haven’t ever written them down. Hopefully in doing so, I can plant the seed for new ideas or encourage existing ones to grow, sparking conversations within my own company and the broader wastewater epidemiology community.</p>

<h2 id="social-determinants-of-health-aka-racism">Social determinants of health (AKA racism)</h2>

<blockquote>
  <p>Across the country, black Americans suffer from higher rates of diabetes, hypertension, asthma and heart disease than white Americans. They are more likely to be obese and get insufficient sleep, which can contribute to such health issues. The role of racism in these underlying conditions cannot be denied.</p>
</blockquote>

<blockquote>
  <p>A growing body of literature shows that social determinants — otherwise known as the conditions in which we’re born and in which we live, work and play — are key drivers of health inequities. For generations, communities of color have faced vast disparities in job opportunities, income and inherited family wealth. They are less likely to have housing security and access to quality schools, healthy food and green spaces. All these factors undoubtedly undermine mental and physical well-being.</p>
</blockquote>

<p>One of the most impactful aspects of looking to sewage as a source of health information is that everybody pees. Regardless of access to healthcare, economic opportunity, education level, or anything else – everybody pees. And if you’re like one of the majority of Americans who is connected to sewage infrastructure, then the health information you flush down the toilet is accessible through city sewers. That means that we can use sewage to monitor the health of people who might not have access to healthcare for any variety of reasons, and who therefore aren’t traditionally captured in clinical statistics.</p>

<p>Many crucial social determinants of health are difficult to quantify and therefore study. One of the other things that I find so exciting about wastewater epidemiology is that you could use it to measure these factors and open up new avenues of research and evidence-based policy making. For example, using wastewater to monitor community-level nutritional intake could change the way we identify and study food deserts, and directly quantify the impact of fresh food programs on the local communities who are intended beneficiaries.</p>

<h2 id="racism-associated-stress-and-its-biological-consequences">Racism-associated stress and its biological consequences</h2>

<blockquote>
  <p>In addition to the consequences of structural racism, it is well-documented that racism itself is hard on a person’s health. Chronic stress caused by discrimination can trigger a cascade of adverse health outcomes, from high blood pressure and heart disease to immunodeficiency and accelerated aging. Evidence even suggests that the racism endured by black mothers contributes to the alarmingly high maternal and infant mortality rate.</p>
</blockquote>

<p>As a bioengineer, it’s wild that my training never covered the biological effects of racism-induced stress compounded over a lifetime. There is certainly a <a href="https://www.npr.org/sections/health-shots/2017/11/11/562623815/scientists-start-to-tease-out-the-subtler-ways-racism-hurts-health">large body of research on health issues linked to racism-related stress</a>, but a disproportionate amount of biomedical science is focused on finding genetic markers to explain different rates of disease in sub-populations like racial groups. That had always annoyed me as a scientist uninterested in human genetics, but even more so when I realized that there was this whole other body of research that our field could have been prioritizing instead. And when you zoom in on <a href="https://www.hsph.harvard.edu/magazine/magazine_article/america-is-failing-its-black-mothers/">how these stressors affect health outcomes for Black mothers</a> in this country, the tragedy really crystallizes.</p>

<p>What if we measured biological markers of stress at a community-level through sewage? We could use wastewater epidemiology to show the extent of the biological impact of racism, for example by comparing stress markers in heavily policed communities vs. those with community-led neighborhood watches. Maybe sewage could open up a whole new field of research, directly measuring the biological effects of our racist and unjust society, and paving the way for improvements that rectify and reverse these negative impacts.</p>

<h2 id="essential-workers-and-unequal-access-to-economic-opportunity-and-public-health-prevention">Essential workers and unequal access to economic opportunity and public health prevention</h2>

<blockquote>
  <p>Black and brown Americans make up a disproportionate number of essential workers who have stayed on the job through lockdowns, and thus are at higher risk of contracting the disease. And when they do fall ill, they are more likely to receive worse care than white Americans do. That’s true even when controlling for socioeconomic factors such as income and education.</p>
</blockquote>

<p>The burden of COVID-19 is <a href="https://furmancenter.org/thestoop/entry/covid-19-cases-in-new-york-city-a-neighborhood-level-analysis">not evenly distributed</a>, and neither is the ability to implement preventative measures like staying home from work. That’s resulted in extremely disparate impacts, with Black people and other communities of color bearing a much greater share of COVID-19 deaths than their distribution in the population.</p>

<p>Here again, wastewater epidemiology could provide a quantitative and direct way to measure and monitor these disparities. By moving measurements upstream and into city manholes, we could identify new surges of COVID-19 on a community-by-community basis, mobilize testing centers to the areas where they are most needed, and make sure that even if certain communities aren’t being tested, they are being counted and served.</p>

<p>And it’s not just COVID-19 where this line of reasoning applies: with opioids, we’ve also realized that wastewater monitoring could be leveraged to identify communities who are experiencing high levels of opioid use and even overdoses (determined by measuring Narcan, the overdose reversal treatment) but who aren’t calling first responders and therefore have very low overdose numbers captured in official statistics. Thinking about quantifying these sorts of “treatment gaps” through wastewater could provide public health and city officials with yet another tool to address disparities within their local communities.</p>

<h2 id="environmental-racism">Environmental racism</h2>

<p>Environmental racism is another topic that I’m baffled was never covered in any of my scientific training. Across the country, low-income communities of color are more likely to have <a href="https://projects.propublica.org/louisiana-toxic-air/">factories</a> and <a href="https://texashousers.org/2019/03/21/study-black-latino-pollution-consumption-exposure/">other sources of pollution</a> built near them, further exacerbating health disparities. The disproportionate exposures to pollution faced by low-income communities of color are not passive mistakes, but rather the result of a systemically racist society.</p>

<p>This is another area where I’m excited by the potential of wastewater epidemiology to contribute to how these issues are studied, monitored, and improved. For example, measuring biomarkers of exposures to pollutants could complement associative studies linking toxic exposures to long-term health outcomes in individuals living in or from communities most affected by environmental racism. Imagine if the EPA’s metrics controlling what factories are and aren’t allowed to dump in the water weren’t about how much the factories were dumping, but rather about the direct health effects they were having on nearby populations.</p>

<h2 id="wastewater-epidemiology-as-a-potential-tool-of-oppression">Wastewater epidemiology as a potential tool of oppression</h2>

<p>I’m excited about the prospect of sewage-based monitoring as a tool for  quantifying health inequities by directly measuring the biological impacts of racist systems on individuals and communities. But I recognize that as with all other emerging technologies, this one is not without risks.</p>

<p>Yes, we could use wastewater epidemiology to shine a brighter light on social determinants of health and establish direct links between socioeconomic conditions and health outcomes. But we could also use wastewater epidemiology to entrench stigma and justify inequitable policies. For example, you could imagine insurance companies using sewage-based indicators as “objective” measures of community health, and varying premiums based on which neighborhood you live in. I could absolutely see an argument being made that such sewage-derived metrics are “objective” measures free from bias and therefore legitimate to act on. But it is clear that such measures would just be thinly veiled proxies for existing inequities.</p>

<p>Yes, wastewater epidemiology could be used to highlight the shockingly high rates of COVID-19 in communities with many low-income, non-white essential workers. And it could be used as an early warning for reemergence of COVID-19 cases on college campuses, thus providing administrators with finer and more responsive control over when to implement control measures. Or it could be used to justify unsafe return-to-campus or return-to-work policies, wherein the absence of COVID-19 in the sewers would justify the “safety” of forcing workers back to work even if they do not feel safe doing so.</p>

<p>And finally, even though sewage-based monitoring has the potential to revolutionize how we monitor the health of the majority of Americans, there’s still a non-negligible portion of the population that is not serviced by sewers. As we advocate for additional federal funding to integrate wastewater-based monitoring into standard public health practice, we must recognize which populations will be excluded. Even in the US, <a href="https://www.montgomeryadvertiser.com/story/news/local/alabama/2018/07/06/story-first-series-ways-communities-addressing-rise-poverty-related-tropical-diseases-poor-sewage/754311002/">sanitation is not a solved issue</a>. Those without access to sewer systems may also be those with the least access to public health services. Whether our work serves to increase these inequities or decrease them is up to us.</p>

<h2 id="making-change-goes-beyond-sewage">Making change goes beyond sewage</h2>

<p>Which brings me to my last point. At the end of the day, wastewater epidemiology isn’t going to solve any of these societal issues. Sewage isn’t going to tell us anything we don’t know: we don’t need wastewater epidemiology to know that racism is bad and that it contributes to health disparities. At its best, wastewater epidemiology will provide additional concrete evidence to motivate change and actionable metrics to quantify improvements. At worst, it will be deployed thoughtlessly and in ways that further entrench existing disparities. It’s up to us, the technology leaders and entrepreneurs working to integrate wastewater epidemiology into standard public health practice, to make sure that doesn’t happen.</p>]]></content><author><name>Aurore Gonzalez</name><email>auroregonzalez@g.harvard.edu</email></author><summary type="html"><![CDATA[Today is the Strike for Black Lives and a day to #ShutDownSTEM. For white people like me, today is about recognizing and reflecting on the anti-Black racism in our society, and committing to specific actions toward ending white supremacy. One of my actions for today is to publicly reflect on how our work at Biobot Analytics contributes to addressing – and potentially perpetuating – racism in public health.]]></summary></entry><entry><title type="html">Mapping my cross-country road trip with Python</title><link href="https://auroregonzalez.github.io/posts/2020/02/road-trip-map" rel="alternate" type="text/html" title="Mapping my cross-country road trip with Python" /><published>2020-02-09T00:00:00-08:00</published><updated>2020-02-09T00:00:00-08:00</updated><id>https://auroregonzalez.github.io/posts/2020/02/road-trip-map</id><content type="html" xml:base="https://auroregonzalez.github.io/posts/2020/02/road-trip-map"><![CDATA[<p>When I was on my <a href="https://cduvallet.github.io/travel/">cross-country road trip</a> last year, I kept track of a lot of things in the hopes of doing amazing analyses when I got back. Turns out having a job as a data scientist makes it a lot harder to find time to do data science on the side, and so I’ve only really gotten a chance to look into my <a href="2019/07/road-trip-expenses-pt1">expenses</a>. One of the things I had really wanted to do was make a map of all the places I went, but I didn’t actually know how to work with geospatial data in Python yet. I had this grand idea that I’d learn spatial data techniques while on my trip, but turns out hiking, drinking beer while watching the sunset, and going to bed early were way more compelling ways to spend my time. Luckily for me, one of the most fun parts of my new job has been learning geospatial coding and plotting techniques. I’ve been having fun with it in my job, and I realized that it also means I get to finally make my map!</p>

<p>In this post, I’ll go over geocoding (which I’ve never done before!), plotting points and lines on a map, and adding a background map. I will note that I’m still very early in my geospatial analysis days and most of these coding tricks are things I’ve picked up in the last couple of months, so I’m sure future-me will revisit this post in a few years and cringe at some of the coding choices I’ve made. But who cares, I wanna make the map! Let’s do it!</p>

<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kn">import</span> <span class="nn">pandas</span> <span class="k">as</span> <span class="n">pd</span>
<span class="kn">import</span> <span class="nn">geopandas</span> <span class="k">as</span> <span class="n">gpd</span>

<span class="kn">import</span> <span class="nn">contextily</span> <span class="k">as</span> <span class="n">ctx</span>
<span class="kn">import</span> <span class="nn">shapely</span>

<span class="kn">from</span> <span class="nn">geopy.geocoders</span> <span class="kn">import</span> <span class="n">Nominatim</span>
<span class="kn">from</span> <span class="nn">geopy.extra.rate_limiter</span> <span class="kn">import</span> <span class="n">RateLimiter</span>

<span class="kn">from</span> <span class="nn">time</span> <span class="kn">import</span> <span class="n">sleep</span> <span class="c1"># to limit geocoding rate in for loops
</span>
<span class="kn">import</span> <span class="nn">matplotlib.pyplot</span> <span class="k">as</span> <span class="n">plt</span>
<span class="kn">from</span> <span class="nn">matplotlib.colors</span> <span class="kn">import</span> <span class="n">to_hex</span>
<span class="kn">import</span> <span class="nn">seaborn</span> <span class="k">as</span> <span class="n">sns</span>
<span class="o">%</span><span class="n">matplotlib</span> <span class="n">inline</span>
</code></pre></div></div>

<p>For this map, we’ll use the dataset where I tracked my mileage. Because I am a human and not a robot, I wasn’t super consistent about it and didn’t always manage to get the mileage at each place I stayed at, for example. I also sometimes wrote down mileage multiple times a day, especially on days when I drove a long time. But I made up for it whenever I could, and I think I got a pretty decent coverage over the whole trip, with at least the majority of my camps tracked. Here’s what the data looks like:</p>

<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">df</span> <span class="o">=</span> <span class="n">pd</span><span class="p">.</span><span class="n">read_excel</span><span class="p">(</span><span class="s">'mileage.xlsx'</span><span class="p">)</span>
<span class="c1"># The last two columns are extra, drop those
</span><span class="n">df</span> <span class="o">=</span> <span class="n">df</span><span class="p">.</span><span class="n">iloc</span><span class="p">[:,</span> <span class="p">:</span><span class="o">-</span><span class="mi">2</span><span class="p">]</span>
<span class="k">print</span><span class="p">(</span><span class="n">df</span><span class="p">[[</span><span class="s">'city'</span><span class="p">,</span> <span class="s">'state'</span><span class="p">]].</span><span class="n">drop_duplicates</span><span class="p">().</span><span class="n">shape</span><span class="p">)</span>
<span class="n">df</span><span class="p">.</span><span class="n">head</span><span class="p">()</span>
</code></pre></div></div>

<div>
<style scoped="">
    .dataframe tbody tr th:only-of-type {
        vertical-align: middle;
    }

    .dataframe tbody tr th {
        vertical-align: top;
    }

    .dataframe thead th {
        text-align: right;
    }
</style>
<table border="1" class="dataframe">
  <thead>
    <tr style="text-align: right;">
      <th></th>
      <th>day</th>
      <th>city</th>
      <th>state</th>
      <th>mileage</th>
      <th>time</th>
      <th>part</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>0</td>
      <td>2019-02-17</td>
      <td>san diego</td>
      <td>ca</td>
      <td>41491.0</td>
      <td>midday</td>
      <td>1</td>
    </tr>
    <tr>
      <td>1</td>
      <td>2019-02-17</td>
      <td>sonoran desert national monument</td>
      <td>az</td>
      <td>41889.0</td>
      <td>night</td>
      <td>1</td>
    </tr>
    <tr>
      <td>2</td>
      <td>2019-02-18</td>
      <td>mesa</td>
      <td>az</td>
      <td>41948.0</td>
      <td>midday</td>
      <td>1</td>
    </tr>
    <tr>
      <td>3</td>
      <td>2019-02-18</td>
      <td>tucson</td>
      <td>az</td>
      <td>42067.0</td>
      <td>evening</td>
      <td>1</td>
    </tr>
    <tr>
      <td>4</td>
      <td>2019-02-18</td>
      <td>indian bread rocks blm</td>
      <td>az</td>
      <td>42179.0</td>
      <td>night</td>
      <td>1</td>
    </tr>
  </tbody>
</table>
</div>

<p>Because I tried to track my mileage every night but sometimes forgot and got it in the morning, I included a column indicating what time of day-ish that mileage occured at. That’s what’s in the <code class="language-plaintext highlighter-rouge">time</code> column. The <code class="language-plaintext highlighter-rouge">part</code> column on the right indicates whether it was part 1 (San Diego to Boston) or 2 (Boston to San Diego) of my road trip, and everything else is pretty self-explanatory.</p>

<h2 id="geocoding-locations">Geocoding locations</h2>

<p>Before I can make a map, I need to get the actual locations of the places I wrote down. From some poking around, I found that the <a href="https://geopy.readthedocs.io/">geopy</a> library has a wrapper for many different types of geocoders. I went ahead and tried using the one called <a href="https://operations.osmfoundation.org/policies/nominatim/">Nominatim</a>, because it seems to be fairly standard and doesn’t require an API, but if I wanted to geocode more locations I’d be much more careful about reading up on the terms of each provider and making sure I wasn’t abusing their service. But since I only have about 70 places to geolocate, I’ll just stick with this one.</p>

<p>First, I need to set up my geolocator object. Then, I’ll get just the unique cities that I wrote down in my spreadsheet, geolocate them, and put them back into my original dataframe.</p>

<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1"># Set up geolocator object
# Increase the timeout so I don't get timeout errors as much
</span><span class="n">geolocator</span> <span class="o">=</span> <span class="n">Nominatim</span><span class="p">(</span><span class="n">user_agent</span><span class="o">=</span><span class="s">"road-trip-map"</span><span class="p">,</span> <span class="n">timeout</span><span class="o">=</span><span class="mi">10</span><span class="p">)</span>
<span class="c1"># Make sure to limit requests to abide by terms
</span><span class="n">geocode</span> <span class="o">=</span> <span class="n">RateLimiter</span><span class="p">(</span><span class="n">geolocator</span><span class="p">.</span><span class="n">geocode</span><span class="p">,</span> <span class="n">min_delay_seconds</span><span class="o">=</span><span class="mi">1</span><span class="p">)</span>

<span class="c1"># Get the unique cities in my dataframe
</span><span class="n">cities</span> <span class="o">=</span> <span class="n">df</span><span class="p">[[</span><span class="s">'city'</span><span class="p">,</span> <span class="s">'state'</span><span class="p">]].</span><span class="n">drop_duplicates</span><span class="p">()</span>
<span class="c1"># Convert the two columns city and state into one string
</span><span class="n">cities</span><span class="p">[</span><span class="s">'to_geolocate'</span><span class="p">]</span> <span class="o">=</span> <span class="n">cities</span><span class="p">[</span><span class="s">'city'</span><span class="p">]</span> <span class="o">+</span> <span class="s">' '</span> <span class="o">+</span> <span class="n">cities</span><span class="p">[</span><span class="s">'state'</span><span class="p">]</span>

<span class="c1"># Geolocate the cities - this takes a couple of minutes
</span><span class="n">cities</span><span class="p">[</span><span class="s">'location'</span><span class="p">]</span> <span class="o">=</span> <span class="n">cities</span><span class="p">[</span><span class="s">'to_geolocate'</span><span class="p">].</span><span class="nb">apply</span><span class="p">(</span><span class="n">geocode</span><span class="p">)</span>
</code></pre></div></div>

<p>Let’s take a look at what this looks like:</p>

<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">cities</span><span class="p">.</span><span class="n">head</span><span class="p">()</span>
</code></pre></div></div>

<div>
<style scoped="">
    .dataframe tbody tr th:only-of-type {
        vertical-align: middle;
    }

    .dataframe tbody tr th {
        vertical-align: top;
    }

    .dataframe thead th {
        text-align: right;
    }
</style>
<table border="1" class="dataframe">
  <thead>
    <tr style="text-align: right;">
      <th></th>
      <th>city</th>
      <th>state</th>
      <th>to_geolocate</th>
      <th>location</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>0</td>
      <td>san diego</td>
      <td>ca</td>
      <td>san diego ca</td>
      <td>(San Diego, San Diego County, California, Unit...</td>
    </tr>
    <tr>
      <td>1</td>
      <td>sonoran desert national monument</td>
      <td>az</td>
      <td>sonoran desert national monument az</td>
      <td>(Sonoran Desert National Monument, Riggs Road,...</td>
    </tr>
    <tr>
      <td>2</td>
      <td>mesa</td>
      <td>az</td>
      <td>mesa az</td>
      <td>(Mesa, Maricopa County, Arizona, United States...</td>
    </tr>
    <tr>
      <td>3</td>
      <td>tucson</td>
      <td>az</td>
      <td>tucson az</td>
      <td>(Tucson, Pima County, Arizona, United States o...</td>
    </tr>
    <tr>
      <td>4</td>
      <td>indian bread rocks blm</td>
      <td>az</td>
      <td>indian bread rocks blm az</td>
      <td>(Indian Bread Rocks Picnic Area, Happy Camp Ca...</td>
    </tr>
  </tbody>
</table>
</div>

<p>I’m super impressed at this geocoder, it even got the random BLM campground I stayed at in Arizona (Indian Bread Rocks)! I remember this one well - I was super worried about it because I’d be getting in after dark and there weren’t too many backup options in this stretch of road, and the <em>first</em> random BLM campground I’d stayed at was quite difficult to find (Google maps took me down some dirt road straight to a “no trespassing” fenced-in compound, and then when I got back on the correct dirt road I took a wrong turn and got myself into some trees. Sorry for the scratches on the car, Dad!) Anyway, this camp was way better - after some delicious tacos in Tucson, I remember that it was super easy to find and well-signed, and there was an open spot for me, a toilet, and even some cell service! I snuggled up with a beer and a funny family group chat, and when I woke up the next morning everything was covered in snow. I think it was the first morning where I truly felt like I was on a road trip, I knew what I was doing, and it was gonna be <em>amazing</em>.</p>

<p>All that to say, it’s cool that the geocoder found it. Let’s see if there are any places it couldn’t find, and if I can fix those manually:</p>

<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">cities</span><span class="p">[</span><span class="n">cities</span><span class="p">[</span><span class="s">'location'</span><span class="p">].</span><span class="n">isnull</span><span class="p">()]</span>
</code></pre></div></div>

<div>
<style scoped="">
    .dataframe tbody tr th:only-of-type {
        vertical-align: middle;
    }

    .dataframe tbody tr th {
        vertical-align: top;
    }

    .dataframe thead th {
        text-align: right;
    }
</style>
<table border="1" class="dataframe">
  <thead>
    <tr style="text-align: right;">
      <th></th>
      <th>city</th>
      <th>state</th>
      <th>to_geolocate</th>
      <th>location</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>6</td>
      <td>big bend hot springs</td>
      <td>tx</td>
      <td>big bend hot springs tx</td>
      <td>None</td>
    </tr>
    <tr>
      <td>19</td>
      <td>great smoky mountains national park</td>
      <td>tn</td>
      <td>great smoky mountains national park tn</td>
      <td>None</td>
    </tr>
    <tr>
      <td>24</td>
      <td>mississippi river state park</td>
      <td>tn</td>
      <td>mississippi river state park tn</td>
      <td>None</td>
    </tr>
    <tr>
      <td>26</td>
      <td>haw creek falls camp</td>
      <td>ar</td>
      <td>haw creek falls camp ar</td>
      <td>None</td>
    </tr>
    <tr>
      <td>31</td>
      <td>lake clayton state park</td>
      <td>nm</td>
      <td>lake clayton state park nm</td>
      <td>None</td>
    </tr>
    <tr>
      <td>33</td>
      <td>joe skeen blm campground</td>
      <td>nm</td>
      <td>joe skeen blm campground nm</td>
      <td>None</td>
    </tr>
    <tr>
      <td>38</td>
      <td>south rim grand canyon national park</td>
      <td>az</td>
      <td>south rim grand canyon national park az</td>
      <td>None</td>
    </tr>
    <tr>
      <td>50</td>
      <td>grand staircase escalante</td>
      <td>ut</td>
      <td>grand staircase escalante ut</td>
      <td>None</td>
    </tr>
    <tr>
      <td>55</td>
      <td>ken's lake campground</td>
      <td>ut</td>
      <td>ken's lake campground ut</td>
      <td>None</td>
    </tr>
    <tr>
      <td>57</td>
      <td>rabbit valley jouflas campground</td>
      <td>ut</td>
      <td>rabbit valley jouflas campground ut</td>
      <td>None</td>
    </tr>
    <tr>
      <td>77</td>
      <td>norris junction yellowstone national park</td>
      <td>wy</td>
      <td>norris junction yellowstone national park wy</td>
      <td>None</td>
    </tr>
    <tr>
      <td>78</td>
      <td>mammoth campground yellowstone national park</td>
      <td>wy</td>
      <td>mammoth campground yellowstone national park wy</td>
      <td>None</td>
    </tr>
    <tr>
      <td>79</td>
      <td>old faithful yellowstone national park</td>
      <td>wy</td>
      <td>old faithful yellowstone national park wy</td>
      <td>None</td>
    </tr>
    <tr>
      <td>80</td>
      <td>turpin meadow camp</td>
      <td>wy</td>
      <td>turpin meadow camp wy</td>
      <td>None</td>
    </tr>
    <tr>
      <td>81</td>
      <td>grand tetons national park</td>
      <td>wy</td>
      <td>grand tetons national park wy</td>
      <td>None</td>
    </tr>
    <tr>
      <td>86</td>
      <td>catnip reservoir sheldon wildlife refuge</td>
      <td>nv</td>
      <td>catnip reservoir sheldon wildlife refuge nv</td>
      <td>None</td>
    </tr>
  </tbody>
</table>
</div>

<p>Interesting, lots of campgrounds within parks here that I suppose make sense are hard to find, but others which are more surprising (e.g. “Grand Tetons National Park” – what’s going on there?).</p>

<p>I’ll just go through each of these one by one and try to figure out what’s causing the issue. In some cases, I imagine just zooming back out to the park will be enough. I’ll just try variations of each unfound string in the geocoder, and then check if the location it returns is the one I wanted. I won’t include all the code with my back-and-forths here, but I will track what the problem was in the comments in the code block below:</p>

<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1"># This dictionary maps "current location name": "correct location name"
</span><span class="n">fixgeolocate</span> <span class="o">=</span> <span class="p">{</span>
    <span class="s">'big bend hot springs tx'</span><span class="p">:</span> <span class="s">'big bend national park tx'</span><span class="p">,</span> <span class="c1"># too specific
</span>    <span class="s">'great smoky mountains national park tn'</span><span class="p">:</span> <span class="s">'great smoky mountains national park'</span><span class="p">,</span> <span class="c1"># the coder has this in NC
</span>    <span class="s">'mississippi river state park tn'</span><span class="p">:</span> <span class="s">'st francis national forest'</span><span class="p">,</span> <span class="c1"># this place had two names, v confusing
</span>    <span class="s">'haw creek falls camp ar'</span><span class="p">:</span> <span class="s">'haw creek falls'</span><span class="p">,</span> <span class="c1"># this is the one I almost got flooded in, in the Ozarks
</span>    <span class="s">'lake clayton state park nm'</span><span class="p">:</span> <span class="s">'clayton lake state park nm'</span><span class="p">,</span> <span class="c1"># messed this up everytime, beautiful place tho
</span>    <span class="s">'south rim grand canyon national park az'</span><span class="p">:</span> <span class="s">'grand canyon national park az'</span><span class="p">,</span> <span class="c1"># too specific
</span>    <span class="s">'grand staircase escalante ut'</span><span class="p">:</span> <span class="s">'Grand Staircase-Escalante National Monument'</span><span class="p">,</span> <span class="c1"># too lazy to write it all out
</span>    <span class="s">'rabbit valley jouflas campground ut'</span><span class="p">:</span> <span class="s">'rabbit valley co'</span><span class="p">,</span>
    <span class="s">'norris junction yellowstone national park wy'</span><span class="p">:</span> <span class="s">'norris geyser wy'</span><span class="p">,</span> <span class="c1"># too specific
</span>    <span class="s">'mammoth campground yellowstone national park wy'</span><span class="p">:</span> <span class="s">'mammoth campground wy'</span><span class="p">,</span>
    <span class="s">'old faithful yellowstone national park wy'</span><span class="p">:</span> <span class="s">'old faithful wy'</span><span class="p">,</span>
    <span class="s">'turpin meadow camp wy'</span><span class="p">:</span> <span class="s">'turpin meadow campground wy'</span><span class="p">,</span>
    <span class="s">'grand tetons national park wy'</span><span class="p">:</span> <span class="s">'grand teton national park wy'</span><span class="p">,</span> <span class="c1"># typo, guess there's only one teton
</span>    <span class="s">'catnip reservoir sheldon wildlife refuge nv'</span><span class="p">:</span> <span class="s">'catnip reservoir nv'</span><span class="p">,</span>
    <span class="s">'joe skeen blm campground nm'</span><span class="p">:</span> <span class="s">'BLM El Malpais'</span><span class="p">,</span>
    <span class="s">"ken's lake campground ut"</span><span class="p">:</span> <span class="s">"Ken's Lake"</span><span class="p">,</span> <span class="c1"># camp that took forever to find outside of moab...
</span>
<span class="p">}</span>

</code></pre></div></div>

<p>So turns out there’s only one Teton in the park name (even though there are multiple mountains!). The geocoder also had trouble finding the Joe Skeen campground at El Malpais, because it’s apparently got a typo in whatever database it’s pulling from (it has is listed as “Jpe Skeen” womp womp). Honestly it was one of the best free campgrounds I found – I stayed there two nights, after I unsuccessfully tried to find a spot at the much smaller (and more popular) campground at El Morro monument. Also I chuckled a bit that the geocoder couldn’t find the Ken’s Lake campground, because <em>I</em> also had a lot of trouble finding it! It was a campground outside of Moab, which I paid something like $20 for after driving around for <em>hours</em> trying to find a place to camp. Note to future travellers: when it comes to Moab, book ahead!</p>

<p>Anyway, let’s geocode these updated location and merge it back with the rest of the location results.</p>

<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1"># Get location for each of these places
</span><span class="n">new_locations</span> <span class="o">=</span> <span class="p">{}</span>
<span class="k">for</span> <span class="n">key</span><span class="p">,</span> <span class="n">val</span> <span class="ow">in</span> <span class="n">fixgeolocate</span><span class="p">.</span><span class="n">items</span><span class="p">():</span>
    <span class="c1"># Geocode the updated location
</span>    <span class="n">loc</span> <span class="o">=</span> <span class="n">geocode</span><span class="p">(</span><span class="n">val</span><span class="p">)</span>
    <span class="c1"># Build a map of old location --&gt; geocoded location
</span>    <span class="n">new_locations</span><span class="p">[</span><span class="n">key</span><span class="p">]</span> <span class="o">=</span> <span class="n">loc</span>

    <span class="c1"># Add a delay to not overload the geocoder
</span>    <span class="n">sleep</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span>
</code></pre></div></div>

<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1"># And update the dataframe
</span>
<span class="c1"># Get the indices of the rows that have "None" for the location
</span><span class="n">null_locs</span> <span class="o">=</span> <span class="n">cities</span><span class="p">[</span><span class="n">cities</span><span class="p">[</span><span class="s">'location'</span><span class="p">].</span><span class="n">isnull</span><span class="p">()].</span><span class="n">index</span>

<span class="c1"># Replace the "location" value in those rows with the new location
# in the new_locations dict
</span><span class="n">cities</span><span class="p">.</span><span class="n">loc</span><span class="p">[</span><span class="n">null_locs</span><span class="p">,</span> <span class="s">'location'</span><span class="p">]</span> <span class="o">=</span> <span class="n">cities</span><span class="p">.</span><span class="n">loc</span><span class="p">[</span><span class="n">null_locs</span><span class="p">,</span> <span class="s">'to_geolocate'</span><span class="p">].</span><span class="nb">map</span><span class="p">(</span><span class="n">new_locations</span><span class="p">)</span>
</code></pre></div></div>

<p>Now that I have everything geocoded, I’ll merge the locations back onto my original dataframe, which contains the day, part of the trip, and mileage.</p>

<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1"># Merge geocoded locations with the original dataframe
</span><span class="n">gdf</span> <span class="o">=</span> <span class="n">pd</span><span class="p">.</span><span class="n">merge</span><span class="p">(</span>
    <span class="n">df</span><span class="p">,</span> <span class="n">cities</span><span class="p">[[</span><span class="s">'city'</span><span class="p">,</span> <span class="s">'state'</span><span class="p">,</span> <span class="s">'location'</span><span class="p">]],</span>
    <span class="n">on</span><span class="o">=</span><span class="p">[</span><span class="s">'city'</span><span class="p">,</span> <span class="s">'state'</span><span class="p">],</span>
    <span class="n">how</span><span class="o">=</span><span class="s">'left'</span>
<span class="p">)</span>
<span class="n">gdf</span><span class="p">.</span><span class="n">head</span><span class="p">()</span>
</code></pre></div></div>

<div>
<style scoped="">
    .dataframe tbody tr th:only-of-type {
        vertical-align: middle;
    }

    .dataframe tbody tr th {
        vertical-align: top;
    }

    .dataframe thead th {
        text-align: right;
    }
</style>
<table border="1" class="dataframe">
  <thead>
    <tr style="text-align: right;">
      <th></th>
      <th>day</th>
      <th>city</th>
      <th>state</th>
      <th>mileage</th>
      <th>time</th>
      <th>part</th>
      <th>location</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>0</td>
      <td>2019-02-17</td>
      <td>san diego</td>
      <td>ca</td>
      <td>41491.0</td>
      <td>midday</td>
      <td>1</td>
      <td>(San Diego, San Diego County, California, Unit...</td>
    </tr>
    <tr>
      <td>1</td>
      <td>2019-02-17</td>
      <td>sonoran desert national monument</td>
      <td>az</td>
      <td>41889.0</td>
      <td>night</td>
      <td>1</td>
      <td>(Sonoran Desert National Monument, Riggs Road,...</td>
    </tr>
    <tr>
      <td>2</td>
      <td>2019-02-18</td>
      <td>mesa</td>
      <td>az</td>
      <td>41948.0</td>
      <td>midday</td>
      <td>1</td>
      <td>(Mesa, Maricopa County, Arizona, United States...</td>
    </tr>
    <tr>
      <td>3</td>
      <td>2019-02-18</td>
      <td>tucson</td>
      <td>az</td>
      <td>42067.0</td>
      <td>evening</td>
      <td>1</td>
      <td>(Tucson, Pima County, Arizona, United States o...</td>
    </tr>
    <tr>
      <td>4</td>
      <td>2019-02-18</td>
      <td>indian bread rocks blm</td>
      <td>az</td>
      <td>42179.0</td>
      <td>night</td>
      <td>1</td>
      <td>(Indian Bread Rocks Picnic Area, Happy Camp Ca...</td>
    </tr>
  </tbody>
</table>
</div>

<h2 id="getting-ready-to-plot-plus-some-more-wrangling">Getting ready to plot, plus some more wrangling</h2>

<p>Before I can plot these locations, I need to convert them to <code class="language-plaintext highlighter-rouge">shapely</code> objects and put them in the <code class="language-plaintext highlighter-rouge">geometry</code> column of the <code class="language-plaintext highlighter-rouge">geopandas</code> dataframe. I’ll do this using the <a href="https://geopandas.readthedocs.io/en/latest/gallery/create_geopandas_from_pandas.html#creating-a-geodataframe-from-a-dataframe-with-coordinates">points_from_xy() function in geopandas</a>, after grabbing the latitude and longitude from the locations returned by <code class="language-plaintext highlighter-rouge">geopy</code>. The <a href="https://geopy.readthedocs.io/en/stable/#geopy.location.Location">geopy <code class="language-plaintext highlighter-rouge">location</code> class</a> has latitude and longitude as two properties, so it’s super easy to do this!</p>

<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1"># query each location's latitude and longitude
</span><span class="n">gdf</span><span class="p">[</span><span class="s">'latitude'</span><span class="p">]</span> <span class="o">=</span> <span class="n">gdf</span><span class="p">[</span><span class="s">'location'</span><span class="p">].</span><span class="nb">apply</span><span class="p">(</span><span class="k">lambda</span> <span class="n">x</span><span class="p">:</span> <span class="n">x</span><span class="p">.</span><span class="n">latitude</span><span class="p">)</span>
<span class="n">gdf</span><span class="p">[</span><span class="s">'longitude'</span><span class="p">]</span> <span class="o">=</span> <span class="n">gdf</span><span class="p">[</span><span class="s">'location'</span><span class="p">].</span><span class="nb">apply</span><span class="p">(</span><span class="k">lambda</span> <span class="n">x</span><span class="p">:</span> <span class="n">x</span><span class="p">.</span><span class="n">longitude</span><span class="p">)</span>

<span class="c1"># Add the shapely Point in the 'geometry' column
</span><span class="n">gdf</span><span class="p">[</span><span class="s">'geometry'</span><span class="p">]</span> <span class="o">=</span> <span class="n">gpd</span><span class="p">.</span><span class="n">points_from_xy</span><span class="p">(</span><span class="n">gdf</span><span class="p">[</span><span class="s">'longitude'</span><span class="p">],</span> <span class="n">gdf</span><span class="p">[</span><span class="s">'latitude'</span><span class="p">])</span>

<span class="c1"># And convert the dataframe to a geopandas dataframe
</span><span class="n">gdf</span> <span class="o">=</span> <span class="n">gpd</span><span class="p">.</span><span class="n">GeoDataFrame</span><span class="p">(</span><span class="n">gdf</span><span class="p">)</span>
</code></pre></div></div>

<p>Almost ready to plot! I want to also add an easy USA background to my plot, otherwise it’ll just be points in a blank axis. Let’s use some of the <a href="https://geopandas.readthedocs.io/en/latest/gallery/create_geopandas_from_pandas.html">built-in geopandas maps</a> to do this.</p>

<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1"># Read in the world - this returns just a normal geodataframe
</span><span class="n">world</span> <span class="o">=</span> <span class="n">gpd</span><span class="p">.</span><span class="n">read_file</span><span class="p">(</span><span class="n">gpd</span><span class="p">.</span><span class="n">datasets</span><span class="p">.</span><span class="n">get_path</span><span class="p">(</span><span class="s">'naturalearth_lowres'</span><span class="p">))</span>

<span class="c1"># Get just the US
</span><span class="n">usa</span> <span class="o">=</span> <span class="n">world</span><span class="p">.</span><span class="n">query</span><span class="p">(</span><span class="s">'name == "United States of America"'</span><span class="p">)</span>
</code></pre></div></div>

<p>Ok, <em>now</em> I’m ready to plot where I went!</p>

<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1"># Plot the USA
</span><span class="n">ax</span> <span class="o">=</span> <span class="n">usa</span><span class="p">.</span><span class="n">boundary</span><span class="p">.</span><span class="n">plot</span><span class="p">()</span>
<span class="c1"># Overlay my point locations
</span><span class="n">gdf</span><span class="p">.</span><span class="n">plot</span><span class="p">(</span><span class="n">ax</span><span class="o">=</span><span class="n">ax</span><span class="p">)</span>
</code></pre></div></div>

<p><img src="/images/2020-01-29.road_trip_map_files/2020-01-29.road_trip_map_22_1.png" alt="png" /></p>

<p>Uh oh. There’s one point that’s suuuper not right (and one that’s in … Canada?). Wonder what’s happening here…</p>

<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1"># Fix the one in the bottom right first
</span><span class="n">gdf</span><span class="p">.</span><span class="n">sort_values</span><span class="p">(</span><span class="n">by</span><span class="o">=</span><span class="p">[</span><span class="s">'latitude'</span><span class="p">,</span> <span class="s">'longitude'</span><span class="p">]).</span><span class="n">head</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span>
</code></pre></div></div>

<div>
<style scoped="">
    .dataframe tbody tr th:only-of-type {
        vertical-align: middle;
    }

    .dataframe tbody tr th {
        vertical-align: top;
    }

    .dataframe thead th {
        text-align: right;
    }
</style>
<table border="1" class="dataframe">
  <thead>
    <tr style="text-align: right;">
      <th></th>
      <th>day</th>
      <th>city</th>
      <th>state</th>
      <th>mileage</th>
      <th>time</th>
      <th>part</th>
      <th>location</th>
      <th>latitude</th>
      <th>longitude</th>
      <th>geometry</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>27</td>
      <td>2019-04-18</td>
      <td>hot springs</td>
      <td>ar</td>
      <td>NaN</td>
      <td>afternoon</td>
      <td>2</td>
      <td>(aguas termales, La Peña Azul, Municipio de Ge...</td>
      <td>-24.238173</td>
      <td>-64.159278</td>
      <td>POINT (-64.15928 -24.23817)</td>
    </tr>
  </tbody>
</table>
</div>

<p>Ah, seems that Hot Springs, Arkansas got geocoded somewhere in Argentina… Let’s fix that manually and re-plot!</p>

<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1"># I manually checked that this returns the Hot Springs in Arkansas
</span><span class="n">hotsprings</span> <span class="o">=</span> <span class="n">geocode</span><span class="p">(</span><span class="s">'hot springs'</span><span class="p">)</span>
<span class="n">gdf</span><span class="p">.</span><span class="n">at</span><span class="p">[</span><span class="mi">27</span><span class="p">,</span> <span class="s">'location'</span><span class="p">]</span> <span class="o">=</span> <span class="n">hotsprings</span> <span class="c1"># need to use at to avoide error bc "hotsprings" is a tuple
</span><span class="n">gdf</span><span class="p">.</span><span class="n">loc</span><span class="p">[</span><span class="mi">27</span><span class="p">,</span> <span class="s">'latitude'</span><span class="p">]</span> <span class="o">=</span> <span class="n">hotsprings</span><span class="p">.</span><span class="n">latitude</span>
<span class="n">gdf</span><span class="p">.</span><span class="n">loc</span><span class="p">[</span><span class="mi">27</span><span class="p">,</span> <span class="s">'longitude'</span><span class="p">]</span> <span class="o">=</span> <span class="n">hotsprings</span><span class="p">.</span><span class="n">longitude</span>
<span class="c1"># Re-code the lat/lon into a point
</span><span class="n">gdf</span><span class="p">.</span><span class="n">loc</span><span class="p">[</span><span class="mi">27</span><span class="p">,</span> <span class="s">'geometry'</span><span class="p">]</span> <span class="o">=</span> <span class="n">shapely</span><span class="p">.</span><span class="n">geometry</span><span class="p">.</span><span class="n">Point</span><span class="p">(</span><span class="n">gdf</span><span class="p">.</span><span class="n">loc</span><span class="p">[</span><span class="mi">27</span><span class="p">,</span> <span class="s">'longitude'</span><span class="p">],</span> <span class="n">gdf</span><span class="p">.</span><span class="n">loc</span><span class="p">[</span><span class="mi">27</span><span class="p">,</span> <span class="s">'latitude'</span><span class="p">])</span>
</code></pre></div></div>

<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1"># Fix the one in Canada next
</span><span class="n">gdf</span><span class="p">.</span><span class="n">sort_values</span><span class="p">(</span><span class="n">by</span><span class="o">=</span><span class="p">[</span><span class="s">'longitude'</span><span class="p">],</span> <span class="n">ascending</span><span class="o">=</span><span class="bp">False</span><span class="p">).</span><span class="n">head</span><span class="p">(</span><span class="mi">3</span><span class="p">)[</span><span class="s">'location'</span><span class="p">]</span>
</code></pre></div></div>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>94    (Oakland, Municipality of the District of Lune...
93    (Oakland, Municipality of the District of Lune...
14    (Boston, Suffolk County, Massachusetts, United...
Name: location, dtype: object
</code></pre></div></div>

<p>And it found Oakland as the Oakland in Nova Scotia… Let’s fix that too.</p>

<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1"># I manually checked that this returns the Hot Springs in Arkansas
</span><span class="n">oakland</span> <span class="o">=</span> <span class="n">geocode</span><span class="p">(</span><span class="s">'oakland ca usa'</span><span class="p">)</span>
<span class="k">for</span> <span class="n">ix</span> <span class="ow">in</span> <span class="p">[</span><span class="mi">93</span><span class="p">,</span> <span class="mi">94</span><span class="p">]:</span>
    <span class="n">gdf</span><span class="p">.</span><span class="n">at</span><span class="p">[</span><span class="n">ix</span><span class="p">,</span> <span class="s">'location'</span><span class="p">]</span> <span class="o">=</span> <span class="n">oakland</span> <span class="c1"># need to use at to avoide error bc "hotsprings" is a tuple
</span>    <span class="n">gdf</span><span class="p">.</span><span class="n">loc</span><span class="p">[</span><span class="n">ix</span><span class="p">,</span> <span class="s">'latitude'</span><span class="p">]</span> <span class="o">=</span> <span class="n">oakland</span><span class="p">.</span><span class="n">latitude</span>
    <span class="n">gdf</span><span class="p">.</span><span class="n">loc</span><span class="p">[</span><span class="n">ix</span><span class="p">,</span> <span class="s">'longitude'</span><span class="p">]</span> <span class="o">=</span> <span class="n">oakland</span><span class="p">.</span><span class="n">longitude</span>
    <span class="c1"># Re-code the lat/lon into a point
</span>    <span class="n">gdf</span><span class="p">.</span><span class="n">loc</span><span class="p">[</span><span class="n">ix</span><span class="p">,</span> <span class="s">'geometry'</span><span class="p">]</span> <span class="o">=</span> <span class="n">shapely</span><span class="p">.</span><span class="n">geometry</span><span class="p">.</span><span class="n">Point</span><span class="p">(</span><span class="n">gdf</span><span class="p">.</span><span class="n">loc</span><span class="p">[</span><span class="n">ix</span><span class="p">,</span> <span class="s">'longitude'</span><span class="p">],</span> <span class="n">gdf</span><span class="p">.</span><span class="n">loc</span><span class="p">[</span><span class="n">ix</span><span class="p">,</span> <span class="s">'latitude'</span><span class="p">])</span>
</code></pre></div></div>

<p>There’s a couple other mistakes that I found after plotting, which I’ll just fix here without explaining step by step:</p>

<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">def</span> <span class="nf">update_loc</span><span class="p">(</span><span class="n">ix</span><span class="p">,</span> <span class="n">newloc</span><span class="p">):</span>
    <span class="n">gdf</span><span class="p">.</span><span class="n">at</span><span class="p">[</span><span class="n">ix</span><span class="p">,</span> <span class="s">'location'</span><span class="p">]</span> <span class="o">=</span> <span class="n">newloc</span>
    <span class="n">gdf</span><span class="p">.</span><span class="n">loc</span><span class="p">[</span><span class="n">ix</span><span class="p">,</span> <span class="s">'latitude'</span><span class="p">]</span> <span class="o">=</span> <span class="n">newloc</span><span class="p">.</span><span class="n">latitude</span>
    <span class="n">gdf</span><span class="p">.</span><span class="n">loc</span><span class="p">[</span><span class="n">ix</span><span class="p">,</span> <span class="s">'longitude'</span><span class="p">]</span> <span class="o">=</span> <span class="n">newloc</span><span class="p">.</span><span class="n">longitude</span>
    <span class="c1"># Re-code the lat/lon into a point
</span>    <span class="n">gdf</span><span class="p">.</span><span class="n">loc</span><span class="p">[</span><span class="n">ix</span><span class="p">,</span> <span class="s">'geometry'</span><span class="p">]</span> <span class="o">=</span> <span class="n">shapely</span><span class="p">.</span><span class="n">geometry</span><span class="p">.</span><span class="n">Point</span><span class="p">(</span><span class="n">gdf</span><span class="p">.</span><span class="n">loc</span><span class="p">[</span><span class="n">ix</span><span class="p">,</span> <span class="s">'longitude'</span><span class="p">],</span> <span class="n">gdf</span><span class="p">.</span><span class="n">loc</span><span class="p">[</span><span class="n">ix</span><span class="p">,</span> <span class="s">'latitude'</span><span class="p">])</span>

<span class="c1"># My original Joplin campground coded somewhere in West Virginia
</span><span class="n">ix</span> <span class="o">=</span> <span class="mi">28</span>
<span class="n">newloc</span> <span class="o">=</span> <span class="n">geocode</span><span class="p">(</span><span class="s">'joplin campground'</span><span class="p">)</span>
<span class="n">update_loc</span><span class="p">(</span><span class="n">ix</span><span class="p">,</span> <span class="n">newloc</span><span class="p">)</span>

<span class="c1"># Wyoming ('wy') got read in as "way", so these two are in the wrong place
</span><span class="n">ix</span> <span class="o">=</span> <span class="mi">73</span>
<span class="n">newloc</span> <span class="o">=</span> <span class="n">geocode</span><span class="p">(</span><span class="s">'sundance wyoming'</span><span class="p">)</span>
<span class="n">update_loc</span><span class="p">(</span><span class="n">ix</span><span class="p">,</span> <span class="n">newloc</span><span class="p">)</span>

<span class="n">ix</span> <span class="o">=</span> <span class="mi">76</span>
<span class="n">newloc</span> <span class="o">=</span> <span class="n">geocode</span><span class="p">(</span><span class="s">'cody wyoming'</span><span class="p">)</span>
<span class="n">update_loc</span><span class="p">(</span><span class="n">ix</span><span class="p">,</span> <span class="n">newloc</span><span class="p">)</span>
</code></pre></div></div>

<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1"># Re-try plotting!
# Plot the USA
</span><span class="n">ax</span> <span class="o">=</span> <span class="n">usa</span><span class="p">.</span><span class="n">boundary</span><span class="p">.</span><span class="n">plot</span><span class="p">()</span>
<span class="c1"># Overlay my point locations
</span><span class="n">gdf</span><span class="p">.</span><span class="n">plot</span><span class="p">(</span><span class="n">ax</span><span class="o">=</span><span class="n">ax</span><span class="p">)</span>
</code></pre></div></div>

<p><img src="/images/2020-01-29.road_trip_map_files/2020-01-29.road_trip_map_32_1.png" alt="png" /></p>

<p>Yes! No more side-trips to Argentina (alas). Okay, now that I have everything set up to make this map, let’s work on making it prettier! I have two main goals here, beyond simple aesthetics:</p>

<ol>
  <li>Add a more informative background map</li>
  <li>Connect the dots with lines, showing my actual trajectory</li>
</ol>

<p>I have a pretty good idea of how to do #1, since I’ve been recently playing around with <a href="https://github.com/darribas/contextily">contextily</a> for adding basemaps. It was a bit of pain to install (I needed to play around with setting conda channel priorities), but now that I have it working it’s extremely useful.</p>

<p>For #2, I’ll need to do some significant wrangling with shapely to convert subsequent points into lines.</p>

<h2 id="adding-a-background-map">Adding a background map</h2>

<p>Let’s start with #1! I’ll first need to set the projection of my current data to the <a href="https://en.wikipedia.org/wiki/World_Geodetic_System">WGS84 projection (EPSG:4326)</a>, which is what latitude and longitudes are encoded in. For those of y’all not used to working with maps, projections are basically different ways of encoding 3D information (i.e. the Earth) onto a 2D space (i.e. a computer screen). You’ve heard of this before certainly, the <a href="https://en.wikipedia.org/wiki/Mercator_projection">Mercator projection</a> is the one that makes Greenland look huge and Africa look tiny. There is lots of scholarship and internet debate on different projections, I’m sure, so I won’t even start down that rabbit hole! (Though if you are gonna start down this rabbit hole, I recommend looking into how different map projections change how we view the world, and contribute to colonialism by emphasizing some geographies over others).</p>

<p>Anyway. Mostly what I know is how to work with projections in order to get the maps that I need out of my code.</p>

<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1"># Set the projection to WGS84
</span><span class="n">gdf</span><span class="p">.</span><span class="n">crs</span> <span class="o">=</span> <span class="p">{</span><span class="s">'init'</span><span class="p">:</span> <span class="s">'epsg:4326'</span><span class="p">}</span>
<span class="c1"># Modify projection to match what contextily uses
</span><span class="n">gdf</span> <span class="o">=</span> <span class="n">gdf</span><span class="p">.</span><span class="n">to_crs</span><span class="p">(</span><span class="n">epsg</span><span class="o">=</span><span class="mi">3857</span><span class="p">)</span>
</code></pre></div></div>

<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1"># Plot the points
</span><span class="n">ax</span> <span class="o">=</span> <span class="n">gdf</span><span class="p">.</span><span class="n">plot</span><span class="p">(</span><span class="n">figsize</span><span class="o">=</span><span class="p">(</span><span class="mi">10</span><span class="p">,</span> <span class="mi">5</span><span class="p">))</span>

<span class="c1"># Add basemap
</span><span class="n">ctx</span><span class="p">.</span><span class="n">add_basemap</span><span class="p">(</span><span class="n">ax</span><span class="o">=</span><span class="n">ax</span><span class="p">)</span>
</code></pre></div></div>

<p><img src="/images/2020-01-29.road_trip_map_files/2020-01-29.road_trip_map_35_0.png" alt="png" /></p>

<p>Wowza, our first map!! Though I’d like to have the state outlines on this map as well. It’ll give some structure to the map, and also expand it to the whole US rather than just the band that I visited. From a quick google, seems that <a href="https://www.arcgis.com/home/item.html?id=f7f805eb65eb4ab787a0a3e1116ca7e5">this file</a> should do the trick.</p>

<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">states</span> <span class="o">=</span> <span class="n">gpd</span><span class="p">.</span><span class="n">read_file</span><span class="p">(</span><span class="s">'shapefiles/states.shp'</span><span class="p">)</span>
<span class="c1"># Keep only the 50 continental states
</span><span class="n">dropstates</span> <span class="o">=</span> <span class="p">[</span><span class="s">'Hawaii'</span><span class="p">,</span> <span class="s">'Alaska'</span><span class="p">]</span>
<span class="n">states</span> <span class="o">=</span> <span class="n">states</span><span class="p">.</span><span class="n">query</span><span class="p">(</span><span class="s">'STATE_NAME != @dropstates'</span><span class="p">)</span>

<span class="c1"># Convert states to the right projection for contextily
</span><span class="n">states</span> <span class="o">=</span> <span class="n">states</span><span class="p">.</span><span class="n">to_crs</span><span class="p">(</span><span class="n">epsg</span><span class="o">=</span><span class="mi">3857</span><span class="p">)</span>
<span class="n">states</span><span class="p">.</span><span class="n">head</span><span class="p">()</span>
</code></pre></div></div>

<div>
<style scoped="">
    .dataframe tbody tr th:only-of-type {
        vertical-align: middle;
    }

    .dataframe tbody tr th {
        vertical-align: top;
    }

    .dataframe thead th {
        text-align: right;
    }
</style>
<table border="1" class="dataframe">
  <thead>
    <tr style="text-align: right;">
      <th></th>
      <th>STATE_NAME</th>
      <th>DRAWSEQ</th>
      <th>STATE_FIPS</th>
      <th>SUB_REGION</th>
      <th>STATE_ABBR</th>
      <th>geometry</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>1</td>
      <td>Washington</td>
      <td>2</td>
      <td>53</td>
      <td>Pacific</td>
      <td>WA</td>
      <td>MULTIPOLYGON (((-13625730.016 6144404.934, -13...</td>
    </tr>
    <tr>
      <td>2</td>
      <td>Montana</td>
      <td>3</td>
      <td>30</td>
      <td>Mountain</td>
      <td>MT</td>
      <td>POLYGON ((-12409387.580 5574754.285, -12409986...</td>
    </tr>
    <tr>
      <td>3</td>
      <td>Maine</td>
      <td>4</td>
      <td>23</td>
      <td>New England</td>
      <td>ME</td>
      <td>MULTIPOLYGON (((-7767570.862 5476923.993, -777...</td>
    </tr>
    <tr>
      <td>4</td>
      <td>North Dakota</td>
      <td>5</td>
      <td>38</td>
      <td>West North Central</td>
      <td>ND</td>
      <td>POLYGON ((-10990622.005 5770462.676, -11021390...</td>
    </tr>
    <tr>
      <td>5</td>
      <td>South Dakota</td>
      <td>6</td>
      <td>46</td>
      <td>West North Central</td>
      <td>SD</td>
      <td>POLYGON ((-11442350.599 5311256.999, -11466561...</td>
    </tr>
  </tbody>
</table>
</div>

<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1"># Re-plot everything, adding on the state outlines
</span><span class="n">fig</span><span class="p">,</span> <span class="n">ax</span> <span class="o">=</span> <span class="n">plt</span><span class="p">.</span><span class="n">subplots</span><span class="p">(</span><span class="n">figsize</span><span class="o">=</span><span class="p">(</span><span class="mi">10</span><span class="p">,</span> <span class="mi">5</span><span class="p">))</span>

<span class="c1"># Plot the outlines
</span><span class="n">states</span><span class="p">.</span><span class="n">boundary</span><span class="p">.</span><span class="n">plot</span><span class="p">(</span><span class="n">color</span><span class="o">=</span><span class="s">'black'</span><span class="p">,</span> <span class="n">linewidth</span><span class="o">=</span><span class="mf">0.5</span><span class="p">,</span> <span class="n">ax</span><span class="o">=</span><span class="n">ax</span><span class="p">)</span>

<span class="c1"># Plot the points
</span><span class="n">gdf</span><span class="p">.</span><span class="n">plot</span><span class="p">(</span><span class="n">ax</span><span class="o">=</span><span class="n">ax</span><span class="p">)</span>

<span class="c1"># Add basemap
</span><span class="n">ctx</span><span class="p">.</span><span class="n">add_basemap</span><span class="p">(</span><span class="n">ax</span><span class="o">=</span><span class="n">ax</span><span class="p">)</span>

<span class="c1"># Remove axes
</span><span class="n">ax</span><span class="p">.</span><span class="n">set_axis_off</span><span class="p">()</span>
</code></pre></div></div>

<p><img src="/images/2020-01-29.road_trip_map_files/2020-01-29.road_trip_map_38_0.png" alt="png" /></p>

<p>Ah! There it is!!! It’s my road trip!!!</p>

<p>Okay, before I dive into making trajectories, can I just color each point by their day on my trip? I sometimes have multiple entries per day, so I’ll need to create a map from day to number. I’ll just increment each day that I wrote down, regardless of whether they’re consecutive days or not. Since I’m just going to visualize the day using colors, all I care about is the relative days.</p>

<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">gdf</span> <span class="o">=</span> <span class="n">gdf</span><span class="p">.</span><span class="n">sort_values</span><span class="p">(</span><span class="n">by</span><span class="o">=</span><span class="s">'day'</span><span class="p">)</span>

<span class="n">days</span> <span class="o">=</span> <span class="n">gdf</span><span class="p">[</span><span class="s">'day'</span><span class="p">].</span><span class="n">unique</span><span class="p">()</span>
<span class="n">daysdict</span> <span class="o">=</span> <span class="nb">dict</span><span class="p">(</span><span class="nb">zip</span><span class="p">(</span><span class="n">days</span><span class="p">,</span> <span class="nb">range</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">days</span><span class="p">))))</span>

<span class="c1"># Use dict to map into column
</span><span class="n">gdf</span><span class="p">[</span><span class="s">'day_number'</span><span class="p">]</span> <span class="o">=</span> <span class="n">gdf</span><span class="p">[</span><span class="s">'day'</span><span class="p">].</span><span class="nb">map</span><span class="p">(</span><span class="n">daysdict</span><span class="p">)</span>
</code></pre></div></div>

<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1"># Re-plot everything, adding on the state outlines
</span><span class="n">fig</span><span class="p">,</span> <span class="n">ax</span> <span class="o">=</span> <span class="n">plt</span><span class="p">.</span><span class="n">subplots</span><span class="p">(</span><span class="n">figsize</span><span class="o">=</span><span class="p">(</span><span class="mi">10</span><span class="p">,</span> <span class="mi">5</span><span class="p">))</span>

<span class="c1"># Plot the outlines
</span><span class="n">states</span><span class="p">.</span><span class="n">boundary</span><span class="p">.</span><span class="n">plot</span><span class="p">(</span><span class="n">color</span><span class="o">=</span><span class="s">'black'</span><span class="p">,</span> <span class="n">linewidth</span><span class="o">=</span><span class="mf">0.5</span><span class="p">,</span> <span class="n">ax</span><span class="o">=</span><span class="n">ax</span><span class="p">)</span>

<span class="c1"># Plot the points
</span><span class="n">gdf</span><span class="p">.</span><span class="n">plot</span><span class="p">(</span><span class="n">ax</span><span class="o">=</span><span class="n">ax</span><span class="p">,</span> <span class="n">column</span><span class="o">=</span><span class="s">'day_number'</span><span class="p">)</span>

<span class="c1"># Add basemap
</span><span class="n">ctx</span><span class="p">.</span><span class="n">add_basemap</span><span class="p">(</span><span class="n">ax</span><span class="o">=</span><span class="n">ax</span><span class="p">)</span>

<span class="c1"># Remove axes
</span><span class="n">ax</span><span class="p">.</span><span class="n">set_axis_off</span><span class="p">()</span>
</code></pre></div></div>

<p><img src="/images/2020-01-29.road_trip_map_files/2020-01-29.road_trip_map_41_0.png" alt="png" /></p>

<h2 id="converting-points-to-trajectories">Converting points to trajectories</h2>

<p>Ok, now to convert these points into actual lines corresponding to my travels. I’ll make two lines: one for the first part of my trip (San Diego to Boston), and one for the second (Boston to San Diego, with lots of fun detours in between).</p>

<p>First, I need to sort my trip by day. Because on some days I wrote down multiple mileages, I also need to sort by time of day. I’ll do this by setting my <code class="language-plaintext highlighter-rouge">time</code> column as an ordered categorical, since I only tracked the rough time of day (i.e. “morning” and “night”).</p>

<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1"># Set the column as categorical type
</span><span class="n">gdf</span><span class="p">[</span><span class="s">'time'</span><span class="p">]</span> <span class="o">=</span> <span class="n">gdf</span><span class="p">[</span><span class="s">'time'</span><span class="p">].</span><span class="n">astype</span><span class="p">(</span><span class="s">'category'</span><span class="p">)</span>
<span class="c1"># Manually specify the order
</span><span class="n">order</span> <span class="o">=</span> <span class="p">[</span><span class="s">'morning'</span><span class="p">,</span> <span class="s">'midday'</span><span class="p">,</span> <span class="s">'afternoon'</span><span class="p">,</span> <span class="s">'evening'</span><span class="p">,</span> <span class="s">'night'</span><span class="p">,</span> <span class="s">'allday'</span><span class="p">]</span>

<span class="c1"># Set categories as ordered dtype
</span><span class="n">gdf</span><span class="p">[</span><span class="s">'time'</span><span class="p">].</span><span class="n">cat</span><span class="p">.</span><span class="n">set_categories</span><span class="p">(</span><span class="n">order</span><span class="p">,</span> <span class="n">ordered</span><span class="o">=</span><span class="bp">True</span><span class="p">,</span> <span class="n">inplace</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
<span class="n">gdf</span><span class="p">[</span><span class="s">'time'</span><span class="p">].</span><span class="n">head</span><span class="p">()</span>
</code></pre></div></div>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>0     midday
1      night
2     midday
3    evening
4      night
Name: time, dtype: category
Categories (6, object): [morning &lt; midday &lt; afternoon &lt; evening &lt; night &lt; allday]
</code></pre></div></div>

<p>You can see above that the data type of this column is now a category, ordered like this: <code class="language-plaintext highlighter-rouge">[morning &lt; midday &lt; afternoon &lt; evening &lt; night &lt; allday]</code>.</p>

<p>Now, let’s convert all of my points into two lines corresponding to the two parts of the trip:</p>

<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1"># Get line of first part of trip
</span><span class="n">part1</span> <span class="o">=</span> <span class="n">shapely</span><span class="p">.</span><span class="n">geometry</span><span class="p">.</span><span class="n">LineString</span><span class="p">(</span>
    <span class="n">gdf</span><span class="p">.</span><span class="n">query</span><span class="p">(</span><span class="s">'part == 1'</span><span class="p">).</span><span class="n">sort_values</span><span class="p">(</span><span class="n">by</span><span class="o">=</span><span class="p">[</span><span class="s">'day'</span><span class="p">,</span> <span class="s">'time'</span><span class="p">])[</span><span class="s">'geometry'</span><span class="p">].</span><span class="n">values</span>
<span class="p">)</span>
<span class="n">display</span><span class="p">(</span><span class="n">part1</span><span class="p">)</span>

<span class="n">part2</span> <span class="o">=</span> <span class="n">shapely</span><span class="p">.</span><span class="n">geometry</span><span class="p">.</span><span class="n">LineString</span><span class="p">(</span>
    <span class="n">gdf</span><span class="p">.</span><span class="n">query</span><span class="p">(</span><span class="s">'part == 2'</span><span class="p">).</span><span class="n">sort_values</span><span class="p">(</span><span class="n">by</span><span class="o">=</span><span class="p">[</span><span class="s">'day'</span><span class="p">,</span> <span class="s">'time'</span><span class="p">])[</span><span class="s">'geometry'</span><span class="p">].</span><span class="n">values</span>
<span class="p">)</span>

<span class="n">display</span><span class="p">(</span><span class="n">part2</span><span class="p">)</span>
</code></pre></div></div>

<p><img src="/images/2020-01-29.road_trip_map_files/2020-01-29.road_trip_map_45_0.svg" alt="svg" /></p>

<p><img src="/images/2020-01-29.road_trip_map_files/2020-01-29.road_trip_map_45_1.svg" alt="svg" /></p>

<p>Wow, that was easier than I thought! Now, let’s figure out how to overlay these lines onto my map.</p>

<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1"># Make a geodataframe with the two parts of my trip
</span><span class="n">linegdf</span> <span class="o">=</span> <span class="n">gpd</span><span class="p">.</span><span class="n">GeoDataFrame</span><span class="p">(</span>
    <span class="p">{</span><span class="s">'geometry'</span><span class="p">:</span> <span class="p">[</span><span class="n">part1</span><span class="p">,</span> <span class="n">part2</span><span class="p">],</span>
     <span class="s">'trip_part'</span><span class="p">:</span> <span class="p">[</span><span class="s">'part1'</span><span class="p">,</span> <span class="s">'part2'</span><span class="p">]}</span>
<span class="p">)</span>
</code></pre></div></div>

<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1"># Make the plot
</span><span class="n">fig</span><span class="p">,</span> <span class="n">ax</span> <span class="o">=</span> <span class="n">plt</span><span class="p">.</span><span class="n">subplots</span><span class="p">(</span><span class="n">figsize</span><span class="o">=</span><span class="p">(</span><span class="mi">15</span><span class="p">,</span> <span class="mi">10</span><span class="p">))</span>

<span class="c1"># Plot the state outlines
</span><span class="n">states</span><span class="p">.</span><span class="n">boundary</span><span class="p">.</span><span class="n">plot</span><span class="p">(</span><span class="n">color</span><span class="o">=</span><span class="s">'black'</span><span class="p">,</span> <span class="n">linewidth</span><span class="o">=</span><span class="mf">0.5</span><span class="p">,</span> <span class="n">ax</span><span class="o">=</span><span class="n">ax</span><span class="p">)</span>

<span class="c1">## Plot Part 1 of the trip
</span>
<span class="c1"># I'm getting an error when I pass in the tuple, not sure why
</span><span class="n">c</span> <span class="o">=</span> <span class="n">to_hex</span><span class="p">(</span><span class="n">sns</span><span class="p">.</span><span class="n">light_palette</span><span class="p">(</span><span class="s">'green'</span><span class="p">)[</span><span class="mi">0</span><span class="p">])</span>

<span class="c1"># Plot line
</span><span class="n">linegdf</span><span class="p">.</span><span class="n">query</span><span class="p">(</span><span class="s">'trip_part == "part1"'</span><span class="p">).</span><span class="n">plot</span><span class="p">(</span>
    <span class="n">color</span><span class="o">=</span><span class="n">c</span><span class="p">,</span>
    <span class="n">linewidth</span><span class="o">=</span><span class="mi">3</span><span class="p">,</span>
    <span class="n">ax</span><span class="o">=</span><span class="n">ax</span>
<span class="p">)</span>

<span class="c1"># Plot points colored by day
</span><span class="n">gdf</span><span class="p">.</span><span class="n">query</span><span class="p">(</span><span class="s">'part == 1'</span><span class="p">).</span><span class="n">plot</span><span class="p">(</span>
    <span class="n">column</span><span class="o">=</span><span class="s">'day_number'</span><span class="p">,</span>
    <span class="n">cmap</span><span class="o">=</span><span class="n">sns</span><span class="p">.</span><span class="n">light_palette</span><span class="p">(</span><span class="s">'green'</span><span class="p">,</span> <span class="n">as_cmap</span><span class="o">=</span><span class="bp">True</span><span class="p">),</span>
    <span class="n">ax</span><span class="o">=</span><span class="n">ax</span><span class="p">,</span>
    <span class="n">markersize</span><span class="o">=</span><span class="mi">50</span><span class="p">,</span>
    <span class="n">edgecolor</span><span class="o">=</span><span class="s">'black'</span><span class="p">,</span> <span class="n">linewidth</span><span class="o">=</span><span class="mf">0.5</span><span class="p">,</span>
    <span class="n">zorder</span><span class="o">=</span><span class="mi">1000</span> <span class="c1"># force the points to be the top layer of the plot
</span><span class="p">)</span>

<span class="c1">## Part 2
</span><span class="n">c</span> <span class="o">=</span> <span class="n">to_hex</span><span class="p">(</span><span class="n">sns</span><span class="p">.</span><span class="n">light_palette</span><span class="p">(</span><span class="s">'purple'</span><span class="p">)[</span><span class="mi">0</span><span class="p">])</span>

<span class="c1"># Plot line
</span><span class="n">linegdf</span><span class="p">.</span><span class="n">query</span><span class="p">(</span><span class="s">'trip_part == "part2"'</span><span class="p">).</span><span class="n">plot</span><span class="p">(</span>
    <span class="n">color</span><span class="o">=</span><span class="n">c</span><span class="p">,</span>
    <span class="n">linewidth</span><span class="o">=</span><span class="mi">3</span><span class="p">,</span>
    <span class="n">ax</span><span class="o">=</span><span class="n">ax</span>
<span class="p">)</span>

<span class="c1"># Plot points colored by day
</span><span class="n">gdf</span><span class="p">.</span><span class="n">query</span><span class="p">(</span><span class="s">'part == 2'</span><span class="p">).</span><span class="n">plot</span><span class="p">(</span>
    <span class="n">column</span><span class="o">=</span><span class="s">'day_number'</span><span class="p">,</span>
    <span class="n">cmap</span><span class="o">=</span><span class="n">sns</span><span class="p">.</span><span class="n">light_palette</span><span class="p">(</span><span class="s">'purple'</span><span class="p">,</span> <span class="n">as_cmap</span><span class="o">=</span><span class="bp">True</span><span class="p">),</span>
    <span class="n">ax</span><span class="o">=</span><span class="n">ax</span><span class="p">,</span>
    <span class="n">markersize</span><span class="o">=</span><span class="mi">50</span><span class="p">,</span>
    <span class="n">edgecolor</span><span class="o">=</span><span class="s">'black'</span><span class="p">,</span> <span class="n">linewidth</span><span class="o">=</span><span class="mf">0.5</span><span class="p">,</span>
    <span class="n">zorder</span><span class="o">=</span><span class="mi">1000</span> <span class="c1"># force the points to be the top layer of the plot
</span><span class="p">)</span>

<span class="c1"># Add basemap
</span><span class="n">ctx</span><span class="p">.</span><span class="n">add_basemap</span><span class="p">(</span><span class="n">ax</span><span class="o">=</span><span class="n">ax</span><span class="p">)</span>

<span class="c1"># Remove axes
</span><span class="n">ax</span><span class="p">.</span><span class="n">set_axis_off</span><span class="p">()</span>
</code></pre></div></div>

<p><img src="/images/2020-01-29.road_trip_map_files/2020-01-29.road_trip_map_48_0.png" alt="png" /></p>

<p>Ah it’s so beautiful!! Let me tell you a little bit more about what you’re seeing:</p>

<p>For the first part of my trip, I went from San Diego to Austin in about a week. Then, I headed to New Orleans to meet Ben, and we drove from New Orleans to Atlanta (I did a bad job of tracking things during this time). Then, through a comical series of events, we ended up driving back to Boston from Atlanta in about two days. You can see the straight shot from Georgia to Pennsylvania, which is that part (we stayed with his sister in Philly as our one stop).</p>

<p>In Part 2, Ben and I drove straight down to Nashville (with the Philly pit stop again, thanks Micah!) I went to Ithaca for a <a href="https://cduvallet.github.io/mbiome-data-viz/">hackathon</a> (not shown here, because I flew and therefore accrued zero mileage) and Ben went back to Boston. Then I headed to Memphis for an amazing dinner with live music, and then made my way West to Utah. The little spike you see in Arkansas was when I tried to go to the Ozarks, but it was raining (and I had to drive through at least 6 inches of water to get out of my campground oops), so I made last-minute changes and headed to Hot Springs to have a nice soak. Similarly, the upshot into Colorado after Texas was when I realized that Great Sand Dunes National Park was actually not a huge detour from my current path, and that I wouldn’t have another good time to go there. Then I headed down to El Malpais (awesome place), Flagstaff to see the <a href="https://qiime2.org/">QIIME 2</a> team, and then up to the best two weeks of my trip: the national lands bonanza that is northern Arizona and Utah. You can see how my trajectory went north to the Grand Canyon, then east to get around the canyon and back west to hit Zion. Then I made my way through amazing Utah, through Bryce and Grand Staircase Escalante, until I finally headed to Denver to meet up with Ben. Denver has a lot of back-and-forth: Ben and I went into the mountains for the weekend and then came back to Denver, and I also had to spend an extra day in town to watch Nathaniel’s defense and figure out some job stuff (after spending the night in the prairie about two hours away). Then I headed up to Badlands in South Dakota, Yellowstone in Wyoming, and met up with Janyne and some friends in Nevada Catnip Reservoir. After that, the home stretch was just California: Susanville with Janyne, SF with Jeremy and my brothers, and finally back down to San Diego.</p>

<p>It’s awesome how looking at this map makes it so easy to remember each little part of my trip! I love it. :D</p>

<p>I’m going to go ahead and post this map as-is, even though there’s lots of ways I’d want to improve it. For example, I’d love to be able to see more clearly what day each part of the trip corresponded to, since there were some days where I drove <em>huge</em> distances and others when I got to stay and play where I was. Maybe I’ll try to cross-reference this map with my spreadsheet where I tracked the camps I stayed at. Or perhaps I’ll do the manual work of geocoding the camps directly, but that is a bit more work than here because I wasn’t very specific (e.g. when I stayed at my friend Jettie’s house in Austin, I wrote down “Jettie’s house” - which I really hope the geocoder won’t be able to find!)</p>

<p>Also, maybe the next step on this map is to make it interactive… I’ve recently learned about <a href="https://python-visualization.github.io/folium/">folium</a>, which seems to be a super easy way to make interactive maps. Hopefully I find time to give it a go!</p>]]></content><author><name>Aurore Gonzalez</name><email>auroregonzalez@g.harvard.edu</email></author><category term="road-trip" /><category term="travel" /><category term="python" /><category term="geopandas" /><summary type="html"><![CDATA[When I was on my cross-country road trip last year, I kept track of a lot of things in the hopes of doing amazing analyses when I got back. Turns out having a job as a data scientist makes it a lot harder to find time to do data science on the side, and so I’ve only really gotten a chance to look into my expenses. One of the things I had really wanted to do was make a map of all the places I went, but I didn’t actually know how to work with geospatial data in Python yet. I had this grand idea that I’d learn spatial data techniques while on my trip, but turns out hiking, drinking beer while watching the sunset, and going to bed early were way more compelling ways to spend my time. Luckily for me, one of the most fun parts of my new job has been learning geospatial coding and plotting techniques. I’ve been having fun with it in my job, and I realized that it also means I get to finally make my map!]]></summary></entry><entry><title type="html">A Well-Kept Secret for Finding a Job post-PhD</title><link href="https://auroregonzalez.github.io/posts/2020/01/phd-job-search" rel="alternate" type="text/html" title="A Well-Kept Secret for Finding a Job post-PhD" /><published>2020-01-25T00:00:00-08:00</published><updated>2020-01-25T00:00:00-08:00</updated><id>https://auroregonzalez.github.io/posts/2020/01/job-search-thoughts</id><content type="html" xml:base="https://auroregonzalez.github.io/posts/2020/01/phd-job-search"><![CDATA[<p>During my PhD, I performed a lot of exit interviews with graduating students and learned that finding a job is often the most stressful part of graduating, and among the most stressful in the entire PhD. After my own defense, however, I was able to avoid some of that stress by discovering a valuable post-PhD job option that I had rarely heard discussed: getting a part-time or consulting gig after graduating to hold you over while you figure out your next full-time non-academic career move.</p>

<p>From my exit interviews, I had learned about the two most common strategies for figuring out your post-PhD (non-academic) career:</p>

<p><strong>Strategy #1. Figure out what you want to do and find a job while you’re also frantically finishing up your thesis.</strong> This is common, and also by far the trickiest strategy to implement. Figuring out what you want to do is a pretty heavy existential activity, and piling that on top of the stress of finishing up your degree is really tough. Even if you have a clear and easy path to your defense, defending is still a stressful time, and trying to do some serious soul-searching on top of it really takes a toll.</p>

<p><strong>Strategy #2. Stay on as a postdoc in your lab after you finish, wrapping up PhD work and poking around for jobs more leisurely.</strong> While this works for a lot of people, it isn’t always the best option. For example, if you don’t have a good relationship with your PI, you might risk feeling — or getting — “trapped” until you’ve gone through even more of their hoops. And even if you do have a great relationship with your PI, maybe you’re just really over grad school. Staying on in the same environment might burn you out to the point that you won’t be productive or motivated to advance your career. And let’s be honest: being a postdoc is a pay bump from grad school, but not by much.</p>

<p>At the end of grad school, I had all but secured an offer from a former labmate to join her startup in a position that was basically my dream job, so I didn’t really go through a legit job search before my defense. But then, a few months into my post-PhD travels, the job offer became less certain and I had to get back on the job market. That’s when I discovered this third option no one ever talks about.</p>

<p><strong>Strategy #3. Line up a part-time and/or consulting gig after your PhD, and use that well-paid and flexible time to figure out what’s next.</strong> It turns out it’s entirely possible to find companies hiring PhDs part-time — either because they aren’t ready to hire someone full-time, or because they hope they’ll be able to convert you to a full-time hire. With a consulting gig, you could find a halftime job where you’re making twice the rate you did as a grad student. This gives you some room to really explore your options and think about what you want to do next. Plus, you’ll gain new skills, build your network, and get a fresh perspective away from MIT.</p>

<p>In my case, the original job offer actually ended up working out after all, so I didn’t end up taking any of my short-term offers. But I found this short-term consulting option so amazing: as soon as I realized this was possible, all of my stress about finding a job disappeared. I recognize that I speak from a place of privilege, and that this option is not available to everybody. It might not be possible to go this route because of visa concerns, health insurance requirements, or financial constraints outside of the PhD. I also had a skill set and field of study that is in high demand, and so I certainly have a rosy view of how “easy” it is to get these positions.</p>

<p>However, I do think there are some things I (unknowingly) did during my PhD that led to me finding this third option viable. If you’re interested in potentially pursuing the short-term gig route, here’s what I think might be helpful:</p>

<p><strong>Build a specific skillset that someone can hire you for, which allows you to get Something Done Now.</strong> It could be a technique that only you know how to do, or a specific tool that companies might need someone to make ASAP. For example, some specific biological assays might be in high demand, or being able to use specialized imaging tools might make you highly desirable. I’ve also had friends get consulting gigs where they design or review complex experiments they had expertise in because of their PhD research.</p>

<p>Your skillset could also be something broader, like data science or software development. If you’re marketing your broad skillset, it’s likely easier to find positions where you’re being asked to do something directly related to your thesis. In my case, this skillset was microbiome data analysis. I was confident I could find consulting work in the microbiome field, and the part-time job offer I secured was also related to my expertise in computational biology.</p>

<p><strong>During your PhD, build your network with an eye toward future consulting.</strong> I never really understood networking, and didn’t particularly try during my PhD because I never knew what I “wanted” out of it. Turns out networking just means “get to know and become friendly with lots of people” so that you can reach out to them later when you do know what you want. And it also turned out that I had done that through my PhD by being president of the Microbiome Club, organizing a conference, being active on Twitter, and just generally getting to know my department and my scientific community.</p>

<p>When my job offer fell through, I was fairly confident I could get consulting offers from two companies the next week. One from my PI’s company, and one from a competitor I had met at multiple conferences and had kept up with via Twitter. If your PI has a company, make sure you get to know what they’re doing, who they are (beyond what your PI tells you), and set the stage for joining them as a consultant. If you interact with companies throughout your PhD, float the idea of consulting regardless of how far away from graduating you are. Internships aren’t usually an option during grad school, and many PIs don’t support consulting on the side, but there’s no rule against consulting for interested companies as soon as you graduate and no one can stop you!</p>

<p><strong>Broadcast your availability to everyone (AKA be loud and desperate).</strong> I came back for Commencement week, mentioned that I was suddenly unemployed and looking for part-time work, and got a job offer by the time I left for another trip the following week. Chances are, your peers are probably also looking for similar jobs and might have rejected an offer that might be good enough for you temporarily. Also, don’t be afraid to ask companies for part-time, temporary positions. I interviewed for a company that desperately needed more people, and I got virtually no pushback when I asked for a part-time gig.</p>

<p><strong>Don’t be picky.</strong> This is a temporary stop-gap, not your dream job. You don’t need to love the mission or even the people, you just need something to tide you over until you do find that perfect fit. I had no interest in working in the microbiome field after I graduated, but I was willing to do it for the quick and easy cash. Plus, if you find a job that is easy and that you’re good at, it’ll give you even more time to figure out your next career move.</p>

<p>I saw a lot of PhD students really struggle through their last six months, in large part because of the stress of finding a job. But I never heard about the option of finding a temporary way to make money that frees up your time so you can explore options and make a strategic career move. As more students recognize the need to prepare for non-academic careers during their PhD, I hope this option becomes a normal part of the conversation. Tell all your friends!</p>

<p><em>This post was first published on the <a href="https://gradadmissions.mit.edu/blog/well-kept-secret-finding-job-post-phd">MIT Graduate Admissions blog</a>.</em></p>]]></content><author><name>Aurore Gonzalez</name><email>auroregonzalez@g.harvard.edu</email></author><category term="phd" /><summary type="html"><![CDATA[During my PhD, I performed a lot of exit interviews with graduating students and learned that finding a job is often the most stressful part of graduating, and among the most stressful in the entire PhD. After my own defense, however, I was able to avoid some of that stress by discovering a valuable post-PhD job option that I had rarely heard discussed: getting a part-time or consulting gig after graduating to hold you over while you figure out your next full-time non-academic career move.]]></summary></entry><entry><title type="html">Data detectives, self-love, and humility - a research parasite’s perspective</title><link href="https://auroregonzalez.github.io/posts/2020/01/research-parasite-paper" rel="alternate" type="text/html" title="Data detectives, self-love, and humility - a research parasite’s perspective" /><published>2020-01-03T00:00:00-08:00</published><updated>2020-01-03T00:00:00-08:00</updated><id>https://auroregonzalez.github.io/posts/2020/01/research-parasite-editorial</id><content type="html" xml:base="https://auroregonzalez.github.io/posts/2020/01/research-parasite-paper"><![CDATA[<p>As the 2019 <a href="http://researchparasite.com/">Research Parasite</a> Junior Parasite award recipient, GigaScience asked me to share some thoughts on life as a research parasite - tips and philosophies on doing open and reproducible science as a PhD student. The <a href="https://doi.org/10.1093/gigascience/giz148">resulting piece</a> is now published!</p>

<p>I had a lot of fun combining some of the topics I talked about in my <a href="https://cduvallet.github.io/phdchat-philosophies/">“PhD Chat” talk</a> at my lab summit, plus some that I mentioned in my <a href="/posts/2019/12/research-parasite">award speech</a> into this commentary.</p>

<p>Check it out, hope you enjoy it!</p>

<p>“Data detectives, self-love, and humility: a research parasite’s perspective.” <em>GigaScience</em> 2020. doi: <a href="https://doi.org/10.1093/gigascience/giz148">10.1093/gigascience/giz148</a>.</p>]]></content><author><name>Aurore Gonzalez</name><email>auroregonzalez@g.harvard.edu</email></author><category term="computing" /><category term="PhD" /><summary type="html"><![CDATA[As the 2019 Research Parasite Junior Parasite award recipient, GigaScience asked me to share some thoughts on life as a research parasite - tips and philosophies on doing open and reproducible science as a PhD student. The resulting piece is now published!]]></summary></entry><entry><title type="html">Junior Research Parasite Award Speech (Jan 2019)</title><link href="https://auroregonzalez.github.io/posts/2019/12/research-parasite" rel="alternate" type="text/html" title="Junior Research Parasite Award Speech (Jan 2019)" /><published>2019-12-25T00:00:00-08:00</published><updated>2019-12-25T00:00:00-08:00</updated><id>https://auroregonzalez.github.io/posts/2019/12/research-parasite-speech</id><content type="html" xml:base="https://auroregonzalez.github.io/posts/2019/12/research-parasite"><![CDATA[<p><em>The following is a copy of the short speech I gave upon receiving the 2019 Junior <a href="http://researchparasite.com/">Research Parasite Award</a> this past January.</em></p>

<p>Thanks Casey. The <a href="https://www.nature.com/articles/s41467-017-01973-8">paper</a> that I submitted for this award was a meta-analysis of 28 gut microbiome studies, where I downloaded and reprocessed the raw data to look at patterns of associations between the microbiome and 10 different diseases.</p>

<p>We found that even though individual bacterial associations aren’t that consistent across studies, the patterns of microbiome shifts are. We also found a large number of bacteria which respond non-specifically to multiple diseases, highlighting the need to contextualize the results of individual studies and suggesting that there may be some sort of shared response to health and disease.</p>

<p>That’s the <a href="http://go.nature.com/2As9meL">tl’dr of this work</a>, and Casey also asked me to give some thoughts about life as a parasite. I learned yesterday that I should only talk about three things, so here we go.</p>

<p>First: what is life as a research parasite like? It’s kinda like being a part-time detective and, when that fails, a mind reader. If you want to do secondary analyses, you’ve gotta learn to look for clues about what the original researchers did everywhere that you can: the paper, the metadata, the random SRA fields, and also in the data itself. When that fails, you have to use your own judgment and try your best to keep going. Remember: perfect is the enemy of good and README’s are your friend.</p>

<p>Second: a future where secondary analyses are the norm will happen not only with symbionts who post their data, but also with the development of open-source and easy to use software. In my field especially, we’ve seen a recent development of <a href="https://www.nature.com/articles/s41587-019-0209-9">super accessible bioinformatics tools</a> that I think has led to many clinicians diving in and generating great data from their trials but only using it to ask simple questions related to their clinical trials. So that leaves a lot of room for us parasites to come in and ask different questions, which I think is a cool byproduct of developing accessible software suites.</p>

<p>And finally, the biggest lesson I’ve learned from my life as a parasitic PhD student is humility. The definition of a parasite is an organism that lives off of its host, to the host’s detriment. Now while I’m pretty sure we can all agree that secondary analyses can be done with little or no harm to the original investigators, we still have to remember that as parasites we depend on our hosts to survive. It’s easy to get self-righteous and angry or whatever when the data isn’t there, but at the end of the day I think it’s more productive to try to see where everyone is coming from. Especially as a junior student, it’s really easy to forget that where we see a data point, an additional N to our analysis, clinicians see real-live patients who are often suffering. Also, it’s really hard to do data sharing right. I tried to upload some data to the SRA just this summer and was confused for a lot of the process, and I’m the one with the lamprey!</p>

<p>So I think that keeping these things in perspective will help us approach these conversations in a way that helps engages everyone and leads more quickly to a mutualistic future, which is really where we all want to be.</p>

<p>Anyway, that’s my time - thank you for listening and thanks for the fish.</p>]]></content><author><name>Aurore Gonzalez</name><email>auroregonzalez@g.harvard.edu</email></author><category term="reproducible-science" /><summary type="html"><![CDATA[The following is a copy of the short speech I gave upon receiving the 2019 Junior Research Parasite Award this past January.]]></summary></entry><entry><title type="html">Ultimate frisbee as a tool for social change</title><link href="https://auroregonzalez.github.io/posts/2019/10/cambodia-frisbee" rel="alternate" type="text/html" title="Ultimate frisbee as a tool for social change" /><published>2019-10-28T00:00:00-07:00</published><updated>2019-10-28T00:00:00-07:00</updated><id>https://auroregonzalez.github.io/posts/2019/10/cambodia-frisbee</id><content type="html" xml:base="https://auroregonzalez.github.io/posts/2019/10/cambodia-frisbee"><![CDATA[<p>This is a guest post for <a href="https://www.facebook.com/99daysofultimatewomen/">99 Days of Ultimate</a>, a conversation held over 99 days that provides a platform for people to speak about a range of womxn’s experiences in ultimate frisbee.
My friend Carolyn is this week’s moderator, and as an American living (and playing) in Scotland, she wanted to profile some of the differences between playing ultimate in the US and abroad.
I spent a year in Cambodia before moving to Boston, which is also when I started playing frisbee more seriously.
Part of the reason I became so passionate about frisbee that year is that I saw firsthand frisbee’s power to affect local change, and specifically in the context of gender equity.
After returning from Cambodia, I joined MIT’s women’s ultimate frisbee team as one of the few graduate students on the team.
Playing and becoming friends with the undergrads solidified my belief in the power of frisbee to drive social change and push gender equity forward.</p>

<p>In undergrad, I had played ultimate during my semester abroad in Australia, but had never been able to find time to fully commit to it back at my home university.
When I moved to Cambodia for a gap year before graduate school, I knew I wanted to give the sport a real try.
In Phnom Penh, I joined the <a href="https://www.facebook.com/groups/38943791964/">local frisbee community</a>, playing pick-up twice a week, going to a few tournaments with the local, expat-heavy team, and attending my first ever hat tournaments (including the best hat tournament in the world, the <a href="https://phnompenhultimate.com/hat/">Big Phat Phnom Penh Hat</a>).
I played with older expats who would bring their kids to pickup as well as tourists traveling through for just a few days.
My middle-aged teammates would consistently not only out-play but also out-party 23-year-old me – this, I decided, was a sport I’d be happy to commit to well into my adult life.
I traveled to tournaments around Southeast Asia where I was automatically welcomed into an incredible community that I knew would exist anywhere I went in the world.
From these experiences, I saw that frisbee was a fun and personally enriching activity.
More important than the pleasures that playing ultimate gave me, I also saw firsthand this sport’s power to transform local communities.</p>

<p>In Phnom Penh, there was a growing group of local Cambodian boys from poor neighborhoods who had joined the expat-dominated ultimate frisbee scene.
They had been introduced to the sport through a summer camp run by a Seattle-based nonprofit called the <a href="http://www.youthultimateproject.org/">Youth Ultimate Project</a>, and had decided to stick with the sport in between the camps.
Throughout the year, I watched them grow from immature, hot-headed players into <a href="http://www.swaultimate.org/">skilled and thoughtful athletes</a>.
Their English skills skyrocketed from their constant exposure to foreigners, and their leadership skills bloomed as we passed on the responsibilities of mentoring the younger players and leading practices.</p>

<p>Meanwhile, a Peace Corps Volunteer in nearby Kampong Cham was working her <a href="https://www.facebook.com/BeeForce/">frisbee magic</a> with a group of young women.
We hosted a few joint clinics between the Phnom Penh and Kampong Cham ultimate players, and these two days of leading drills and coaching the Cambodian players were among my favorite in the whole year.
In Cambodia, women are expected to be quiet, modest, and shy.
They are not expected to sprint and yell and dive after flying discs – but these young women in Kampong Cham did.
Watching them play was a joy on so many levels: their enthusiasm was infectious, and the social implications of these women out-playing their male counterparts gave me chills.</p>

<p>Through my brief experience playing with these Cambodian men and women, I saw how ultimate frisbee could be used to pave the way for a more equal society.
The boys matured and became leaders in their communities, and the women are continuing to train and dive after discs in spite of the societal expectations place on them.
I’m happy to report that <a href="https://www.facebook.com/BeeForce/">both</a> <a href="https://www.facebook.com/swaultimatekh">groups</a> of players are still going strong, five years later.
In fact, there are now enough men and women players that Cambodia routinely fields full <a href="https://www.facebook.com/phnompenhrango/">Cambodian-majority teams</a> at international frisbee tournaments.
Just typing that sentence fills me with indescribable joy and pride, and I can’t wait to get back to Cambodia to play with them again.</p>

<p>More broadly, I noticed a parallel between the transformation of these shy Cambodian women into sprinting and hucking beasts and my own personal journey.
As a woman in STEM who had always excelled at “non-traditional” activities like math and science, I had never doubted the equality of women and had always had higher baseline levels of feminism than many of my peers.
In Cambodia, I realized that supporting women’s sports and supporting women in STEM weren’t actually all that different – both empower women to kick ass and succeed in areas where they’re not traditionally expected to.
And through this success, women also become more empowered to pursue other activities they may have not originally though possible or appropriate for them.</p>

<p>After returning from Cambodia to start grad school at MIT, I joined <a href="http://scripts.mit.edu/~womens-ult/">sMITe</a>, the women’s ultimate frisbee team there.
I played with sMITe through my entire PhD, and saw a similar sort of growth in my teammates that I had first witnessed in Cambodia.
Many of my teammates joined the team as first years, when most were young, shy, nerdy, and often not very athletic.
They started their frisbee journey too hesitant to run through discs, call their own fouls, or yell loudly for someone to clear.
But by the time they graduated, these same women were bellowing at the rookies to run deep, calling plays for high-stakes points, and bringing morale up for the entire team at heartbreaking moments.
Being there to witness this transformation was a deep joy and honor, and one of the highlights of my graduate school experience.
(They were still nerdy though, obviously.)</p>

<p>Together, these experiences are why I’m passionate about continuing to not only play frisbee, but also harness it as the tool for social change that I know it can be.
The fact that ultimate is a self-officiated and co-ed game that is so fun and beginner-friendly and that does not require expensive equipment to play further increases its potential to have global impact.
I hope that our community’s conversation about the future of the sport in the US includes the fact that it is also a global sport, and that the stakes and potential impact may be very different at home than abroad.</p>]]></content><author><name>Aurore Gonzalez</name><email>auroregonzalez@g.harvard.edu</email></author><category term="frisbee" /><summary type="html"><![CDATA[This is a guest post for 99 Days of Ultimate, a conversation held over 99 days that provides a platform for people to speak about a range of womxn’s experiences in ultimate frisbee. My friend Carolyn is this week’s moderator, and as an American living (and playing) in Scotland, she wanted to profile some of the differences between playing ultimate in the US and abroad. I spent a year in Cambodia before moving to Boston, which is also when I started playing frisbee more seriously. Part of the reason I became so passionate about frisbee that year is that I saw firsthand frisbee’s power to affect local change, and specifically in the context of gender equity. After returning from Cambodia, I joined MIT’s women’s ultimate frisbee team as one of the few graduate students on the team. Playing and becoming friends with the undergrads solidified my belief in the power of frisbee to drive social change and push gender equity forward.]]></summary></entry><entry><title type="html">Road trip expense analysis, part 1</title><link href="https://auroregonzalez.github.io/posts/2019/07/road-trip-expenses-pt1" rel="alternate" type="text/html" title="Road trip expense analysis, part 1" /><published>2019-07-22T00:00:00-07:00</published><updated>2019-07-22T00:00:00-07:00</updated><id>https://auroregonzalez.github.io/posts/2019/07/road-trip-expenses-pt1</id><content type="html" xml:base="https://auroregonzalez.github.io/posts/2019/07/road-trip-expenses-pt1"><![CDATA[<p>On my road trip, I kept track of (almost) all the money I spent. I was already fairly surprised with some of my <a href="/2019/07/road-trip-stats">quick calculations</a> about how little I ended up spending (just around $4000!), and I also wanted to dive a bit more into how much I spent, where, and on what. So here we go!</p>

<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kn">import</span> <span class="nn">pandas</span> <span class="k">as</span> <span class="n">pd</span>
<span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="n">np</span>

<span class="kn">import</span> <span class="nn">matplotlib.pyplot</span> <span class="k">as</span> <span class="n">plt</span>
<span class="kn">import</span> <span class="nn">seaborn</span> <span class="k">as</span> <span class="n">sns</span>
<span class="o">%</span><span class="n">matplotlib</span> <span class="n">inline</span>
</code></pre></div></div>

<h2 id="the-data">The data</h2>

<p>I tracked all my expenses in a notebook throughout my trip, and then entered them into an Excel spreadsheet.</p>

<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">df</span> <span class="o">=</span> <span class="n">pd</span><span class="p">.</span><span class="n">read_excel</span><span class="p">(</span><span class="s">'money.xlsx'</span><span class="p">)</span>
<span class="c1"># Last column just has some notes, but no data
</span><span class="n">df</span> <span class="o">=</span> <span class="n">df</span><span class="p">.</span><span class="n">iloc</span><span class="p">[:,</span> <span class="p">:</span><span class="mi">5</span><span class="p">]</span>
<span class="n">df</span><span class="p">.</span><span class="n">head</span><span class="p">()</span>
</code></pre></div></div>

<div>
<style scoped="">
    .dataframe tbody tr th:only-of-type {
        vertical-align: middle;
    }

    .dataframe tbody tr th {
        vertical-align: top;
    }

    .dataframe thead th {
        text-align: right;
    }
</style>
<table border="1" class="dataframe">
  <thead>
    <tr style="text-align: right;">
      <th></th>
      <th>date</th>
      <th>item</th>
      <th>price</th>
      <th>category</th>
      <th>ben_or_claire</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <th>0</th>
      <td>2019-02-17</td>
      <td>gas</td>
      <td>37.14</td>
      <td>car</td>
      <td>NaN</td>
    </tr>
    <tr>
      <th>1</th>
      <td>2019-02-17</td>
      <td>sonic</td>
      <td>4.90</td>
      <td>food</td>
      <td>NaN</td>
    </tr>
    <tr>
      <th>2</th>
      <td>2019-02-18</td>
      <td>coffee</td>
      <td>2.50</td>
      <td>food</td>
      <td>NaN</td>
    </tr>
    <tr>
      <th>3</th>
      <td>2019-02-18</td>
      <td>lunch</td>
      <td>12.00</td>
      <td>food</td>
      <td>NaN</td>
    </tr>
    <tr>
      <th>4</th>
      <td>2019-02-18</td>
      <td>dinner tacos</td>
      <td>8.15</td>
      <td>food</td>
      <td>NaN</td>
    </tr>
  </tbody>
</table>
</div>

<p>I tracked the date, the expense, and the price. I also manually assigned each expense a “category.” And, for the parts of the trip where Ben joined me, I also tracked who paid for the expense. Unfortunately, I didn’t do a great job of tracking expenses during these weekends, so I probably won’t be able to dig into that split.</p>

<p>Anyway, let’s see how much I spent on each category:</p>

<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">(</span><span class="n">df</span><span class="p">.</span><span class="n">groupby</span><span class="p">(</span><span class="s">'category'</span><span class="p">)</span>
    <span class="p">.</span><span class="nb">sum</span><span class="p">()</span>
    <span class="p">.</span><span class="n">sort_values</span><span class="p">(</span><span class="n">by</span><span class="o">=</span><span class="s">'price'</span><span class="p">,</span> <span class="n">ascending</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span>
    <span class="c1">#.plot(kind='bar', rot=45)
</span><span class="p">)</span>
</code></pre></div></div>

<div>
<style scoped="">
    .dataframe tbody tr th:only-of-type {
        vertical-align: middle;
    }

    .dataframe tbody tr th {
        vertical-align: top;
    }

    .dataframe thead th {
        text-align: right;
    }
</style>
<table border="1" class="dataframe">
  <thead>
    <tr style="text-align: right;">
      <th></th>
      <th>price</th>
    </tr>
    <tr>
      <th>category</th>
      <th></th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <th>car</th>
      <td>1721.53</td>
    </tr>
    <tr>
      <th>food</th>
      <td>1235.75</td>
    </tr>
    <tr>
      <th>gear</th>
      <td>659.79</td>
    </tr>
    <tr>
      <th>lodging</th>
      <td>569.02</td>
    </tr>
    <tr>
      <th>fun</th>
      <td>382.89</td>
    </tr>
    <tr>
      <th>dumb</th>
      <td>134.01</td>
    </tr>
    <tr>
      <th>postcards</th>
      <td>83.06</td>
    </tr>
    <tr>
      <th>misc</th>
      <td>59.70</td>
    </tr>
    <tr>
      <th>souvenirs</th>
      <td>29.00</td>
    </tr>
  </tbody>
</table>
</div>

<p>Okay, nothing super wild here: as expected, car and food-related expenses were the largest part. Gear also ended up being a lot, mostly because I had to buy most of my camping-related gear at the beginning of the trip (a worthy investment, I hope!) Interestingly, lodging was pretty high too – but I’m guessing this has to do with the parts of the trip where Ben joined me, and we paid for AirBnBs.</p>

<p>Let’s look into a couple of the more dubious categories: “dumb” (this is when I locked myself out, I think), “gear” (which has a few confusing entries), “misc” (what does that even mean), and “souvenirs” (I think that was also only one purchase).</p>

<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">check_cats</span> <span class="o">=</span> <span class="p">[</span><span class="s">'dumb'</span><span class="p">,</span> <span class="s">'gear'</span><span class="p">,</span> <span class="s">'misc'</span><span class="p">,</span> <span class="s">'souvenirs'</span><span class="p">]</span>
<span class="n">df</span><span class="p">.</span><span class="n">query</span><span class="p">(</span><span class="s">'category == @check_cats'</span><span class="p">).</span><span class="n">sort_values</span><span class="p">(</span><span class="n">by</span><span class="o">=</span><span class="s">'category'</span><span class="p">)</span>
</code></pre></div></div>

<div>
<style scoped="">
    .dataframe tbody tr th:only-of-type {
        vertical-align: middle;
    }

    .dataframe tbody tr th {
        vertical-align: top;
    }

    .dataframe thead th {
        text-align: right;
    }
</style>
<table border="1" class="dataframe">
  <thead>
    <tr style="text-align: right;">
      <th></th>
      <th>date</th>
      <th>item</th>
      <th>price</th>
      <th>category</th>
      <th>ben_or_claire</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <th>22</th>
      <td>2019-02-25</td>
      <td>phone repair</td>
      <td>69.01</td>
      <td>dumb</td>
      <td>NaN</td>
    </tr>
    <tr>
      <th>203</th>
      <td>2019-04-27</td>
      <td>car lockout</td>
      <td>65.00</td>
      <td>dumb</td>
      <td>NaN</td>
    </tr>
    <tr>
      <th>21</th>
      <td>2019-02-25</td>
      <td>rei</td>
      <td>1.60</td>
      <td>gear</td>
      <td>NaN</td>
    </tr>
    <tr>
      <th>37</th>
      <td>2019-02-26</td>
      <td>knife</td>
      <td>8.09</td>
      <td>gear</td>
      <td>NaN</td>
    </tr>
    <tr>
      <th>77</th>
      <td>2019-04-17</td>
      <td>propane</td>
      <td>9.36</td>
      <td>gear</td>
      <td>NaN</td>
    </tr>
    <tr>
      <th>131</th>
      <td>2019-05-01</td>
      <td>home depot</td>
      <td>11.66</td>
      <td>gear</td>
      <td>NaN</td>
    </tr>
    <tr>
      <th>172</th>
      <td>2019-05-19</td>
      <td>propane</td>
      <td>6.38</td>
      <td>gear</td>
      <td>NaN</td>
    </tr>
    <tr>
      <th>188</th>
      <td>2019-05-24</td>
      <td>rei</td>
      <td>124.33</td>
      <td>gear</td>
      <td>NaN</td>
    </tr>
    <tr>
      <th>204</th>
      <td>2019-02-14</td>
      <td>rei</td>
      <td>352.40</td>
      <td>gear</td>
      <td>NaN</td>
    </tr>
    <tr>
      <th>205</th>
      <td>2019-02-16</td>
      <td>rei (parents paid)</td>
      <td>297.55</td>
      <td>gear</td>
      <td>NaN</td>
    </tr>
    <tr>
      <th>206</th>
      <td>2019-05-28</td>
      <td>air mattress reimbursement</td>
      <td>-151.58</td>
      <td>gear</td>
      <td>NaN</td>
    </tr>
    <tr>
      <th>32</th>
      <td>2019-02-26</td>
      <td>haircut</td>
      <td>50.00</td>
      <td>misc</td>
      <td>NaN</td>
    </tr>
    <tr>
      <th>38</th>
      <td>2019-02-26</td>
      <td>cds/postcards</td>
      <td>9.70</td>
      <td>misc</td>
      <td>NaN</td>
    </tr>
    <tr>
      <th>95</th>
      <td>2019-05-02</td>
      <td>license plates</td>
      <td>29.00</td>
      <td>souvenirs</td>
      <td>NaN</td>
    </tr>
  </tbody>
</table>
</div>

<p>Oh, right! Not only did I lock myself out of my car at the Grand Canyon, but I also broke my phone on the first part of my trip and had to fix it. Okay, we’ll leave these two “dumb” expenses in.</p>

<p>The gear category is a bit tough: I exchanged my air mattress a few times, and was eventually reimbursed for it, which explains the “negative” expense on 5/28. Also, my parents got me a lot of gear for the combination of Christmas, graduation, and my birthday – that’s the 2/16 trip for about $300. We’ll leave that in here, though, since that’s money that I was going to spend on this trip regardless.</p>

<p>Like I thought, there’s only one souvenir expense (oops lol). I’ll just lump that into the “misc” category.</p>

<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1"># Replace "souvenir" category with "misc"
</span><span class="n">df</span><span class="p">[</span><span class="s">'category'</span><span class="p">]</span> <span class="o">=</span> <span class="n">df</span><span class="p">[</span><span class="s">'category'</span><span class="p">].</span><span class="n">replace</span><span class="p">(</span><span class="s">'souvenirs'</span><span class="p">,</span> <span class="s">'misc'</span><span class="p">)</span>
</code></pre></div></div>

<h2 id="the-road-trip-expenses">The road trip expenses</h2>

<p>Ok, now I’m ready to dive in. I’ll first look only at the parts of the trip that I spent on my own, since when Ben was visiting we stayed in AirBnB’s and went out a lot – lots of fun, definitely a great way to spend time and money, but not the road trip I was planning or intending for.</p>

<p>Let’s look at how much I spent on each category during each part of the trip. I’ll do a bit of pandas-fu to get the sum of all expenses in each category, one time for the whole dataset and one time just for the part where it was only me.</p>

<p>Coding notes: I <a href="https://pandas.pydata.org/pandas-docs/stable/getting_started/comparison/comparison_with_r.html">just learned</a> that you can use the <code class="language-plaintext highlighter-rouge">.assign()</code> to make a new column within a chain of pandas commands, like the R version of <code class="language-plaintext highlighter-rouge">mutate</code>. Cool!</p>

<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">category_totals</span> <span class="o">=</span> <span class="n">pd</span><span class="p">.</span><span class="n">concat</span><span class="p">([</span>
    <span class="n">df</span><span class="p">.</span><span class="n">groupby</span><span class="p">(</span><span class="s">'category'</span><span class="p">).</span><span class="nb">sum</span><span class="p">().</span><span class="n">assign</span><span class="p">(</span><span class="n">trip</span><span class="o">=</span><span class="s">'all_expenses'</span><span class="p">).</span><span class="n">reset_index</span><span class="p">(),</span>
    <span class="n">df</span><span class="p">[</span><span class="n">df</span><span class="p">[</span><span class="s">'ben_or_claire'</span><span class="p">].</span><span class="n">isna</span><span class="p">()].</span><span class="n">groupby</span><span class="p">(</span><span class="s">'category'</span><span class="p">).</span><span class="nb">sum</span><span class="p">().</span><span class="n">assign</span><span class="p">(</span><span class="n">trip</span><span class="o">=</span><span class="s">'only_me'</span><span class="p">).</span><span class="n">reset_index</span><span class="p">()</span>
<span class="p">])</span>

<span class="n">sns</span><span class="p">.</span><span class="n">barplot</span><span class="p">(</span><span class="n">data</span><span class="o">=</span><span class="n">category_totals</span><span class="p">,</span> <span class="n">x</span><span class="o">=</span><span class="s">'category'</span><span class="p">,</span> <span class="n">y</span><span class="o">=</span><span class="s">'price'</span><span class="p">,</span> <span class="n">hue</span><span class="o">=</span><span class="s">'trip'</span><span class="p">)</span>
</code></pre></div></div>

<p><img src="/images/2019/2019-07-18-road-trip-expenses-pt1_files/2019-07-18-road-trip-expenses-pt1_11_1.png" alt="png" /></p>

<p>Hm, it’s pretty hard to tell how much I spent on the part of the trip with Ben. Let’s directly calculate the difference…</p>

<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1"># Convert tidy data to wide data so I can subtract columns
</span><span class="n">wide_totals</span> <span class="o">=</span> <span class="n">category_totals</span><span class="p">.</span><span class="n">pivot</span><span class="p">(</span><span class="n">index</span><span class="o">=</span><span class="s">'category'</span><span class="p">,</span> <span class="n">columns</span><span class="o">=</span><span class="s">'trip'</span><span class="p">,</span> <span class="n">values</span><span class="o">=</span><span class="s">'price'</span><span class="p">)</span>

<span class="n">wide_totals</span><span class="p">[</span><span class="s">'all_expenses'</span><span class="p">]</span> <span class="o">-</span> <span class="n">wide_totals</span><span class="p">[</span><span class="s">'only_me'</span><span class="p">]</span>
</code></pre></div></div>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>category
car          120.85
dumb           0.00
food          92.34
fun           50.00
gear           0.00
lodging      382.65
misc           0.00
postcards      0.00
dtype: float64
</code></pre></div></div>

<p>Hm. That’s definitely not the whole picture. I’m pretty sure the food and fun expenses are way off, and that I spent way more than just $142 during the parts with Ben – but that makes sense, given that I didn’t really keep track of everything I spent during those days, let alone what Ben was spending. Also those parts involved much more alcohol and spontaneous purchases sooo… 😅</p>

<p>I also don’t fully remember how I entered the lodging bills – sometimes I think I put down the full cost (like when I paid for our AirBnBs on the first part of the trip), but other times I only put down my part (especially when Ben paid).</p>

<p>Anyway, no need to dive into this because I <em>know</em> I have incomplete data. Let’s move on with analyzing just the road trip part where I was alone! That said, I’ll keep any car expenses that I encountered during our joint trip, because I would have needed to pay those anyway. I’ll remove any food we split because that’s just too complicated…</p>

<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1"># Keep only rows without anything in the ben/claire column,
# and keep all rows with the "car" category
</span><span class="n">df</span> <span class="o">=</span> <span class="n">df</span><span class="p">[</span> <span class="p">(</span><span class="n">df</span><span class="p">[</span><span class="s">'category'</span><span class="p">]</span> <span class="o">==</span> <span class="s">"car"</span><span class="p">)</span> <span class="o">|</span> <span class="p">(</span><span class="n">df</span><span class="p">[</span><span class="s">'ben_or_claire'</span><span class="p">].</span><span class="n">isna</span><span class="p">())</span> <span class="p">]</span>

<span class="n">df</span><span class="p">[</span><span class="s">'price'</span><span class="p">].</span><span class="nb">sum</span><span class="p">()</span>
</code></pre></div></div>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>4349.76
</code></pre></div></div>

<p>Ok, so after all this cleaning and manipulation the total amount I spent looks a little different than what I <a href="/2019/07/road-trip-stats">posted previously</a>, but basically the same: on my ~3 month road trip, I spent about $4300!</p>

<p>I have a lot of questions that I could answer by combining this data with my other mileage and lodging datasets, but for now let’s see what questions we can answer just from this data alone.</p>

<h3 id="daily-expenses">Daily expenses</h3>

<p>If we divide that by the total number of days I was on this trip for (105), that gives us an estimate of the daily cost* of my cross-country road trip!</p>

<p><em>*Of course, that’s recognizing that there’s a couple of high-expense weekends missing in this average, which would have been replaced by camping or crashing with friends – so the daily average for a pure road trip should be a little higher than this.</em></p>

<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">df</span><span class="p">.</span><span class="n">groupby</span><span class="p">(</span><span class="s">'category'</span><span class="p">).</span><span class="nb">sum</span><span class="p">().</span><span class="n">sort_values</span><span class="p">(</span><span class="n">by</span><span class="o">=</span><span class="s">'price'</span><span class="p">,</span> <span class="n">ascending</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span> <span class="o">/</span> <span class="mi">105</span>
</code></pre></div></div>

<div>
<style scoped="">
    .dataframe tbody tr th:only-of-type {
        vertical-align: middle;
    }

    .dataframe tbody tr th {
        vertical-align: top;
    }

    .dataframe thead th {
        text-align: right;
    }
</style>
<table border="1" class="dataframe">
  <thead>
    <tr style="text-align: right;">
      <th></th>
      <th>price</th>
    </tr>
    <tr>
      <th>category</th>
      <th></th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <th>car</th>
      <td>16.395524</td>
    </tr>
    <tr>
      <th>food</th>
      <td>11.769048</td>
    </tr>
    <tr>
      <th>gear</th>
      <td>6.283714</td>
    </tr>
    <tr>
      <th>lodging</th>
      <td>5.419238</td>
    </tr>
    <tr>
      <th>fun</th>
      <td>3.646571</td>
    </tr>
    <tr>
      <th>dumb</th>
      <td>1.276286</td>
    </tr>
    <tr>
      <th>misc</th>
      <td>0.844762</td>
    </tr>
    <tr>
      <th>postcards</th>
      <td>0.791048</td>
    </tr>
  </tbody>
</table>
</div>

<p>Hah! Glad to see my “dumb” mistakes averaged out to only costing me a little over a dollar a day! 😆 And not bad – only $12 per day for food and $21 total for transportation and lodging. Also, I’ll note that the daily gear cost will keep doing as time passes, since I own that stuff forever now!</p>

<p>Ok, that said we all know that the average isn’t necessarily that informative. Especially on this trip, I think I tended to spend a lot of money for a few days and then go to the wilderness for a few days and not spend anything at all. Let’s see if this impression is correct.</p>

<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">df</span><span class="p">.</span><span class="n">groupby</span><span class="p">(</span><span class="s">'date'</span><span class="p">).</span><span class="nb">sum</span><span class="p">().</span><span class="n">plot</span><span class="p">(</span><span class="n">kind</span><span class="o">=</span><span class="s">'hist'</span><span class="p">,</span> <span class="n">bins</span><span class="o">=</span><span class="mi">20</span><span class="p">)</span>
</code></pre></div></div>

<p><img src="/images/2019/2019-07-18-road-trip-expenses-pt1_files/2019-07-18-road-trip-expenses-pt1_19_1.png" alt="png" /></p>

<p>At first, this histogram surprised me because there seem to be so <em>few</em> days where I spent zero money. But actually, this data doesn’t include those days! So this histogram just shows the money I spent, on days when I spent <em>some</em> money.</p>

<p>Also, note that the one negative value is the day I got reimbursed for the sleeping pad I returned. It had sprung a leak twice, and the second time I went to REI to exchange it they told me I couldn’t do that without being flagged in the system, so I had to return it. I also spent some money buying a new pad that same day, but the reimbursement wasn’t processed till a few days after so it was on its own day.</p>

<p>Anyway, back to my questions about my spending habits. First up: how many days in a row would I spend money?</p>

<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">days_btw_purchases</span> <span class="o">=</span> <span class="n">df</span><span class="p">.</span><span class="n">sort_values</span><span class="p">(</span><span class="n">by</span><span class="o">=</span><span class="s">'date'</span><span class="p">)[</span><span class="s">'date'</span><span class="p">].</span><span class="n">drop_duplicates</span><span class="p">().</span><span class="n">diff</span><span class="p">().</span><span class="n">dt</span><span class="p">.</span><span class="n">days</span>

<span class="c1"># Remove the large value which represents the month I went to Malaysia
</span><span class="n">days_btw_purchases</span><span class="p">[</span><span class="n">days_btw_purchases</span> <span class="o">&lt;</span> <span class="mi">30</span><span class="p">].</span><span class="n">value_counts</span><span class="p">()</span>
</code></pre></div></div>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>1.0    59
2.0     6
3.0     2
Name: date, dtype: int64
</code></pre></div></div>

<p>So there were 55 days in a row where I made some sort of purchase, and only 2 days where I waited 3 days between purchases. I didn’t ever wait more than 3 days (except the one-month break when I went to Malaysia, lol).</p>

<p>This is actually quite surprising! In my mind, I would go to the big city, buy a bunch of stuff, and then retreat to the wilderness. But now that I think about it, in actuality I would do that, but for big expenses only. I made small purchases almost every day, either stopping by a coffee shop or getting pie at Capitol Reef or other small joys.</p>

<p>Let’s see how these numbers change as I increase the amount of money that I consider a “purchase”:</p>

<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">fig</span><span class="p">,</span> <span class="n">ax</span> <span class="o">=</span> <span class="n">plt</span><span class="p">.</span><span class="n">subplots</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="n">figsize</span><span class="o">=</span><span class="p">(</span><span class="mi">10</span><span class="p">,</span> <span class="mi">2</span><span class="p">))</span>

<span class="n">prices</span> <span class="o">=</span> <span class="p">[</span><span class="mi">10</span><span class="p">,</span> <span class="mi">35</span><span class="p">,</span> <span class="mi">50</span><span class="p">]</span>
<span class="n">i</span> <span class="o">=</span> <span class="mi">0</span>
<span class="k">for</span> <span class="n">p</span> <span class="ow">in</span> <span class="n">prices</span><span class="p">:</span>

    <span class="n">days_btw_purchases</span> <span class="o">=</span> <span class="n">df</span><span class="p">.</span><span class="n">query</span><span class="p">(</span><span class="s">'price &gt; @p'</span><span class="p">).</span><span class="n">sort_values</span><span class="p">(</span><span class="n">by</span><span class="o">=</span><span class="s">'date'</span><span class="p">)[</span><span class="s">'date'</span><span class="p">].</span><span class="n">drop_duplicates</span><span class="p">().</span><span class="n">diff</span><span class="p">().</span><span class="n">dt</span><span class="p">.</span><span class="n">days</span>
    <span class="n">days_btw_purchases</span><span class="p">[</span><span class="n">days_btw_purchases</span> <span class="o">&lt;</span> <span class="mi">30</span><span class="p">].</span><span class="n">plot</span><span class="p">(</span><span class="n">kind</span><span class="o">=</span><span class="s">'hist'</span><span class="p">,</span> <span class="n">ax</span><span class="o">=</span><span class="n">ax</span><span class="p">[</span><span class="n">i</span><span class="p">])</span>

    <span class="n">ax</span><span class="p">[</span><span class="n">i</span><span class="p">].</span><span class="n">set_title</span><span class="p">(</span><span class="s">'${}'</span><span class="p">.</span><span class="nb">format</span><span class="p">(</span><span class="n">p</span><span class="p">))</span>
    <span class="k">if</span> <span class="n">i</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
        <span class="n">ax</span><span class="p">[</span><span class="n">i</span><span class="p">].</span><span class="n">set_ylabel</span><span class="p">(</span><span class="s">'Frequency'</span><span class="p">)</span>
    <span class="k">else</span><span class="p">:</span>
        <span class="n">ax</span><span class="p">[</span><span class="n">i</span><span class="p">].</span><span class="n">set_ylabel</span><span class="p">(</span><span class="s">''</span><span class="p">)</span>

    <span class="n">ax</span><span class="p">[</span><span class="n">i</span><span class="p">].</span><span class="n">set_xlabel</span><span class="p">(</span><span class="s">'Days between purchase'</span><span class="p">)</span>
    <span class="n">i</span> <span class="o">+=</span> <span class="mi">1</span>
<span class="n">fig</span><span class="p">.</span><span class="n">tight_layout</span><span class="p">()</span>
</code></pre></div></div>

<p><img src="/images/2019/2019-07-18-road-trip-expenses-pt1_files/2019-07-18-road-trip-expenses-pt1_23_0.png" alt="png" /></p>

<p>Damn. There were five times when I spent more than $50 two days in a row?? (That’s what the left-most bar in the $50 panel tells me). And in general, there were only a few times when I went more than a week in between &gt; $50 expenses.</p>

<p>On the flip side, there was only one time when I went like 5 days without spending more than $10. This was probably the week that I was hanging out in Utah, from Bryce to Moab.</p>

<p>The $35 price cutoff is intersting, because it kind of <em>de facto</em> removes most of my gas fillups since they were usually about $30. Here the purchases are more varied: sometimes I spent more than $35 two days in a row, and other times I went about a week without spending that much on any given day. This jives much more with my feeling on how I spent money this trip.</p>

<p>Either way, I was maybe a less big spender than I expected ($4300 is so little for such a massive trip), but definitely a <em>more frequent</em> spender than I thought.</p>

<h3 id="gas-groceries-and-camping">Gas, groceries, and camping</h3>

<p>Now let’s zoom in more specifically to the three big categories of expenses, and the ones you might be most interested in if you’re planning your own trip.</p>

<p>The “car” category includes gas and other things, but for now I’m honestly only interested in looking at how often I paid for gas. Similarly, let’s focus on my grocery shopping trips rather than eating out, since if you were trying to have the cheapest road trip possible then this would be the most important thing to look at.</p>

<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1"># Find all gas and grocery expenses, and put them in their own sub category
</span><span class="n">df</span><span class="p">[</span><span class="s">'sub_category'</span><span class="p">]</span> <span class="o">=</span> <span class="n">df</span><span class="p">[</span><span class="s">'category'</span><span class="p">]</span>
<span class="n">df</span><span class="p">.</span><span class="n">loc</span><span class="p">[</span><span class="n">df</span><span class="p">[</span><span class="s">'item'</span><span class="p">].</span><span class="nb">str</span><span class="p">.</span><span class="n">contains</span><span class="p">(</span><span class="s">'gas'</span><span class="p">),</span> <span class="s">'sub_category'</span><span class="p">]</span> <span class="o">=</span> <span class="s">'gas'</span>
<span class="n">df</span><span class="p">.</span><span class="n">loc</span><span class="p">[</span><span class="n">df</span><span class="p">[</span><span class="s">'item'</span><span class="p">].</span><span class="nb">str</span><span class="p">.</span><span class="n">contains</span><span class="p">(</span><span class="s">'groceries'</span><span class="p">),</span> <span class="s">'sub_category'</span><span class="p">]</span> <span class="o">=</span> <span class="s">'groceries'</span>
</code></pre></div></div>

<p>I’ll do a similar analysis as above, looking at how many days in a row I spent money on each given thing. This time, though, I’ll look within each category only. For example, this will let me answer “on average, how many days would I go between filling up my tank?”</p>

<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1"># Calculate days between spending on the same category
</span><span class="n">df</span><span class="p">[</span><span class="s">'days_since_last_same_category'</span><span class="p">]</span> <span class="o">=</span> <span class="n">df</span><span class="p">.</span><span class="n">sort_values</span><span class="p">(</span><span class="n">by</span><span class="o">=</span><span class="s">'date'</span><span class="p">).</span><span class="n">groupby</span><span class="p">(</span><span class="s">'category'</span><span class="p">)[</span><span class="s">'date'</span><span class="p">].</span><span class="n">diff</span><span class="p">().</span><span class="n">dt</span><span class="p">.</span><span class="n">days</span>
<span class="n">df</span><span class="p">[</span><span class="s">'days_since_last_same_subcategory'</span><span class="p">]</span> <span class="o">=</span> <span class="n">df</span><span class="p">.</span><span class="n">sort_values</span><span class="p">(</span><span class="n">by</span><span class="o">=</span><span class="s">'date'</span><span class="p">).</span><span class="n">groupby</span><span class="p">(</span><span class="s">'sub_category'</span><span class="p">)[</span><span class="s">'date'</span><span class="p">].</span><span class="n">diff</span><span class="p">().</span><span class="n">dt</span><span class="p">.</span><span class="n">days</span>

<span class="c1"># Remove the large gap from Malaysia
</span><span class="n">df</span><span class="p">.</span><span class="n">loc</span><span class="p">[</span><span class="n">df</span><span class="p">[</span><span class="s">'days_since_last_same_category'</span><span class="p">]</span> <span class="o">&gt;</span> <span class="mi">30</span><span class="p">,</span> <span class="s">'days_since_last_same_category'</span><span class="p">]</span> <span class="o">=</span> <span class="n">np</span><span class="p">.</span><span class="n">nan</span>
<span class="n">df</span><span class="p">.</span><span class="n">loc</span><span class="p">[</span><span class="n">df</span><span class="p">[</span><span class="s">'days_since_last_same_subcategory'</span><span class="p">]</span> <span class="o">&gt;</span> <span class="mi">30</span><span class="p">,</span> <span class="s">'days_since_last_same_subcategory'</span><span class="p">]</span> <span class="o">=</span> <span class="n">np</span><span class="p">.</span><span class="n">nan</span>

<span class="n">df</span><span class="p">.</span><span class="n">head</span><span class="p">(</span><span class="mi">10</span><span class="p">)</span>
</code></pre></div></div>

<div>
<style scoped="">
    .dataframe tbody tr th:only-of-type {
        vertical-align: middle;
    }

    .dataframe tbody tr th {
        vertical-align: top;
    }

    .dataframe thead th {
        text-align: right;
    }
</style>
<table border="1" class="dataframe">
  <thead>
    <tr style="text-align: right;">
      <th></th>
      <th>date</th>
      <th>item</th>
      <th>price</th>
      <th>category</th>
      <th>ben_or_claire</th>
      <th>sub_category</th>
      <th>days_since_last_same_category</th>
      <th>days_since_last_same_subcategory</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <th>0</th>
      <td>2019-02-17</td>
      <td>gas</td>
      <td>37.14</td>
      <td>car</td>
      <td>NaN</td>
      <td>gas</td>
      <td>NaN</td>
      <td>NaN</td>
    </tr>
    <tr>
      <th>1</th>
      <td>2019-02-17</td>
      <td>sonic</td>
      <td>4.90</td>
      <td>food</td>
      <td>NaN</td>
      <td>food</td>
      <td>NaN</td>
      <td>NaN</td>
    </tr>
    <tr>
      <th>2</th>
      <td>2019-02-18</td>
      <td>coffee</td>
      <td>2.50</td>
      <td>food</td>
      <td>NaN</td>
      <td>food</td>
      <td>1.0</td>
      <td>1.0</td>
    </tr>
    <tr>
      <th>3</th>
      <td>2019-02-18</td>
      <td>lunch</td>
      <td>12.00</td>
      <td>food</td>
      <td>NaN</td>
      <td>food</td>
      <td>0.0</td>
      <td>0.0</td>
    </tr>
    <tr>
      <th>4</th>
      <td>2019-02-18</td>
      <td>dinner tacos</td>
      <td>8.15</td>
      <td>food</td>
      <td>NaN</td>
      <td>food</td>
      <td>0.0</td>
      <td>0.0</td>
    </tr>
    <tr>
      <th>5</th>
      <td>2019-02-18</td>
      <td>gas</td>
      <td>32.89</td>
      <td>car</td>
      <td>NaN</td>
      <td>gas</td>
      <td>1.0</td>
      <td>1.0</td>
    </tr>
    <tr>
      <th>6</th>
      <td>2019-02-18</td>
      <td>groceries</td>
      <td>35.21</td>
      <td>food</td>
      <td>NaN</td>
      <td>groceries</td>
      <td>0.0</td>
      <td>NaN</td>
    </tr>
    <tr>
      <th>7</th>
      <td>2019-02-19</td>
      <td>gas</td>
      <td>23.41</td>
      <td>car</td>
      <td>NaN</td>
      <td>gas</td>
      <td>1.0</td>
      <td>1.0</td>
    </tr>
    <tr>
      <th>8</th>
      <td>2019-02-19</td>
      <td>guitar center</td>
      <td>68.17</td>
      <td>fun</td>
      <td>NaN</td>
      <td>fun</td>
      <td>NaN</td>
      <td>NaN</td>
    </tr>
    <tr>
      <th>9</th>
      <td>2019-02-20</td>
      <td>gas</td>
      <td>8.66</td>
      <td>car</td>
      <td>NaN</td>
      <td>gas</td>
      <td>1.0</td>
      <td>1.0</td>
    </tr>
  </tbody>
</table>
</div>

<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">keep_cats</span> <span class="o">=</span> <span class="p">[</span><span class="s">'food'</span><span class="p">,</span> <span class="s">'car'</span><span class="p">,</span> <span class="s">'lodging'</span><span class="p">]</span>
<span class="n">g</span> <span class="o">=</span> <span class="n">sns</span><span class="p">.</span><span class="n">FacetGrid</span><span class="p">(</span><span class="n">data</span><span class="o">=</span><span class="n">df</span><span class="p">.</span><span class="n">query</span><span class="p">(</span><span class="s">'category == @keep_cats'</span><span class="p">),</span> <span class="n">col</span><span class="o">=</span><span class="s">'category'</span><span class="p">,</span>
                  <span class="n">sharey</span><span class="o">=</span><span class="bp">False</span><span class="p">,</span> <span class="n">col_order</span><span class="o">=</span><span class="n">keep_cats</span><span class="p">,</span> <span class="n">sharex</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span>
<span class="n">g</span><span class="p">.</span><span class="nb">map</span><span class="p">(</span><span class="n">plt</span><span class="p">.</span><span class="n">hist</span><span class="p">,</span> <span class="s">'days_since_last_same_category'</span><span class="p">)</span>
</code></pre></div></div>

<p><img src="/images/2019/2019-07-18-road-trip-expenses-pt1_files/2019-07-18-road-trip-expenses-pt1_29_1.png" alt="png" /></p>

<p>Hm. This is also surprising, and tells me that I spent money on way more days than I thought. (I am seeing this in the fact that the “0” bar is quite large on all histograms, indicating that I frequently went zero days in between sequential purchases).</p>

<p>Specifically, I bought food two days in a row about 40 times. And then the majority of the rest of the times I bought food were just 1 day apart. In other words, for the majority of my trip I bought food either every day or every other day.</p>

<p>Looks like the story is pretty similar for car-related expenses: the majority of expenses had a lag of 0-2 days. So for the majority of my trip, I spent money on my car somewhere between every day and every 3 days. That makes sense – I usually moved to a new spot every 2-3 days, which entailed a lot of driving, and I must have gotten gas basically every time I did that.</p>

<p>Now, lodging. Let’s see: does this make sense? My impression is that I super rarely paid for housing… What this is saying is that yes, there were a few times when I went a week or more without paying for housing, but when I did pay for housing I paid for housing again within the next three days. I have a separate spreadsheet where I tracked the lodging expenses more cleanly, we’ll have to come back to this when we analyze that one…</p>

<p>Let’s zoom into the groceries and gas question, because I think these expenses are where I’m drawing my intuition from.</p>

<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">keep_subcats</span> <span class="o">=</span> <span class="p">[</span><span class="s">'groceries'</span><span class="p">,</span> <span class="s">'gas'</span><span class="p">]</span>
<span class="n">g</span> <span class="o">=</span> <span class="n">sns</span><span class="p">.</span><span class="n">FacetGrid</span><span class="p">(</span><span class="n">data</span><span class="o">=</span><span class="n">df</span><span class="p">.</span><span class="n">query</span><span class="p">(</span><span class="s">'sub_category == @keep_subcats'</span><span class="p">),</span> <span class="n">col</span><span class="o">=</span><span class="s">'sub_category'</span><span class="p">,</span>
                  <span class="n">sharey</span><span class="o">=</span><span class="bp">False</span><span class="p">,</span> <span class="n">col_order</span><span class="o">=</span><span class="n">keep_subcats</span><span class="p">,</span> <span class="n">sharex</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span>
<span class="n">g</span><span class="p">.</span><span class="nb">map</span><span class="p">(</span><span class="n">plt</span><span class="p">.</span><span class="n">hist</span><span class="p">,</span> <span class="s">'days_since_last_same_subcategory'</span><span class="p">)</span>
</code></pre></div></div>

<p><img src="/images/2019/2019-07-18-road-trip-expenses-pt1_files/2019-07-18-road-trip-expenses-pt1_31_1.png" alt="png" /></p>

<p>Yeah, I think this checks out. Of the 9 times I bought groceries, about 2/3 of them were at least 5 days apart (these are the bars on the right of the “groceries” plot). That makes sense – I feel like I tended to buy groceries about once a week, and sometimes I’d have forgotten something so would need to swing back by the store the next day to get a bit more.</p>

<p>Similarly, most of my gas purchases were something like 2-3 days apart. This also makes sense, given my reasoning above about how often I was on the move.</p>

<h2 id="coffee">Coffee</h2>

<p>Okay, I’m getting a bit tired of this deep dive but there is one more thing I want to know: how much money did I spend on caffeine?</p>

<p>As I was putting these data into the spreadsheet, I found myself often typing “coffee” or “tea.” Ruh roh…</p>

<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1"># Get any items where I specified coffee or tea
</span><span class="n">df</span><span class="p">[</span><span class="n">df</span><span class="p">[</span><span class="s">'item'</span><span class="p">].</span><span class="nb">str</span><span class="p">.</span><span class="n">contains</span><span class="p">(</span><span class="s">'coffee|tea'</span><span class="p">)][</span><span class="s">'item'</span><span class="p">].</span><span class="n">value_counts</span><span class="p">()</span>
</code></pre></div></div>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>coffee                  15
tea                      3
coffee and lunch         2
coffee and donuts        1
tea and gatorade         1
coffee and breakfast     1
coffee and taters        1
coffee and muffin        1
pie and coffee           1
iced tea                 1
Name: item, dtype: int64
</code></pre></div></div>

<p>Hehe, can you tell that I liked to treat myself to coffee in a variety of ways? :)</p>

<p>I’ll note here that I <em>also</em> had instant coffee available, which isn’t included in these expenses (I bought a super-pack at Costco). Pro-tip for all my fellow road tripping caffeine addicts: the Starbucks instant coffee is actually quite nice! There was even once where I treated myself to “real” coffee at some Bryce Canyon lodge, and it was <em>way worse</em> than my usual instant. Good to know. But also I am weak and loved to treat myself to coffee and breakfast whenever I could reasonably justify it.</p>

<p>Okay but back to business: how much did I spend, and how often?</p>

<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">caffeine</span> <span class="o">=</span> <span class="n">df</span><span class="p">[</span><span class="n">df</span><span class="p">[</span><span class="s">'item'</span><span class="p">].</span><span class="nb">str</span><span class="p">.</span><span class="n">contains</span><span class="p">(</span><span class="s">'coffee|tea'</span><span class="p">)]</span>
<span class="n">caffeine</span><span class="p">[</span><span class="s">'price'</span><span class="p">].</span><span class="nb">sum</span><span class="p">()</span>
</code></pre></div></div>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>140.61
</code></pre></div></div>

<p>Hah! I spent $140 on caffeine (plus, at times, also food – but let’s be real the breakfast was just an excuse to buy coffee). That’s about $1.30 a day, which is… not bad? (Though, again, this was <em>treat</em> coffee, and I had instant most days of the trip.)</p>

<p>Okay. How many days did I go in between giving in to my desire for some non-instant coffee or other caffeine?</p>

<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">days_btw_caffeine</span> <span class="o">=</span> <span class="n">caffeine</span><span class="p">.</span><span class="n">sort_values</span><span class="p">(</span><span class="n">by</span><span class="o">=</span><span class="s">'date'</span><span class="p">)[</span><span class="s">'date'</span><span class="p">].</span><span class="n">drop_duplicates</span><span class="p">().</span><span class="n">diff</span><span class="p">().</span><span class="n">dt</span><span class="p">.</span><span class="n">days</span>
<span class="n">days_btw_caffeine</span> <span class="o">=</span> <span class="n">days_btw_caffeine</span><span class="p">[</span><span class="n">days_btw_caffeine</span> <span class="o">&lt;</span> <span class="mi">30</span><span class="p">]</span>
<span class="n">days_btw_caffeine</span><span class="p">.</span><span class="n">plot</span><span class="p">(</span><span class="n">kind</span><span class="o">=</span><span class="s">'hist'</span><span class="p">)</span>
<span class="n">plt</span><span class="p">.</span><span class="n">xlabel</span><span class="p">(</span><span class="s">'Days between caffeine'</span><span class="p">)</span>
</code></pre></div></div>

<p><img src="/images/2019/2019-07-18-road-trip-expenses-pt1_files/2019-07-18-road-trip-expenses-pt1_38_1.png" alt="png" /></p>

<p>And therein, my friends, lies the histogram of an addict: I rarely went more than 5 days in between buying myself some form of caffeine.</p>

<p>So it goes. And it was all worth it.</p>]]></content><author><name>Aurore Gonzalez</name><email>auroregonzalez@g.harvard.edu</email></author><category term="data-science" /><category term="coding" /><category term="portfolio" /><summary type="html"><![CDATA[On my road trip, I kept track of (almost) all the money I spent. I was already fairly surprised with some of my quick calculations about how little I ended up spending (just around $4000!), and I also wanted to dive a bit more into how much I spent, where, and on what. So here we go!]]></summary></entry><entry><title type="html">Road trip summary statistics</title><link href="https://auroregonzalez.github.io/posts/2019/07/road-trip-stats" rel="alternate" type="text/html" title="Road trip summary statistics" /><published>2019-07-02T00:00:00-07:00</published><updated>2019-07-02T00:00:00-07:00</updated><id>https://auroregonzalez.github.io/posts/2019/07/road-trip-stats</id><content type="html" xml:base="https://auroregonzalez.github.io/posts/2019/07/road-trip-stats"><![CDATA[<p>I (obviously) kept track of my mileage and expenses on my road trip, and a more thorough analysis will follow. For now, here are some fun and quick stats. Let me know if you think of more I should look into!</p>

<h2 id="driving">Driving</h2>

<ul>
  <li>Miles driven: 13,174</li>
  <li>States driven through: 22</li>
  <li>States stayed in: 21</li>
  <li>Days on the trip: 105</li>
  <li>Days on the road: 86</li>
</ul>

<h2 id="hiking">Hiking</h2>

<ul>
  <li>National parks visited: 13 (Grand Teton, Yellowstone, Badlands, Rocky Mountain, Arches, Canyonlands, Capitol Reef, Bryce Canyon, Zion, Grand Canyon, Great Sand Dunes, Great Smoky Mountains, Big Bend)</li>
  <li>National parks hiked in: 12</li>
  <li>National parks passport stamps acquired: 0 (#fail)</li>
  <li>Dollars spent on national parks entrance fees: $0 (thanks, Alm lab!)</li>
</ul>

<h2 id="music">Music</h2>

<ul>
  <li>Spotify playlists made by friends: 22</li>
  <li>CD albums listened to: 23</li>
  <li>Mix CDs listened to: 10</li>
</ul>

<h2 id="expenses">Expenses</h2>

<ul>
  <li>
    <p>Total money spent: $4,311.38</p>
  </li>
  <li>Money spent on groceries: $489.76</li>
  <li>Loyalty grocery cards acquired: 2</li>
  <li>
    <p>Bags of salt and pepper chips eaten: ??!</p>
  </li>
  <li>Phone screens cracked: 2</li>
  <li>Phone screens repaired: 1</li>
</ul>

<h2 id="car-things">Car things</h2>

<ul>
  <li>Money spent on gas: $1,393.48</li>
  <li>Number of times gas was pumped: 46</li>
  <li>
    <p>Most expensive state for gas: California holy jesus</p>
  </li>
  <li>
    <p>Number of oil changes: 3</p>
  </li>
  <li>Number of problems with the car: 3</li>
  <li>Number of problems with the car which were the car’s fault: 0</li>
</ul>

<h2 id="states">States</h2>

<ul>
  <li>Most overrated state: Tennessee, but mostly because of how disappointing Nashville and the moonshine were</li>
  <li>Most underrated state: Nevada, maybe? I’m not sure.</li>
  <li>Most correctly-rated state: Utah, definitely.</li>
  <li>Largest differential between how frequently I think about a state and how nice it was: Arkansas (0 - very nice = large differential)</li>
  <li>Smallest differential between how frequently I think about a state and how nice it was: Nebraska (0 - not that nice = 0)</li>
  <li>Largest differential between how awesome the state apparently is and how much I liked it: Idaho (very awesome - very meh = large differential)</li>
  <li>Smallest differential between how awesome the state apparently is and how much I liked it: Utah (very awesome - very awesome = 0)</li>
</ul>]]></content><author><name>Aurore Gonzalez</name><email>auroregonzalez@g.harvard.edu</email></author><summary type="html"><![CDATA[I (obviously) kept track of my mileage and expenses on my road trip, and a more thorough analysis will follow. For now, here are some fun and quick stats. Let me know if you think of more I should look into!]]></summary></entry><entry><title type="html">Road trip FOMO: pro-tips and bucket lists</title><link href="https://auroregonzalez.github.io/posts/2019/07/road-trip-fomo" rel="alternate" type="text/html" title="Road trip FOMO: pro-tips and bucket lists" /><published>2019-07-01T00:00:00-07:00</published><updated>2019-07-01T00:00:00-07:00</updated><id>https://auroregonzalez.github.io/posts/2019/07/road-trip-fomo</id><content type="html" xml:base="https://auroregonzalez.github.io/posts/2019/07/road-trip-fomo"><![CDATA[<p>A few times throughout my <a href="/travel/">road trip</a>, I was hit pretty hard with some FOMO.
I realized that it was in large part because I was sad to be missing out on things in Boston, like so many friends’ defenses!
Also, I was sad to not have enough time to do all the cool things I wanted to on my road trip. So I wrote them down! If you are taking a trip through any of these parts of the US soon, please know that I will be living vicariously through you.</p>

<h2 id="arkansas">Arkansas</h2>

<h3 id="pro-tips">Pro-tips</h3>

<ul>
  <li>Ouachita forest: so many rec areas!</li>
</ul>

<h3 id="bucket-list">Bucket list</h3>

<ul>
  <li>Just all of it again but slower</li>
</ul>

<h2 id="new-mexico">New Mexico</h2>

<h3 id="pro-tips-1">Pro-tips</h3>

<ul>
  <li>El Malpais was really fun. The rim trail was beautiful (but bring a friend bc it gets boring).</li>
  <li>Joe Skeen campground was probably the best free BLM camp I stayed at.</li>
</ul>

<h3 id="bucket-list-1">Bucket list</h3>

<ul>
  <li>Come back with caving gear and visit the lava tubes.</li>
  <li>Also do the long 7-hour hike through the middle of the badlands.</li>
  <li>Visit El Morro, but make sure to get to the campsite early because it fills up really fast.</li>
</ul>

<h2 id="grand-canyon">Grand Canyon</h2>

<h3 id="pro-tips-2">Pro-tips</h3>

<ul>
  <li>Backcountry office is way less busy than the visitor center, it has flush toilets, and parking fills up less quickly than the visitor center</li>
  <li>camp in the forest just outside the park: you won’t be alone. If you’re not in an RV, have dinner at a picnic area <em>in</em> the park first, stop by a bathroom, and then head to the forest. Don’t lock yourself out of your car though.</li>
</ul>

<h3 id="bucket-list-2">Bucket list</h3>

<ul>
  <li>Tanner Trail</li>
  <li>Rim to rim hike</li>
  <li>Bright angel again, but start a bit earlier and go all the way to Plateau Point</li>
  <li>Check out the North Rim (not open all season, check the dates before going)</li>
</ul>

<h2 id="north-of-grand-canyonsouth-grand-escalante-kanab-region">North of Grand canyon/South Grand Escalante, Kanab region</h2>

<h3 id="pro-tips-3">Pro-tips</h3>

<ul>
  <li>Badger Canyon “camp” is awesome</li>
</ul>

<h3 id="bucket-list-3">Bucket list</h3>

<ul>
  <li>All of it! Spencer Lake trail for next time, but I’d definitely do Cathedral Wash again.</li>
  <li>Buckskin gulch trail (starting from Wire tap)</li>
  <li>Actually get your shit together to go do The Wave lottery (but remember: Arizona and Utah might be an hour different if it’s daylight savings!)</li>
  <li>Maybe the Peek-a-boo slot canyon that’s to the west of Kanab?</li>
</ul>

<h2 id="zion-national-park">Zion National Park</h2>

<h3 id="pro-tips-4">Pro-tips</h3>

<ul>
  <li>Angel’s landing trail is so awesome. The hike up to the start of the exciting trail is very quick, the hike up to Angel’s Landing is also fairly short but requires a lot of waiting for other hikers, so in the end the estimated time is about accurate.</li>
</ul>

<h3 id="bucket-list-4">Bucket list</h3>

<ul>
  <li>as many trails as possible from the East side</li>
  <li>hike through the Narrows (with a friend who knows how to prepare for a hike through a river)</li>
</ul>

<h2 id="bryce-canyon-national-park">Bryce Canyon National Park</h2>

<h3 id="pro-tips-5">Pro-tips</h3>

<ul>
  <li>Bryce Canyon Coffee Co in Tropic is super lovely! Also attached to a motel.</li>
  <li>All of the viewpoints have parking, so if you’re early enough in the day you probably don’t need to take the shuttle. (It comes every 15 min, so it’s not as frequent as in Zion). The additional parking seems to fill up by 10 am or so.</li>
</ul>

<h3 id="bucket-list-5">Bucket list</h3>

<ul>
  <li>If I’m feeling like backpacking: the under-the-rim trail seems awesome.</li>
  <li>If not, figure out what the trail is that leaves from Rainbow Point and goes out to the point in front of it.</li>
  <li>Maybe try to find some hikes in the forest between Bryce and Tropic (or go back and do Red Canyon hike?)</li>
</ul>

<h2 id="grand-staircase-escalante-national-monument-area">Grand Staircase Escalante National Monument area</h2>

<h3 id="pro-tips-6">Pro-tips</h3>

<ul>
  <li>Unlike most other areas I’ve camped in, this one has no service!</li>
  <li>Lots of washboard on the main road, and trails to find campsites are fairly rough – high clearance recommended</li>
</ul>

<h3 id="bucket-list-6">Bucket list</h3>

<ul>
  <li>Petrified forest state park</li>
  <li>Willow Gulch trail, all the way to the arch at the “end”</li>
  <li>Come prepared for some overnight backpacking hikes</li>
  <li>BRING A DOG TO PLAY</li>
  <li>Come with enough time to hang around the campsite and explore the surroundings</li>
</ul>

<h2 id="road-between-grand-staircase-and-moab">Road between Grand Staircase and Moab</h2>

<h3 id="pro-tips-7">Pro-tips</h3>

<ul>
  <li>Omg pies at Capitol Reef what a lovely surprise! Come prepared to nom.</li>
</ul>

<h3 id="bucket-lists">Bucket lists</h3>

<ul>
  <li>Figure out backcountry camping and permits for the area around scenic byway 24 and go exploring</li>
  <li>Actually drive on 95 like Janyne told me to (AKA between Hanksville, Fry Canyon, and Blanding)</li>
  <li>Spend more time at Capitol Reef, but preferably only there so it doesn’t get diluted by all the other cool things nearby</li>
  <li>Re-do the Little Wild Horse slot canyon near Goblin Valley State Park, but do the whole loop and don’t die in a flash flood. Also, explore that area more and camp closer to the slot canyon hike (rather than the weird parking-lot-like BLM campsite)</li>
</ul>

<h2 id="moab">Moab</h2>

<h3 id="pro-tips-8">Pro-tips</h3>

<ul>
  <li>Make sure you have your shit together and book a campsite in advance, otherwise it’s very hard to find somewhere. BLM campsites are fairly small but reservable, Canyonlands is also an option.</li>
  <li>Take the road that goes along the Colorado (route 128) instead of highway 191 if you’re heading out and going northeast.</li>
</ul>

<h2 id="badlands">Badlands</h2>

<h3 id="pro-tips-9">Pro-tips</h3>

<ul>
  <li>The campground is really cheap: $12 if you have the America the Beautiful pass, and it’s right next to a lovely diner with internet, warmth, and beer</li>
</ul>

<h2 id="black-hills">Black Hills</h2>

<h3 id="bucket-list-7">Bucket list</h3>

<ul>
  <li>Just come camping here for a trip, and hike around</li>
  <li>Mt. Rushmore, I guess…</li>
</ul>

<h2 id="yellowstone-and-grand-tetons">Yellowstone and Grand Tetons</h2>

<h3 id="pro-tips-10">Pro-tips</h3>

<ul>
  <li>Learn how to prepare for bears. If you want to hike, it’s better to find a friend for this part of the trip.</li>
  <li>Old Faithful erupts every ~90 minutes. There’s a couple of short hikes to do around there. Plan to be there for at least 2 or 3 eruptions if you can, since some of them are less whelming.</li>
  <li>While you’re waiting for Old Faithful, get a Huckleberry ice cream float at the cafe. Best ice cream float I’ve ever had.</li>
</ul>

<h3 id="bucket-list-8">Bucket list</h3>

<ul>
  <li>Hike all up in those Tetons.</li>
  <li>Also hike in Yellowstone, but with a friend who’s ready to fight bears.</li>
  <li>Bighorn forest to the east of Yellowstone is spectacular. Their slogan is “Like Yellowstone but without the crowds” and it isn’t totally inaccurate. Would be fun to go back and explore that area.</li>
</ul>

<h2 id="idaho">Idaho</h2>

<h3 id="pro-tips-11">Pro-tips</h3>

<ul>
  <li>Idaho BLM doesn’t really have maps available, either on Avenza or in the (Idaho Falls) office. But they do have a nice booklet with recreation opportunities, which includes <em>some</em> campsites</li>
  <li>There are campsites near Swan Falls dam. I also found one at the top of the canyon which was right by the road but quite nice.</li>
</ul>

<h3 id="bucket-list-9">Bucket list</h3>

<ul>
  <li>Craters of the Moon national monument</li>
  <li>Apparently going North-South is pretty stupendous, and Idaho has the best wilderness areas of any state. So go find those and do that.</li>
  <li>Shoshone falls</li>
</ul>

<h2 id="california-highway-1">California highway 1</h2>

<h3 id="pro-tips-12">Pro-tips</h3>

<ul>
  <li>all of the pull-outs seem to have a day use fee. Park on the side of the highway and walk in (alleviate your guilt by avoiding eye contact with the ranger)</li>
  <li>Los Padres National Forest starts near the south of Big Sur. There are signs to campgrounds up the hill, Prewitt Ridge was where I headed.</li>
  <li>Bring a friend to drive so you don’t almost kill yourself looking at the views on the windy road. (Not speaking from experience, of course…)</li>
</ul>

<h3 id="bucket-lists-1">Bucket lists</h3>

<ul>
  <li>All of it again but slower. But I’d need to figure out the (free) camping situation…</li>
</ul>]]></content><author><name>Aurore Gonzalez</name><email>auroregonzalez@g.harvard.edu</email></author><summary type="html"><![CDATA[A few times throughout my road trip, I was hit pretty hard with some FOMO. I realized that it was in large part because I was sad to be missing out on things in Boston, like so many friends’ defenses! Also, I was sad to not have enough time to do all the cool things I wanted to on my road trip. So I wrote them down! If you are taking a trip through any of these parts of the US soon, please know that I will be living vicariously through you.]]></summary></entry></feed>