GeoWHY 人生苦短,爱生活,爱唧哦歪

2018-01-24

By GEO-DODO

importing files with Chinese characters to R

I should post this on StackOverFlow..
Here’s some explanation on ASCII and UTF encoding. https://stackoverflow.com/questions…
My problem:
our questionnaire has some chinese characters, as you can imagine, all the location name is in Chinese, people’s name, seed variety, herbicide and pesticide etc, as well as the strategies they use. In excel, these characters can display fine, and so was the first time I processed them in R (now think about it, could be that I was using my mac instead of lenovo).
Anyway, the challenge is that I need to process the data in R, and I’ve exported all the excel files into CSV, with UTF-8 encoding option. However, no matter how many times/different functions I called in R, different settings in R (I’ve tried Windows default encoding, which is windows-1252, and ISO, or the different read.table, readr), the Chinese characters are still not showing properly.
Some of the tips I’ve found helpful to understand the possible errors:
Although these tips didn’t solve my problem. It’s not about choosing UTF-8 or fileEncoding or encoding. At the end, it is fucking excel’s problem, because I found this one and it helped a lot: https://stackoverflow.com/questions…
Turns out even you selected encoding UTF-8 when you converting xlsx to CSV, excel doesn’t do it..So you can either convert the data to txt, or using google spreadsheet and download it as a CSV. Also, you have to cancel the automatically open downloaded file this option, because once excel opens the CSV, the encoding is messed up again.
Another thing to pay attention is that, at Import Dataset, when you use Data Viewer, it may not show the proper encoding results. My data could be imported properly if I finished the importing process rather than just look at the Data Viewer.
I also find UTF-8 is different from UTF8 (however, I can’t prove which one is correct), but I think my main problem here is caused by excel.

2018-01-16

By GEO-DODO

2017 回顾

正经写博客越来越少了。在农历新年来临之前总结一下过去的这一年好了。

1月
去印度参加了朋友婚礼
生日那天喝的大醉

2月
正经投出去第一篇一作文章
偷偷溜去法国待了一周,和维生素去了巴塞罗纳,可惜没进去圣家堂,但吃到了非常美味的tapas

3月
无甚大事,因为工作原因加上长距离,和维生素感情产生波动,经常跑到janet那里哭

4月
连着参加了波士顿的aag,巴尔的摩的us-iale,以及圣地亚哥的abm研讨会
见到了留学之后就没见过的nana和欢,无比怀念版纳
和维生素去了Yosemite和joshua tree,两人开诚布公之后反而更坚定了再一起的决心

5月
文章接收,minor revision
waterloo参加resilience会议,见到development resilience的作者
一篇三作的文章投稿

6月
普渡参加gtap会议
月底回国
被以前的导师骚扰

7月
黑龙江调研,进展顺利
第二篇一作文章投稿
三作文章major revision
和维生素在西宁会和,一路向西,终于见到敦煌中的各色佛像

8月
继续在北京的实验室工作
三作文章接收
带维生素见了高中朋友们,换了一本新护照

9月
到伦敦在kings访学一个月,模型终于跑起来了。。。
去法国了两次,一次一周,一次周末,维生素来伦敦过了个周末,看了wicked
买了三个lv,一个prada,都不是给自己买的

10月
项目开年会,第二篇一作文章minor revision,之后一直忙报销的事情
和维生素正式决定申请加拿大pr,他考了法语和英语
体重达到颠覆,决定减肥

11月
算是在电话里订婚了吧
工作上没有大的进展,一直在输入问卷。。。
成功做到只social drink一个月

12月
提交了一篇二作的review文章,见到了resilience界的一个大牛
圣诞和新年假期和维生素跑了西边的四个国家公园,在vegas看了太阳马戏团的一场表演
最后一天在sedona的停车场把租的车给蹭了。。

1月
在sedona过新年,两个人懒到就在宾馆房间看书,也没出去跟人群倒数
从芝加哥连夜开车回lansing,11号在hall of justice的一间法庭领了个证,几位朋友专门从加拿大过来,好多同事也来了。头一天和后一天都大雪,难得领证那天天气温暖,穿单裙在外面也不冷。老板晚上也去露了个面。之后和大家去了芝加哥过周末,把维生素送到机场。

