Skip to content

Latest commit

 

History

History
667 lines (515 loc) · 26.4 KB

Code-Projects-2020.md

File metadata and controls

667 lines (515 loc) · 26.4 KB

Log for #Code_Each_Day - Wendy Anthony

The log of Round 1 of my #100DaysOfCode challenge. Started on 2020-01-01 (2019-12-28)


Table of Contents


Week LII


R1D365 2020-12-30

Today's Progress:

  • Victoria precip data as a heatmap calendar, a most excellent tutorial by Dominic Royé
    • had to tweak font
    • download Victoria 2020 weather data, change column names
    • Lubridate epiweek()needed to change week start to Sunday vs Monday

Thoughts:

  • Still finding cool things to do with R data

Links to code work:

TOC


R1D361 2020-12-26

Today's Progress:

  • playing with Leaflet for R
    • found code to add a search box
    • found code to create to create timeline in Leaflet for R
  • found a package & some R code to work with Google Earth Engine RGEE

Thoughts:

  • excited to find different ways to use leaflet

Links to code work:

TOC


R1D360 2020-12-25

Today's Progress:

  • In Google Earth (GE) added placemarks with title, map intro & bibliography, and saved as .kml file
  • in html file, added style for title overlay, and style to allow scrolling long text in the balloons

Thoughts:

  • excited to find different ways to use kml and leaflet
  • I did spend some time trying to figure out how to create different Leaflet layers for different kml folders >> no luck
  • I did try converting kml to geojson, but all the icon info is lost!

Links to code work:

TOC


R1D359 2020-12-24

Today's Progress:

Thoughts:

  • excited to find different ways to use kml and leaflet
  • now I want to figure out how to create different Leaflet layers for different kml folders

Links to code work:

TOC


R1D358 2020-12-23

Today's Progress:

  • revisiting and playing with weather data in R ggplot2

Thoughts:

  • at end of year download complete 2020 data
  • redo some plots

Links to code work:

TOC


R1D357 2020-12-22

Today's Progress:

Thoughts:

  • had trouble with Google fonts, had to learn later how to install on Mac to use in R
  • want to do more with ggplot2

Links to code work:

TOC


Week weekXXXIII


R1D223 2020-08-10

Today's Progress:

  • working with Leaflet for R to create another interactive webpage map for my iNaturalist observations, using similar mapping code to my shiny app
  • used the R packages rinat (to access iNaturalist data), lubridate (to manage the dates), leaflet, htmlwidgets (to export html file)

Thoughts:

Links to code work:

TOC


Week XX ..... (Week IX of COVID-19 Lockdown)


R1D134 2020-05-13

Today's Progress:

  • tried new-to-me package tidycovid19, merging data from 9 different sources, creating familiar charts

Thoughts:

  • I hadn't done any coding since finishing my Adv Weather Course, exams and assignments, so after a 3 week break I've been itching to play with R ... COVID-19 lockdown time is starting to phase into different stage, and seems like a perfect time to try to make some of the COVID-19 data viz charts I've been seeing on Twitter

Links to code work:

TOC


Week VI


R1D27 2020-02-04

Today's Progress:

  • ImageMagick used montage to create a series of 4 tiles of gifs of weather charts downloaded from Environment Canada
  • animating montages with convert

Thoughts:

  • trying to find a way to make sense of changing weather patterns by animating upper air charts and surface charts for specific date spans

