#I didn't have time or patience to make this post in html
Explore tagged Tumblr posts
Text
📚 Welcome to Sirentale - Your Personal Birth Chart Fairy Tale! 📚
Hello, Sirens! This game is to "celebrate" my 11 years using tumblr and I'm excited to introduce you to a whimsical journey called Sirentale, where we'll craft enchanting birth chart fairy tales together. When I do a natal chart reading I always start with this type of text. I see our chart as a book and that's how I like to express this thought.🧜♀️✨
🌟 How to Play:
1.Send me your birth chart details:
Birthdate (mm/dd/yyyy)
Birthplace (City, State, Country)
Birth time
2.Choose your underwater emoji 🌊:
🐚 for a serene and peaceful tale: Choose the seashell emoji if you desire a tranquil and harmonious narrative. Your Sirentale will be a gentle, soothing journey, guiding you through the calm waters of your life's celestial influences. It will focus on the serenity and inner peace found within your birth chart, providing insights into your serene strengths and the quiet wisdom that resides within you.
🐬 for an adventurous and playful story: Select the playful dolphin emoji if you're up for an adventurous and spirited tale. Your Sirentale will be an exciting exploration of the uncharted waters of your birth chart. It will reveal the hidden treasures of your personality, emphasizing the thrill of discovery and the joy of life's playful surprises.
🐙 for a mysterious and deep narrative: Opt for the enigmatic octopus emoji if you're drawn to the depths of mystery and intrigue. Your Sirentale will be a profound and thought-provoking journey into the mysterious aspects of your birth chart. It will unveil the secrets and hidden layers of your character, delving deep into the enigmatic corners of your soul.
🐠 for a magical and transformative journey : Choose the mystical fish emoji if you're ready for a transformative and magical experience. Your Sirentale will be a spellbinding odyssey, taking you on a fantastical adventure through the cosmic realms of your birth chart. It will focus on the profound shifts and magical moments in your life, illuminating the transformative path that lies ahead
3.Ask me a fun question about myself! Or make a tarot reading for me.. maybe you want to talk about my big 3 (aquarius sun/gemini moon/capricorn rising - aquarius stellium and saturn dominant) 🙃 It's only fair that I get to join in on the fun too.
4.After you receive your Sirentale, share your feedback! 💌 Honest thoughts are appreciated.
You don't need to follow me, and you can send your information anonymously if you prefer (I know there are people who don't like to show their information publicly). However, if you choose not to send feedback since you where just a anon, well, ... 😄
Let's dive into the depths of imagination and explore your birth chart in a whole new way! Get ready for a tale like no other, and let's make some magical memories together. I don't know how many readings I will do, I will start aswering this weekend and when the "subscription period" ends I will close my askbox. 💙💫
🐚🐬🐙🐠 Send me an ask in the askbox to start your Sirentale adventure! 📩✨
#astrojulia#astrology#astro games#astrojulia games#I didn't have time or patience to make this post in html
128 notes
·
View notes
Text
Scraping Raw HTML
Say you're browsing through the library of searchable Greek inscriptions on the Packard Humanities Institute website. While you're there, browsing through the Boeotian inscriptions as one does, you find the inscription IG VII 2708. You read it, and something catches your eye: that αὐτῦς in line 5 — that looks an awful lot like a dative plural! But if that's the case, why is it not spelled αὐτοῖς? Is this evidence of a consistent dialectal feature in the area? In order to figure that out, you need to collect more evidence. There's a few ways of going about it.
The first option which comes to mind is to start copy-pasting data from the website into a spreadsheet. This has the benefit of being immediately available, since you only need an internet connection, a spreadsheet editor, and patience. In fact, this is how I collected my data for my first epigraphic survey, way back in the first semester of my masters!
However, this option is pretty seriously flawed. There are multiple thousands of inscriptions on this one site, so any increase to the size of the study corpus would mandate a disproportionate amount of time spent on data collection. For my first survey, I spent an entire week on collection — flipping through and copying texts like it was 1802 — and I only gathered 248 inscriptions. At the time I was pleased with the amount I collected, but it only took a few days of work for me to see how inefficient the whole process was.
The next option is automation. Fortunately, this task is the perfect candidate! First, it's repetitive: copy the inscription number, paste it, copy the date, paste it, copy the text... that sort of repeated work is exactly what computers excel at. Next, it's consistent: every inscription page is laid out in the same format as every other, making it simple to find the appropriate data. Any code scraping the library wouldn't need to worry about page format or how the data is stored, since the relevant info is always in the same place. Finally, it's boring as hell to do by hand. That alone should be reason enough.
"So, uh, how do we do that?"
Great question! Look at the right side of the page (you still have G VII 2708 open, right?). See the green text there? The one that says "PH146216" — click it. Now look at the address bar and squint contemplatively as you notice that the number in the button you pressed is also at the end of the inscription's URL.
Now, hit the back button. The number should still be there, but with a bunch of other gook at the end. But none of that gook is actually necessary, just the PH number! Let's test it out: replace that number in the URL with "1" and... good heavens it took us to a different inscription. We could put anything there and the site will try to serve us a corresponding inscription!
Okay, some code. Let's make a function that builds a URL for us. For this, we'll use the R function paste() to combine the main body of the URL with a chosen PH number.
paste('https://inscriptions.packhum.org/text/', ph_no, sep = "")
Notice the sep = "" in there. That just tells the function that we don't want anything to separate the two elements as they are pasted together. For convenience, we can save this as the variable link.
link = paste('https://inscriptions.packhum.org/text/', ph_no, sep = "")
(Line breaks don't typically matter in R, and they can make things a lot easier to read. Normally there would be better indentation, but somebody thought we didn't need that in our posts any more.)
Now we need to tell the code to access that URL. To do that, we'll use the function read_html() from the library rvest. NB: libraries are essentially code someone else has written. That's a bit reductive, since libraries offer some standardization, consistency, and ease of use... but it's also definitely true. However, I don't know how to open a page in R entirely from scratch, and it's usually best practice to use a library anyways, so here it is. Whenever we use a function imported from a library, it will be preceded by the library name and two colons, like this: rvest::read_html(). This notation is a little slower for the computer than just saying read_html(), but it's a lot better for readability.
anyways, now that we have a URL saved, let's have R scrape it and save it as the variable page.
page = rvest::read_html(link)
Great! Now we have all the raw HTML for any PH number we want! Now we just wrap it into a custom function so that we could use an arbitrary number without editing any code:
MakePage = function(ph_no) { link = paste('https://inscriptions.packhum.org/text/', ph_no, sep = "") page = rvest::read_html(link) return(page) }
It looks like a lot, so let's break it down. The first line tells R that MakePage is now a name, that the name corresponds to a function, and that the function takes the variable ph_no as an input. That input can be anything — the text ph_no is just a placeholder.
Lines 2-4 take the input ph_no and creates a URL with it, which it saves as the variable link. Line 5 then uses that link to grab whatever raw HTML it can find, then saves it as the variable page.
Line 6 is the function's return. See, a function is just a collection of actions. They do stuff. They're great at doing stuff. They live to do stuff. Except they suck at doing stuff to things, and they can only actually output one stuff-ed thing at a time. No matter how many inputs you provide to a function, it can only output one. When you want it to output something, you use return() — so, here, the function is returning the variable page, meaning any other function could use that variable if we told it to.
And there it is! A function!
It looks nicer in R studio, doesn't it?
If you run that function, it will spit out some HTML at you!
And if you want to use that HTML later (and we do!), then simply save it to a variable!
voilà!
Next time we'll look at what exactly is in that HTML and how you can use it to answer your αὐτῦς question from earlier! (You remembered that, right?)
#Ancient Greek#R#Dialectology#Quantitative Linguistics#Programming#Historical Linguistics#Web Scraping
0 notes