领证那天因为化妆的原因差点迟到,跑到法院才见到维生素。他一直亲我、说开心。一直都觉得我们俩结婚是business decision,没有预期他是这么真诚的开心,还纠正我说现在不是男朋友了,是丈夫了。可能和前男友在一起总是患得患失,不敢相信男生是可以作出结婚这种承诺的,不知道感情可以没有drama就这么顺利。

一开始并没有觉得结婚后有什么本质上的改变,因为现在还是异国,而且我们就简单领了个证,双方父母也都还不在。直到在芝加哥的最后一天早上,他醒了之后又亲我,说特别特别开心我们结婚了,我才意识到这个人是真的要和你一起过一辈子(至少当下他是认真的),就忽然开始哭了,特别希望能够赶紧一起搬到加拿大去,开始真实的婚姻生活,认认真真过日子。

2017年开局不利,我还记得生日的后一天打电话给维生素哭,说觉得自己三十岁了还一事无成。但是这一年算是越走越顺吧,不管是工作还是个人感情。2018年开局顺利,希望后面也一切顺利。


2017-11-19

By GEO-DODO

#metoo

The urge of talking about this has been itchy for at least a week. Finally, I decided to find a way to organize my thoughts and express the anger and anxiety in me, in a more rational mood.

 

This summer I was harassed by my former professor in graduate school.

 

When I was in Beijing I went to visit him. The last time we met was three years ago, and people need to show respect to professors/teachers in China, as a cultural tradition. He invited me to this dinner party that his phd student celebrating the graduation with fellows from his lab. The dinner went like any other Chinese official banquet, there is one person who has most of the power and sits in the center of the table while everyone else (12+ students) has to kiss his ass. I was never a fan of this kind of thing, but I also understand if I want to go back to china with a good job offer, it is obligate to attend.

 

Everything was fine until we switched venue to a karaoke bar after dinner. My former advisor was slightly drunk, in a pretty damn good mood, since this phd student landed a damn good job offer. Things started going down at the bar. At first I just feel he came too close. He sat next to me, skin to skin. Then he forced me to sing a love duet with him and staring at me and trying to hold my hand as an act for the duet. I didn’t finish the song and moved to sit to the other corner of the room because I already raised suspicion. What confirmed my suspicion is when he walked across the room and sat next to me, again, skin to skin. What made me feel worse is when he started to touch my back and waist, acting like he was too drunk to support himself of accidently touched my skin. The last straw is that he slided his hand from my knee down to my shin. I stood up and told the host, the phd student, that I need to leave because I’m still suffering from jetlag.

 

I was so angry that I was trembling on the taxi back to my hotel. I wasn’t sure if I was angrier at myself or at the professor, a married man, a teacher of mine, who did this to me. I am still not sure about the object of my rage even today. I called my good friend in Beijing and told him what just happened. I remember telling my friend in the phone that, (1) I told the prof I have a boyfriend, (2) I wasn’t dressed inappropriate, i was wearing a cardigan, and my dress goes down to my knees, (3) I didn’t flirt with him at all. (4) did he do this to me because he thought i am easy since my boyfriend is a foreigner?  You see, Immediately I started to check if it’s me did something wrong, which may misguide him that I am interested to sleep with him.

 

It is not a solo instance. Now look back at my time in that institute as his student, he was trying to flirt with me from time to time. The most obvious one is that he offered to take me to some resort hotel outside of Beijing during weekend, which I said no thank you. But he didn’t dare to touch me physically back then. However, I did see him as a model or admired him as a student, and I didn’t tell anyone I had a boyfriend back then. And I am more open minded than any other fellow students in the lab. So maybe, perhaps, he is not the only one to blame? That is why I had the checklist going when I was in the taxi?

 