Links to code work:

  • montage -label '%f' SurfaceChart-mean-sealevelPressure-2020-02-01-00-947_100.gif SurfaceChart-mean-sealevelPressure-2020-02-01-06-951_100.gif SurfaceChart-mean-sealevelPressure-2020-02-01-12-935_100.gif SurfaceChart-mean-sealevelPressure-2020-02-01-18-941_100.gif -tile x1 -frame 5 -geometry '895x765+10+10>' -pointsize 30 -title 'Surface Charts 2020-02-01-00 to 2020-02-01-18' montage-label-title-size30-tile1-895x765x1790x1531-gap10+10-frame-SurfaceCharts-2020-02-01-00-to-01-18.gif
  • convert -delay 1650 montage-label-title-size30*.gif anim-montage-x1-30-surface-mean-sealevel-Pressure-2020-02-01to04_1650.gif
  • montage -label '%f' SurfaceChart-mean-sealevelPressure-2020-02-01-00-947_100.gif SurfaceChart-mean-sealevelPressure-2020-02-01-06-951_100.gif SurfaceChart-mean-sealevelPressure-2020-02-01-12-935_100.gif SurfaceChart-mean-sealevelPressure-2020-02-01-18-941_100.gif -tile 2x2 -frame 5 -geometry '+10+10>' -pointsize 50 -title 'Surface Charts 2020-02-01-00 to 2020-02-01-18' montage-label-title-size50-tile2-gap10+10-frame-SurfaceCharts-2020-02-01-00-to-01-18.gif

TOC


Week V


R1D26 2020-01-31

Today's Progress:

  • ImageMagick used convert to animate gifs of weather charts downloaded from Environment Canada
  • testing different loops (default is 1 time through); open in Chrome to run animation; can also use Powerpoint (use slideshow > play from current slide)

Thoughts:

  • Trying to animate 1700 jpg just hung Terminal for almost an hour (had to use Ctrl+D to quit) - 500 seems about right (500 images takes 7 min; 200 images takes 4 minutes)

Links to code work:

  • convert -delay 30 goes_wcan*.jpg anim-goes-wcan-2020-01-23to26_30.gif

TOC


R1D25 2020-01-30

Today's Progress:

  • trying my hand at Tidy Tuesday's San Francisco's Trees; using patchwork & ggtext packages
  • learning to use GSODR to download weather data
  • learning to use GEMPAK through VM virtual
  • got help from Prof to see if I'd installed ImageMagick properly

Thoughts:

  • my image file didn't turn out the same as source, so I played with code a bit
  • takes some time to download, but works!!
  • GEMPAK - I messed up by trying to copy gem file from download to virtual desktop - should have copied from explorer-finder window
  • ImageMagick can't use animate as MacOS needs QXII, but Homebrew won't use options to install

Links to code work:

TOC


R1D24 2020-01-29

Today's Progress:

  • more mapping in R: inset maps with ggplot2

Thoughts:

  • takes a long time for map to process - wasn't sure if I'd done something wrong ... just need patience!

Links to code work:

TOC


R1D23 2020-01-28

Today's Progress:

Thoughts:

  • I get quite excited when I can get some code to work, after tweaking for local relevance
  • I'm very interested to do more weather visualizations

Links to code work:

TOC


R1D22 2020-01-26

Today's Progress:

  • trying out a variety of R packages ...
    • found a package MapPalettes that will get_color_from_image("") supplying hex colour code for colours found in image

Thoughts:

  • what a cool way to find the colours in an image URL

Links to code work:

TOC


Week IV


R1D21 2020-01-21

Today's Progress:

  • trying some more highcharter advanced mapping, creating a map by importing geojson files, using code samples from the package maker, with some tweaking; the map shows the continents, country boundaries, plate boundaries, marine currents, volcano locations; with interactive tooltips

Thoughts:

  • map wouldn't work, I had to tweak the code, and was successful - I'm pretty proud of myself for figuring out what to do to make the code work! ;)

Links to code work:

TOC


R1D20 2020-01-20

Today's Progress:

  • trying some more highcharter functions to make charts with new series of data, bands on the y-axis, grouping together values

Thoughts:

  • when there are errors working from someone's demo tutorial, or code doesn't work, don't assume it's me - sometimes the original has code spelling errors, or leaves out repeat info that need to know how to add to without being told

Links to code work:

TOC

**

R1D19 2020-01-19

Today's Progress:

  • trying to get D3 to run with R shiny
  • testing highcharter in Shiny, adding more types & themes, also trying different data

Thoughts:

  • very interested in the interactivity of D3 & Shiny in combination, though having trouble accessing different data
  • would like to find a way to add different data choices to highcharter in Shiny

Links to code work:

TOC


Week III


R1D18 2020-01-18

Today's Progress:

  • trying to get webscraping html tables to work in R, but had trouble with tables that had columns that spanned over multiple columns

Thoughts:

  • make sure I don't create messy tables with multiple spanning columns

TOC


R1D17 2020-01-17

Today's Progress:

  • trying to get shiny apps to work using golem package

Thoughts:

TOC


R1D16 2020-01-16

Today's Progress:

  • found a way to generate animated gifs from environment canada forecasts using Photoshop

Thoughts:

  • animating weather forecasts helps to understand change over time

Make animated gifs with Photoshop (CS5)

  1. File > Scriptw > Load files into stack > Browse for files > open > OK
  2. set loop count (dropdown arrow below first gif)
  3. hamburger menu at top right of animation frames window
  4. Make frames from layers > select all > set loop count for all selected
  5. Play button to view
  6. File > Save for Web > Preset: GI 128 Dithered; Colors: 256 > Preview > Save

TOC


R1D15 2020-01-15

Today's Progress:

  • tried to get cluster code to show more markers when zoomed in

Thoughts:

  • cleaning and preparing data takes a lot of work - much more than trying to figure out the code sometimes!

Links to code work:

TOC


R1D14 2020-01-14

Today's Progress:

  • learned to make non-linear presentation in Powerpoint, using sections and linking to each section with images in a TOC

Thoughts:

  • in older version of Powerpoint 2016, this doesn't work as simply as newer versions, so I had to figure out what would work with older version

TOC


R1D13 2020-01-13

Today's Progress:

Thoughts:

  • cleaning and preparing data takes a lot of work - much more than trying to figure out the code sometimes!

Links to code work:

TOC


R1D12 2020-01-12

Today's Progress:

  • reviewing use of Linux UNIX commands in MacOSX Terminal with Unix Tutorial (for Synoptic Meteorology course Geog484)
  • trying, without success to 'Compile UNIX software packages' ... couldn't get the syntax correct to ./configure --prefix=$HOME/units174 to generate / install in correct directory, after trying multiple different ways (I was able to create new directory, just not configure / install to it - not sure how to find the right syntax)
  • working on a ggplot2 precipitation visualization, got it working, then did something to mess it up ... now nothing works!!

Thoughts:

  • I always thought compiling programs in terminal would be a challenge, and indeed this is - install not working correctly yet??
  • I need to save a code file when it is working, and try other stuff on a copy - 'twould save me a lot of heart-ache!!

Links to code work:

TOC


Week II


R1D11 2020-01-11

Today's Progress:

  • learn to use UNIX commands in MacOSX Terminal with Unix Tutorial (for Synoptic Meteorology course Geog484)
  • redid uvic seasonal weather plot in ggplot2 using smaller point size for 'dots' > makes chart easier to read

Thoughts:

  • typing commands into terminal is a lot less intimidating than I was expecting
  • ggplot2 makes some beautiful charts!

Links to code work:

TOC


R1D10 2020-01-10

Today's Progress:

  • created ggplot2 weather visualization using weathercan to download 5 years of UVic weather data, and append rows of another year of data using rbind
  • created facet plots of multiple yearly plot data together
  • created new column for meteorological seasons to create a 5 year temp plot coloured by seasons
  • had to spend some time to figure out how to reorder the items on the legend (from alphabetic)
  • saved plots to .png files

Thoughts:

  • wanted to do some more weather visualizations using ggplot2, over multiple years, and create facets

Links to code work:

TOC


R1D9 2020-01-09

Today's Progress:

  • adding more R resource links (collected on iPad) to links resource webpage, using .rmd document knitted to .html
  • learning to make dashboards in R Markdown using flexdashboard with column layout, multiple pages, & storyboards
  • testing some highlighter shiny apps
  • testing some weather code using ggplot2 and ggridges

Thoughts:

  • was able to create an internal link to another page in the multiple page layout
    • trying, without success to create internal links to one of the storyboards

Links to code work:

TOC


R1D8 2020-01-08

Today's Progress:

  • Victoria Census shiny app: Changed column names; added data dictionary to map column names from original data; added raw data table
  • Vancouver Census shiny app: copy/paste change Victoria to Vancouver
  • put both Vancouver & Victoria Census app in an iframe
  • created screenshots of 2018 monthly max temperature using GEE NASA/ORNL/DAYMET_V3 dataset