Every detail is still crystal clear. Every time I look back at this harassment and my time there as a student, I blame myself for not standing up against him at the scene and giving him a slap on the face. There were at least eight other female students at dinner, who are much younger, naïve, and innocent than me. I want to ask them if this monster being harassing them as well, and I want to tell them it is ok to fight back. But how could I? First of all, I do not know them and they know little about me. I have graduated from the lab five years ago and they only heard my name. I don’t know if he ever harassed anyone else. Secondly, which is more important, I didn’t stand up against him myself. How can they expect me as a role model? Lastly, the most important reason, is that, I have no idea where I can report him to? I am only an alumni of the institute, there is no liability issue from the school on me anymore. Moreover, I’m pretty sure even a registered student may have no place to file a complaint. People in charge may just let them shut up, or worse, give them a hard time to graduate for speaking ill of the professor who is in power. Students who report these kinds of things often end up with a slutty reputation as well (particularly if i was the only victim and my boyfriend is foreigner). So no one really wants to disclose those monsters. I’m also worried about the consequences apparently. Do I have any evidence that he harassed me? Students there in the same bar may see nothing. Since he only touched me and it’s not something worse, like many other victims suffering from penetration, people may just say, oh shut up, stop pretending to be a victim here. It is also that once I speak up, there is no possible network for me in this institute, it’ll be a bridge well burned. All these fears, these worries, stopped me from doing anything further. After that night, he texted me a few times while my time in Beijing, inviting me to dinner in private. I turned them down, politely. That’s the keyword, politely. I’m still so afraid to even confront with him.

 

During the phone call in the taxi, my friend tried to calm me. He is a salesman in a company. He said, yeah, it is really common that women in the workplace are often taken advantage. He has several female colleagues who have to deal with customers at dinner table from time to time. And because they need to sell products, there’s no other way but accept and suffer in silence. It’s a rule of thumb. There are other stories I heard from friends who work in China this summer. It is also true in academia, female faculty members will be invited to resort venues for meetings to “balance the gender”, which usually it’s the male professors are in charge of the meetings, and female profs are just there as dancing/dinner partners. Basically, escort. I’m sure same stories lying around and are easy to find. This makes me sad, how pathetic is the working environment for Chinese women. They already suffer significant prejudice from maternity leave and household responsibilities, which is worsen because of the second children policy. Now they are still being treated like a sex tool even they are as capable as their male colleagues?

 

 

I didn’t speak out when the #metoo went viral on facebook and twitter, because my case is cultural specific. Because of my background, I guess I’ll never be able to just blame the professor who gave me these endless self-doubt, or ever collect the courage to confront him or warn his students. Even this essay I’ll only post it on my personal website instead of share it on facebook like I usually do. But I do want to have some answers or clear thoughts on my other rage, to one of my friends’ reaction to this.

 

There are not many people aware of this assault. People I told are all my close friends that I trust. They are all very supportive and warm, offering me lots of assurance. However, there is this one friend, after I told him, asked me, are you sure he touched you not because he is just too awkward to show his affection to you?—The arguments with him is actually a trigger for my anger and willingness to write down these words.

 

To his question, I said no, it is not him being awkward, it is because this is not appropriate for him to do so. First of all, he is married, secondly, he was my professor and is still at a more powerful position than me. Then my friend raised an assumption, which is, would you still feel uncomfortable or unacceptable if he is young, attractive, unmarried? I told him that I may very likely to grow affection to this person, but I still think it’s not acceptable for him doing this. Especially you need approval before you can touch anyone! But I feel very offended by his assumption, it makes me judge myself that I only rejected him or feel disgusted because my professor who touched me against my own will is married and not attractive.

 

Not long ago we had a second argument, when the Hollywood harassment thing is going viral. This time this friend initiated the discussion. He said he doesn’t understand why people only feel powerless, to him, the predators’ behaviors are weird, which is not a power dynamic. This made me jump off my chair. I know this friend means no harm and we often argue about things. However, once again, I am extremely angry at what he just wondered. This sounds like the harassment victims are in a power equal position with those predators, and it is their fault to feel powerless and not fight back at the scene. You see, this is exactly what I have been blaming myself for. So, this time, instead of arguing with him, I just tell him to shut up. I told him, being a friend means you need to be supportive if anyone is going through a sexual harassment, not being judgmental.

 