Thoughts:

  • would like to figure out how to put both Victoria & Vancouver Census apps in one shiny app, with options to choose one or the other

Links to code work:

TOC


R1D7 2020-01-07

Today's Progress:

  • Playing around in Google Earth Engine GEE, with scripts for Canadian Datasets: NRC_CDEM, NASA/ORNL/DAYMET_V3 (learned to change date range, map centre & zoom)

Thoughts:

  • would like to know how to export the map image created

Links to code work:

TOC


R1D6 2020-01-06

Today's Progress:

  • learning to organize my forked github repositories by making new 'organizations' and 'transfering ownership' from my main repository (200+ forked repositories) to new forked-organizations

Thoughts:

  • too bad github didn't build-in some way to simplify organization of repositories, to make them easier to find than a search
    • I had originally set-up a repository for a list of my personal respositories, and 'pinned' to top of repository page
  • Transfer forked repository to new organization:
    • in Repository, click 'Settings'
    • in 'Danger Zone' click 'Transfer'
    • type name of original repository
    • type or copy/paste name of organization to transfer to

Links to code work:

TOC


R1D5 2020-01-05

Today's Progress:

  • experimenting using highcharts r wrapper highcharter
  • trying to get iNaturalist to work in R library("rinat")
    • finally got my personal iNaturalist observations to show in R !!!

Thoughts:

  • though I've used highcharts code for dataviz, the highcharter 'wrapper' uses different code styles for same charts
  • tutorial samples work, but not with projects I'm involved with e.g. bc-parks
    • bc-parks is an umbrella project with other individual BC Parks Projects
    • rinat gives an error; I've tried a few suggestions (a common error with rinat) but no luck so far

Links to code work:

  • to extract my personal observations
    • get_inat_obs_user("wendy_anthony", maxresults = "3000")
    • default is 110 results > I actually have 2200 uploaded observations between Aug 2019 & May 2015
  • to Extract just research grade observations
    • wa_inat_userstats_research <- wa_inat_userstats[which(wa_inat_userstats$quality_grade == "research" ),]

TOC


Week I


R1D4 2020-01-04

Today's Progress:

  • Continued work on my UVic website
  • Learning more about .md styling
    • e.g. Table of Contents, list items
  • trying eBird auk auk package

Thoughts:

  • using examples from packages work fine (e.g auk), but when trying to import real data, not so much ...

Links to code work:

TOC


R1D3 2020-01-03

Today's Progress: Fixed absolute URLs in my UVic student website (over 2400 files)

Thoughts: Continued work with weather data to better understand how to process it

Links to code work: http://people.geog.uvic.ca/wanthony/website/index.html

TOC


R1D2 2020-01-02

Today's Progress:

  1. Reworked Shiny App for Victoria Census data, creating normalized value columns for comparing polygons (variable / #households)
  2. Figured out how to make windrose with weather data

Thoughts:

Links to code work:

  1. https://wendyanthony.shinyapps.io/VicCensusApp/
  2. https://github.com/WendyAnthony/Code_Each_Day/blob/master/My_Code/Vic_Census_Shiny/app.R
  3. https://github.com/WendyAnthony/Code_Each_Day/blob/master/My_Code/Weather/windrose.R

TOC


R1D1 2020-01-01

Today's Progress: Started a Weather App. Worked on the draft layout of the app, struggled with OpenWeather API

Thoughts: Coding takes patience and lots of trial-&-errors, then EUREKA!!

TOC


Week 0


R1D0-3 2019-12-30

Today's Progress:

Thoughts:

  • I'd like to do some coding every day, when I first get up

TOC


R1D0-2 2019-12-29

Today's Progress:

Thoughts:

TOC


R1D0-1 2019-12-28

Today's Progress: Learning to create a Wordcloud in R with Old-Time Tunes titles, and text from books

Thoughts:

  • based on text from Gutenberg library - I added list of Old-Time Tunes titles

Links to code work:

TOC



Wish-List

TOC