I know this friend, as a victim himself once, has no intention to criticize me or blame me for not standing up. I still feel extremely angry at his tone. But later when I am less furious, I started to think if his argument has some merits. Maybe we do need to feel less powerless but analyze the predators’ behaviors so that we can find a solution? However, I can’t seem to be able to convince myself. Emotionally, I kind of still suffering the fact that I didn’t do anything to stop him, and this is why I am angry at my friend’s tone, because it is true that I did feel powerless and it is the reason I didn’t stand up, for myself and for others. However, that monster professor is the person who started it, it is not my fault not to feel his behavior weird, but rather disgusting, offensive, assaulting, and destructing. It is the society’s fault that women are often victims to these types of situation. Why they did it? Because they are sick. Because society gives them power to assault women at no cost. Is it weird? Should we think their behaviors as weird? I don’t care. It is WRONG for them to do so. WRONG, not weird.

 

Anyway, I’m still angry at myself today. For both not standing up, and for not winning the argument with my friend. This essay definitely helps to clear my thoughts and makes me less upset. I wish in the future, I can find peace with myself, and, the worst case scenario, if this type of thing ever happened again, I will pull myself together and stand up against it.


2017-10-25

By GEO-DODO

Our trip to California (and a first try of story map)

I tried ArcGIS story map with our trip to California, here’s the link:

Wictor and Yue’s trip to the west coast

This April, Victor and I had a road trip along the coast of California. We visited Yosemite (of course, highlight of California), santa barbara (a grad school friend of mine, Dr. Shaohua Wang is a visiting scholar at UCSB), LA (after we saw La La Land), Joshua Tree, and San Diego (my ABM conference was there).

We enjoyed our time a lot at the two national parks, also enjoyed food in LA (but not the city), and beer at San Diego.

 


2017-01-13

By GEO-DODO

产于印度黄金海岸带的腰果甜酒

今天要介绍Feni,一种只出产于印度南部Goa地区,并且只能在该地区贩售的酒。Feni有两种:一种酿自腰果(cashew),另一种是由酒椰子(toddy palm)酿自而成。因为我去玩的时候正好尝了一下腰果甜酒,所以今天来谈谈腰果酒。

 

印度的Goa是个独特的所在。Goa是印度最小的一个联邦(相当于咱们的省,面积大概占印度国土总面积的0.1%),位于印度南部的孟买和班加罗尔之间。不同于印度的大部分地区,Goa是受葡萄牙人统治的,一直到1961年才脱离殖民,晚了印度独立整整14年(为什么呢?因为受葡萄牙人的影响,整个goa都很悠闲)。Goa有很长的海滩,常年招待很多从俄罗斯、英国和欧洲大陆来度假的退休老人。近年来也有越来越多的印度年轻人来这里赶新潮。我觉得很像咱们的海南(常年很多俄罗斯和东北银哦)。不同于三亚的是Goa有山,植被繁茂,生长着很多名贵的香料和坚果。腰果就是其中一种。

腰果的坚果(cashew nut)是长在果实(cashew fruit)上的,一个巨大的腰果果只结一个小小的坚果粒。当地人将腰果的坚果从腰果果实部分采摘之后,坚果拿去烘干、封装,果实部分则被用来做酿酒。

上半部分是fruit,下面小小的是我们常吃的腰果

上半部分是fruit,下面小小的是我们常吃的腰果

当地人将腰果的果实碾碎,然后将汁水收集起来,装进一个特殊的陶制锅状容器。容器底下可以生火,用于蒸馏。蒸馏之后的腰果汁流入另一口半埋于地下的陶制容器,自然发酵几天之后就是酒精浓度在45%左右的腰果甜酒啦!

(酿造feni的土容器)

(酿造feni的土容器)

我当时去了一个香料种植园参观,他们就还在用这种土制容器。不知道是否不能工业化腰果甜酒的生产,Feni大部分目前还是这种小规模的生产作坊方式。在种植园的时候我尝了一小杯,虽然酒精度数和伏特加差不多,却很好入口,非常甘甜,像度数稍烈的白葡萄酒。售价也出乎意料的便宜,比如路边小餐馆里,一杯纯feni是20印度卢比,而一杯啤酒则要100印度卢比。

(干了这杯feni)

(干了这杯feni)

可惜我当时并不知道feni在别处买不到,不然就背一瓶回来,壮大我们小酒馆的收藏了。诶。


← Before After →